-
Notifications
You must be signed in to change notification settings - Fork 54
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: use sdk.Dec for quantities #168
Conversation
also add test for decimal quantity
instead use Escrow type
also split files
having performance issue, need to solve it afterward
Please let me know when it ready for review |
@crypin It's now ready |
} else if amtInDiff.IsNegative() { // sanity check | ||
//panic(amtInDiff) | ||
panic(amtInDiff) |
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 this part is likely to happen, I will share the detailed scenario again as soon as it is sorted out
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.
Sure!
Merging this PR and the remaining issues will be handled in separate issues. |
Description
Use
sdk.Dec
instead ofsdk.Int
(alsosdk.DecCoin
instead ofsdk.Coin
) in x/exchange. This will reduce errors caused by decimal truncation.Tasks
QueueSendCoins
andExecuteSendCoins
, instead use newEscrow
type