hyperweb-io / hyperweb-io/interchain-kit

`Uint8Array` pubkeys degrade to plain objects after `localStorage` round-trip

Aperta
#40 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
11
Fork
19
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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: https://github.com/hyperweb-io/interchain-kit/blob/dcdabc86f80ea1be9a25919b755fd8b2b9b931b2/packages/store/src/wallet-manager/chain-wallet-store.ts#L89-L93

**Reproduction**

1. Connect a Cosmos wallet
2. Perform a successful transaction (works – pubkey is a real `Uint8Array`)
3. Reload the page (account is restored from `localStorage`)
4. Attempt to sign another transaction
5. Transaction fails with "length of pubkey is incorrect"

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inspect packages/store/src/wallet-manager/chain-wallet-store.ts around lines 89-93 and reproduce the localStorage round-trip by connecting a Cosmos wallet, transacting, reloading, and signing again. Done means the restored pubkey is a real Uint8Array and signing no longer reports that the pubkey length is incorrect.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
blockchain, frontend
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.