Smart Accounts v1 to v3
Last updated
Was this helpful?
Last updated
Was this helpful?
Upgrading to unlocks multi-clause support, enhanced security, and other essential features for transactions on VeChain. This feature is available in VeChain Kit from .
When integrating social login in your app, users might have a version 1 smart account. This version doesn’t support multiclause transactions, potentially causing issues within your app.
To address this scenario, consider wrapping your onClick
handler or using another suitable method to prompt users to upgrade their smart accounts to version 3.
The kit makes available both the hooks to know if the upgrade is required and the component for upgrading:
useUpgradeRequired(smartAccountAddress, ownerAddress, targetVersion: 3)
is the hook that will let you know if the user is on v1 and needs to upgrade to v3
useUpgradeSmartAccountModal()
is the hook that will allow you to open the upgrade modal, that the user will use to upgrade.
You can also handle this with your own UI by using the useUpgradeSmartAccount(smartAccountAddress, targetVersion: 3)
hook.
View other useful hooks .
You can customize the color button and size of the imported modal from the kit: