-
Notifications
You must be signed in to change notification settings - Fork 228
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
BREAKING CHANGE: remove old amountMath #2894
Conversation
b74a863
to
f6dbb33
Compare
5979e05
to
963a8a1
Compare
@erights, I think the majority of the review is for you but @michaelfig could you check on the wallet and any other code you're the owner for? And @FUDCo I made some changes to swingset-runner tests. Thanks! |
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.
The changes to the swingset-runner tests look fine. Overall, very tidy for something that touches so many files. The cleanerness (is that a word?) of the new API really comes through when you look at all the diffs.
Adding @Chris-Hibbert to take over part or all of @erights's review. @Chris-Hibbert, can you check ERTP and Zoe especially? Thanks! |
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.
one tiny cleanup, and one oversight. Looks good!
|
||
const result = await Promise.all([emptyPurseMadeP, localAmountMathSavedP]); | ||
const result = await emptyPurseMadeP; |
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.
might as well get rid of emptyPurseMadeP, and await
makeEmptyPurse()
. Actually, can't the log message go before the await, and this can just return the awaited
value?
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.
Yup, I think that's right
const { offer } = makeOfferAndFindInvitationAmount( | ||
walletAdmin, | ||
zoe, | ||
zoeInvitationPurse, | ||
getLocalAmountMath, | ||
invitationMath, | ||
invitationBrand, |
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.
It doesn't look like brand
was added to makeOfferAndFindInvitationAmount
.
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.
good catch!
e53ccb4
to
a44edb1
Compare
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.
WIP 21/50 reviewed
@@ -166,7 +166,7 @@ test('lib-wallet issuer and purse methods', async t => { | |||
const moolaPurse = wallet.getPurse('fun money'); | |||
t.deepEqual( | |||
await moolaPurse.getCurrentAmount(), | |||
moolaBundle.amountMath.getEmpty(), | |||
amountMath.makeEmpty(moolaBundle.brand, MathKind.NAT), |
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.
Minor: This code would be easier to manage if the brands were pulled out into their own variables?
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 that's out of scope for this PR, and also it's a test so refactoring is probably lower priority.
packages/deploy-script-support/test/unitTests/test-findInvitationAmount.js
Outdated
Show resolved
Hide resolved
0c49ca9
to
fa884ba
Compare
Merging is blocked by removing the old amountMath in the dapps (#2603), but we can still get it reviewed.