assertWalletAccountSigningAvailability
function, which will throw a WalletAccountNotSelectedError
error
in case the wallets app required the wallet account to be the currently selected one and the wallet account you trying to sign the message with is not the currently selected one.
We’ll do the same check once a sign function is called, but you can check it beforehand to avoid errors.
WalletAccountNotSelectedError
error.
The error contains an expectedAddress
, which is the address that you are trying to sign the message with, and a selectedAddress
, which is the address that is currently active in the wallet app.
If there is no selectedAddress
prop, it probably means that there is no connected wallet accounts to your app.