-
Notifications
You must be signed in to change notification settings - Fork 191
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
9220 deprecate getDisplayInfo #9221
base: master
Are you sure you want to change the base?
Conversation
E(issuer).getDisplayInfo(), | ||
E(issuer).makeEmptyPurse(), | ||
]); | ||
const [purse] = await Promise.all([E(issuer).makeEmptyPurse()]); |
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.
const [purse] = await Promise.all([E(issuer).makeEmptyPurse()]); | |
const [purse] = await E(issuer).makeEmptyPurse(); |
I doubt there is ever any point to a singleton call to Promise.all
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.
yeah, this was just a draft. I'm looking for feedback on the approach and consequences. wrt syntax,
const [purse] = await Promise.all([E(issuer).makeEmptyPurse()]); | |
const purse = await E(issuer).makeEmptyPurse(); |
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 like the overall approach. I love that you moved the ERTP types, with comments, from types.js to types.d.ts. typedoc FTW!
Beyond that, I like all the changes outside ERTP, including the FIXME question. I'm curious about the answer. Because I'm not sure that deprecating brand.getDisplayInfo()
is the right thing to do. But I find it plausible.
I recommend proceeding forward. 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.
I doubt there is ever any point to a singleton call to Promise.all
I think of it as akin to the dangling comma on single-argument method calls, i.e. to reduce churn in formatting in places were there were multiple operands, and might be again. Do people believe that automated reformatting makes that concern moot?
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.
moot enough, yes. The only remaining gotcha is git's text-line based diff and merge algorithms. But IMO we should not distort our programs too much to accommodate these algos being at the wrong abstraction level. Focus on the human reader/reviewer first.
issuerP, | ||
E(brand).getDisplayInfo(), | ||
]); | ||
const [issuer] = await Promise.all([issuerP]); |
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.
const [issuer] = await Promise.all([issuerP]); | |
const issuer = await issuerP; |
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'm in favor of dropping decimalPlaces from Brands.
}; | ||
/** |
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.
Is the lack of blank lines between def'ns intentional?
}; | |
/** | |
}; | |
/** |
@@ -470,6 +470,7 @@ export const prepareAuctionBook = (baggage, zcf, makeRecorderKit) => { | |||
trace('observing'); | |||
|
|||
void E.when( | |||
// FIXME can this work without decimalPlaces? if so, read from boardAux |
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 doesn't need decimalPlaces, but would need some scaling factor to replace it. It could use BASIS_POINTS or MILLIONS instead. It just needs something so the resolution of the response is at least nominal. Asking for price quotes on Satoshis or smallest fraction of BLD wouldn't be workable.
@@ -171,6 +171,7 @@ export const registerScaledPriceAuthority = async ( | |||
]), | |||
]); | |||
|
|||
// FIXME can this work without decimalPlaces? if so, read from boardAux |
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 suspect this usage requires decimalPlaces
. (cc @michaelfig)
// FIXME can this work without decimalPlaces? if so, read from boardAux
This seems backwards. If it can work w/o dp, then it should. If it can't, then it needs an alternative source like boardAux.
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 my description of "unit amounts" as decimalPlaces
is causing confusion. I wrote that description when the only source of "unit amount" information was getDisplayInfo().decimalPlaces
. The code below can be made to work without getDisplayInfo()
, if some alternative like boardAux
conveys the same information. But the functionality provided by the code needs some source of "unit amounts".
@@ -171,6 +171,7 @@ export const registerScaledPriceAuthority = async ( | |||
]), | |||
]); | |||
|
|||
// FIXME can this work without decimalPlaces? if so, read from boardAux |
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 my description of "unit amounts" as decimalPlaces
is causing confusion. I wrote that description when the only source of "unit amount" information was getDisplayInfo().decimalPlaces
. The code below can be made to work without getDisplayInfo()
, if some alternative like boardAux
conveys the same information. But the functionality provided by the code needs some source of "unit amounts".
@@ -171,6 +171,7 @@ export const registerScaledPriceAuthority = async ( | |||
]), | |||
]); | |||
|
|||
// FIXME can this work without decimalPlaces? if so, read from boardAux | |||
// We need "unit amounts" of each brand in order to get the ratios right. You | |||
// can ignore decimalPlaces when adding and subtracting a brand with itself, |
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.
// can ignore decimalPlaces when adding and subtracting a brand with itself, | |
// can ignore "unit amounts" when adding and subtracting a brand with itself, |
closes: #9220
Description
Security Considerations
Scaling Considerations
Documentation Considerations
Testing Considerations
Upgrade Considerations