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.
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: add NIM - CRC swap #502
base: master
Are you sure you want to change the base?
feat: add NIM - CRC swap #502
Changes from 1 commit
eefcb03
c31d7a9
f79c400
cb20092
b6ebfd4
3565cb4
d0fbade
9533950
c337d49
2fab399
653c15d
02ec1a9
c5a352b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Historically, CRC did in fact have cents but those are not in circulation anymore. Are the amounts in request types in CRC cents or CRC? Until seeing this line, I assumed CRC, but in any case, a comment should be added in
PublicRequest
to clarify this.Are fractional CRC amounts also displayed in the UI? In that case, I don't think we should do so, except for exchange rates.
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.
When we added the wallet exchange logic, all Oasis fiat was in EUR. Now the wallet uses multiple / 100 conversions from cents to coins. See here for an example.
To keep things simple in the Wallet PR, I used 2 decimal places for the CRC, which Jeff confirmed is valid, though less common. This gives us more precision and is still a correct format while keeping the PR as simple as possible without breaking changes for EUR swaps.
Let me know your thoughts on this trade-off.
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 think, these should be combined with
EuroUtils
intoFiatUtils
, in a similar fashion as theCryptoUtils
, which are also not individual utils for each crypto asset, or if they are, they provide more utilities specific to that crypto.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.
We already have all the assets under
CryptoUtils
(both fiat and crypto). Maybe theCryptoUtils
name is not the best, but renaming the class should be another PR?