Skip to content
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

rpc: support stringified address in getnep5balances RPC #1146

Merged
merged 3 commits into from
Jul 3, 2020

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Jul 3, 2020

Fix #1143 .

Also extend getnep5transfers.

@codecov
Copy link

codecov bot commented Jul 3, 2020

Codecov Report

Merging #1146 into master-2.x will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff               @@
##           master-2.x    #1146      +/-   ##
==============================================
+ Coverage       67.95%   67.96%   +0.01%     
==============================================
  Files             159      159              
  Lines           15551    15556       +5     
==============================================
+ Hits            10567    10573       +6     
+ Misses           4463     4462       -1     
  Partials          521      521              
Impacted Files Coverage Δ
pkg/rpc/request/param.go 78.89% <100.00%> (+1.01%) ⬆️
pkg/rpc/server/server.go 81.61% <100.00%> (ø)
pkg/core/mpt/trie.go 92.43% <0.00%> (-0.43%) ⬇️
pkg/rpc/client/wsclient.go 85.71% <0.00%> (+1.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ec96b4...dcb00c6. Read the comment docs.

Copy link
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add support of this feature to RPC client?

@fyrchik
Copy link
Contributor Author

fyrchik commented Jul 3, 2020

@AnnaShaleva GetNEP5Balances works with raw hash so it is ok. Maybe we should update GetNEP5Transfers to work with raw util.Uint160 type too.

@roman-khimov
Copy link
Member

func (c *Client) GetNEP5Balances(address util.Uint160) (*result.NEP5Balances, error) 
func (c *Client) GetNEP5Transfers(address string) (*result.NEP5Transfers, error)

Seems to be OK already (although technically they could both be util.Uint160, but let's not change it for Neo 2.

@roman-khimov roman-khimov merged commit fd778e0 into master-2.x Jul 3, 2020
@roman-khimov roman-khimov deleted the fix/getnep5balances branch July 3, 2020 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rpc RPC server and client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getnep5balances should accept addresses in parameters
3 participants