const ProvisionButton: FC = () => {
const handleProvision = async () => {
// Get the existing encrypted client backup share from your API.
const backupShare = await axios.get('/clients/[clientId]/backup')
const backupMethod = "GDRIVE" // Use the backupMethod that was used by the client when they backed up their wallet.
const backupConfig = {}
// Get a new signing share from running provisionWallet.
await portal.provisionWallet(backupShare, backupMethod, backupConfig)
}
return (
<button onPress={handleProvision}>Provision your wallet</button>
)
}
export default ProvisionButton