Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

account balance fix #507

Merged
merged 7 commits into from
Sep 9, 2020
Merged

account balance fix #507

merged 7 commits into from
Sep 9, 2020

Conversation

fedekunze
Copy link
Contributor

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@fedekunze fedekunze requested a review from noot as a code owner September 9, 2020 13:25
@codecov
Copy link

codecov bot commented Sep 9, 2020

Codecov Report

Merging #507 into development will increase coverage by 0.49%.
The diff coverage is 95.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #507      +/-   ##
===============================================
+ Coverage        71.94%   72.43%   +0.49%     
===============================================
  Files               41       41              
  Lines             2709     2714       +5     
===============================================
+ Hits              1949     1966      +17     
+ Misses             619      606      -13     
- Partials           141      142       +1     
Impacted Files Coverage Δ
types/account.go 82.65% <85.71%> (+12.24%) ⬆️
x/evm/types/journal.go 85.95% <100.00%> (+0.23%) ⬆️
x/evm/types/state_object.go 85.10% <100.00%> (+0.16%) ⬆️
x/evm/types/statedb.go 89.73% <100.00%> (+0.02%) ⬆️

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 5a29e80...dcc4f5f. Read the comment docs.

case diff.IsNegative():
// Decrease coins to amount
coins = coins.Sub(sdk.NewCoins(NewPhotonCoin(diff.Neg())))
coins = coins.Sub(sdk.NewCoins(sdk.NewCoin(denom, diff.Neg())))
Copy link
Contributor

Choose a reason for hiding this comment

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

is the sdk.NewCoins necessary here? the add case doesn't have it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, idk the reason of the inconsistency on the SDK. The Add function has a spread parameter while the Sub doesn't

Copy link
Contributor

Choose a reason for hiding this comment

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

weird 🤔 okay

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah lol

@fedekunze fedekunze merged commit 44876ac into development Sep 9, 2020
@fedekunze fedekunze deleted the fedekunze/account-fix branch September 9, 2020 13:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants