Appearance
Connecting the wallet
Once you have created a wallet or already have an embedded wallet, you can now connect your wallet.
The Privy client will attempt to automatically connect after a successful login, but you can call the connect
method on your Privy client's embeddedWallet
class to manually retry if necessary.
swift
_ = try? await privy.embeddedWallet.connectWallet(retryOnFailure: true)
This method will throw an error if:
- There is no authenticated user
- Embedded wallet state is not in the disconnected state
- The user has no embedded wallets to connect to
- If the network call fails