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

Refactor dispatching transactions so "Reclaim all" doesn't lose more precision #932

Merged
merged 7 commits into from
Aug 3, 2022

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Jul 13, 2022

No description provided.

@lukaw3d lukaw3d requested a review from buberdds July 13, 2022 22:47
Comment on lines 63 to 64
amount: props.maxAmount,
shares: props.shares,
Copy link
Member Author

Choose a reason for hiding this comment

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

No rounding 🎉

@lukaw3d lukaw3d mentioned this pull request Jul 13, 2022
@github-actions

This comment was marked as resolved.

@pro-wh
Copy link
Contributor

pro-wh commented Jul 13, 2022

  • could you add a test for 9,999,999,999,999,999,999 shares (one less than the total supply in nano rose)
  • the APIs these come from, they all round, don't they?

@lukaw3d
Copy link
Member Author

lukaw3d commented Jul 13, 2022

Oh, we lose precision when parsing from API..

@lukaw3d
Copy link
Member Author

lukaw3d commented Jul 13, 2022

Will revisit in another year.

@lukaw3d lukaw3d changed the title Refactor dispatching transactions so "Reclaim all" keeps full precision Refactor dispatching transactions so "Reclaim all" doesn't lose more precision Jul 13, 2022
Copy link
Contributor

@pro-wh pro-wh left a comment

Choose a reason for hiding this comment

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

yea

Base automatically changed from lw/reclaim-all to master July 30, 2022 01:50
@codecov
Copy link

codecov bot commented Jul 30, 2022

Codecov Report

Merging #932 (2eb4203) into master (381f7e6) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #932      +/-   ##
==========================================
- Coverage   88.32%   88.31%   -0.01%     
==========================================
  Files          97       97              
  Lines        1679     1678       -1     
  Branches      387      387              
==========================================
- Hits         1483     1482       -1     
  Misses        196      196              
Flag Coverage Δ
cypress 58.17% <75.00%> (+0.03%) ⬆️
jest 79.28% <100.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
src/app/components/AddEscrowForm/index.tsx 92.30% <ø> (ø)
src/app/components/TransactionPreview/index.tsx 83.33% <ø> (ø)
...ges/AccountPage/Features/SendTransaction/index.tsx 92.59% <ø> (ø)
...ingPage/Features/DelegationList/DelegationItem.tsx 90.90% <ø> (ø)
src/app/components/ReclaimEscrowForm/index.tsx 100.00% <100.00%> (ø)
src/app/lib/helpers.ts 72.97% <100.00%> (ø)
src/app/state/transaction/saga.ts 74.74% <100.00%> (ø)

@lukaw3d lukaw3d merged commit 454e19f into master Aug 3, 2022
@lukaw3d lukaw3d deleted the lw/precise-reclaim branch August 3, 2022 03:05
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.

None yet

2 participants