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

[Access] Add REST endpoint to get an accounts flow balance #6253

Merged

Conversation

AndriiDiachuk
Copy link
Contributor

In this PR a new REST endpoint was added that returns the account's flow balance using the new GetAccountBalance method in the backend.

Closes: #6001
Related PR: onflow/flow#1491

@codecov-commenter
Copy link

codecov-commenter commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 51.66667% with 29 lines in your changes missing coverage. Please review.

Project coverage is 41.55%. Comparing base (f296f51) to head (201414e).

Files Patch % Lines
engine/access/rest/apiproxy/rest_proxy_handler.go 0.00% 13 Missing ⚠️
engine/access/rest/request/get_account_balance.go 68.42% 6 Missing ⚠️
engine/access/rest/routes/account_balance.go 68.42% 4 Missing and 2 partials ⚠️
engine/access/rest/request/request.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6253      +/-   ##
==========================================
- Coverage   41.55%   41.55%   -0.01%     
==========================================
  Files        1993     1995       +2     
  Lines      141665   141724      +59     
==========================================
+ Hits        58868    58888      +20     
- Misses      76667    76705      +38     
- Partials     6130     6131       +1     
Flag Coverage Δ
unittests 41.55% <51.66%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Guitarheroua Guitarheroua self-requested a review July 25, 2024 09:58
Copy link
Contributor

@Guitarheroua Guitarheroua left a comment

Choose a reason for hiding this comment

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

Looks good, has couple comments to fix.

Copy link
Contributor

@peterargue peterargue left a comment

Choose a reason for hiding this comment

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

looking good. added a couple small comments

engine/access/rest/routes/account_balance_test.go Outdated Show resolved Hide resolved
engine/access/rest/routes/router.go Show resolved Hide resolved
@AndriiDiachuk AndriiDiachuk requested a review from peterargue July 26, 2024 12:40
Copy link
Contributor

@peterargue peterargue left a comment

Choose a reason for hiding this comment

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

after adding the test, I think this is ready to go

engine/access/rest/routes/router.go Show resolved Hide resolved
@AndriiDiachuk AndriiDiachuk requested a review from peterargue July 30, 2024 08:58
@peterargue peterargue added this pull request to the merge queue Jul 31, 2024
Merged via the queue into onflow:master with commit f283050 Jul 31, 2024
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Access] Add REST endpoint to get an accounts flow balance
4 participants