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"
When account data is persisted to
localStorageand restored on page reload,Uint8Arraypubkeys 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 realUint8Array.See:
interchain-kit/packages/store/src/wallet-manager/chain-wallet-store.ts
Lines 89 to 93 in dcdabc8
Reproduction
Uint8Array)localStorage)