When account data is persisted to localStorage and restored on page reload, Uint8Array pubkeys are silently converted to plain objects ({0: 2, 1: 176, …}). This causes signing to fail with "length of pubkey is incorrect" because the signing pipeline expects a real Uint8Array.
See:
|
async getAccount(): Promise<WalletAccount> { |
|
const existed = this.store.getChainWalletState(this.wallet.info.name, this.chain.chainName)?.account; |
|
if (existed) { |
|
return existed; |
|
} |
Reproduction
- Connect a Cosmos wallet
- Perform a successful transaction (works – pubkey is a real
Uint8Array)
- Reload the page (account is restored from
localStorage)
- Attempt to sign another transaction
- Transaction fails with "length of pubkey is incorrect"