-
Notifications
You must be signed in to change notification settings - Fork 50
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
feat(swap): Slippage screen #2639
Merged
Merged
Changes from 4 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
961fd66
Add error handling to slippage
michaeljscript 08817b0
Refactor and add styles
michaeljscript e8eec50
Remove unused import
michaeljscript d763d28
Fix lint issues
michaeljscript 1d42d1a
Fix warning
michaeljscript 78c0a4d
Add focus color
michaeljscript 0de6980
Merge branch 'develop' into feat/swap-slippage
michaeljscript c428b4c
Lint file
michaeljscript 545d3b0
Parse using big number
michaeljscript 19d01b2
Fix lint issues
michaeljscript a2322d2
Merge branch 'develop' into feat/swap-slippage
michaeljscript e0c66a5
Merge branch 'develop' into feat/swap-slippage
michaeljscript 47ff547
Fix strings
michaeljscript bfa1be1
Use NumberLocale to display and parse text
michaeljscript 0b7eb70
Format imports
michaeljscript 4e63aad
Remove console log and decimals check
michaeljscript 4ffad15
Remove redundant type
michaeljscript c534d5e
Fix default value
michaeljscript 7a259fc
Use BigNumber to format numbers
michaeljscript 6cf1df4
Use Quantities.denominated
michaeljscript File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 @MichalSzorad can you check to use
intl
number formatter? It might affect these rules. I think @nistadev updated extension.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @stackchain I'll have a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stackchain Would we need a library like this one
d2l-intl
to be able to parse the number?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/Emurgo/yoroi/blob/develop/apps/wallet-mobile/src/i18n/languages.ts#L186
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added parsing using BigNumber, but I don't think we can format the output using BigNumber, can we? Eg when the user types
3.
we do not want to convert the number to 3 and this seems what BigNumber is doingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://emurgo.slack.com/archives/C02M83F3G72/p1693304021549329
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still WIP, as I'm trying to integrate the util made by Jordi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is now integrated @stackchain