Skip to content

Throw errors when blockNumber is invalid in ChainRpc #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
joojis opened this issue Sep 12, 2018 · 0 comments
Open

Throw errors when blockNumber is invalid in ChainRpc #179

joojis opened this issue Sep 12, 2018 · 0 comments

Comments

@joojis
Copy link
Contributor

joojis commented Sep 12, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant