Skip to content

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

Merged
lukaw3d merged 7 commits intomasterfrom
lw/precise-reclaim
Aug 3, 2022
Merged

Refactor dispatching transactions so "Reclaim all" doesn't lose more precision#932
lukaw3d merged 7 commits intomasterfrom
lw/precise-reclaim

Conversation

@lukaw3d
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor 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
Copy Markdown
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 lukaw3d force-pushed the lw/precise-reclaim branch from b93a1a6 to ea1fb6e Compare July 13, 2022 22:58
@lukaw3d
Copy link
Copy Markdown
Contributor Author

lukaw3d commented Jul 13, 2022

Oh, we lose precision when parsing from API..

@lukaw3d
Copy link
Copy Markdown
Contributor 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
Copy Markdown
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
@lukaw3d lukaw3d force-pushed the lw/precise-reclaim branch from ea1fb6e to e65f95a Compare July 30, 2022 01:57
@codecov
Copy link
Copy Markdown

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 force-pushed the lw/precise-reclaim branch from e65f95a to 422b4f4 Compare August 2, 2022 23:20
@lukaw3d lukaw3d force-pushed the lw/precise-reclaim branch from 422b4f4 to 2eb4203 Compare August 2, 2022 23:41
@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.

2 participants