CodeChain-io / CodeChain-io/codechain-sdk-js

Throw errors when blockNumber is invalid in ChainRpc

Aperta
#179 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
discussion rpc
Lingua principale
TypeScript
Stelle
26
Fork
14
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Currently, `getBalance` and `getNonce` are able to resolve `null` when no such block exists. (the given blockNumber is too big)
For TypeScript users, they should put the type guard for every `getBalance` and `getNonce`.

The problem is, a type guard is useless if the users use a valid block number only.

Methods using blockNumber parameter
- getBalance
- getNonce
- getRegularKey
- getRegularKeyOwner
- getAsset
- getAssetScheme*
- getBlock
- getBlockHash
- isAssetSpent

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.