getDefaultWallet & setDefaultWalle
Sats Connect lets your app manage your user's default connected wallet:
the
getDefaultWallet()
method lets you fetch the user's default connected walletthe
setDefaultWallet()
method lets you set the userβs default connected wallet
The default selection is stored in local storage.
No request parameters are required for the above methods. The following snippet shows how to manage the userβs default wallet:
Note that this is handled automatically when using Wallet.request
methods
The method will check for a default connected wallet first.
If there is no connected wallet, the user will be prompted to select one first. The method will then set it as new default connected wallet.