-
Notifications
You must be signed in to change notification settings - Fork 208
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
fix: make it possible to set decimalPlaces when calling startPSM #6348
Conversation
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.
regression test pretty please
@@ -79,11 +79,19 @@ export const startPSM = async ( | |||
E(E(zoe).getInvitationIssuer()).getAmountOf(poserInvitationP), | |||
]); | |||
|
|||
const [anchorInfo, stableInfo] = await 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.
s/stable/minted
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.
okay. It starts from STABLE.symbol
, but I'll rename it locally.
@@ -79,11 +79,19 @@ export const startPSM = async ( | |||
E(E(zoe).getInvitationIssuer()).getAmountOf(poserInvitationP), | |||
]); | |||
|
|||
const [anchorInfo, stableInfo] = await Promise.all( | |||
[anchorBrand, stable].map(b => E(b).getDisplayInfo()), |
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.
consider a note about why "display" info is reliable for this use case
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 don't have an answer for that. Can you write something that would justify it?
experience with #6187 makes that look particularly challenging. I can't find any way to diagnose why it works on my desktop and not in ci. |
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 managed to test this end-to-end, locally.
* fix: make it possible to set decimalPlaces when calling startPSM * fix: makeRatio wants bigInt * chore: type cleanup and provisioning permit * chore: some tests don't have defaults for anchor decimalPlaces * chore: rename stable token in startPSM to `minted` * fix(agoric-cli): look up correct brand for PSM trade * chore: ignore missing type for pair Co-authored-by: Dan Connolly <connolly@agoric.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…) (#6357) * fix: make it possible to set decimalPlaces when calling startPSM * fix: makeRatio wants bigInt * chore: type cleanup and provisioning permit * chore: some tests don't have defaults for anchor decimalPlaces * chore: rename stable token in startPSM to `minted` * fix(agoric-cli): look up correct brand for PSM trade * chore: ignore missing type for pair Co-authored-by: Dan Connolly <connolly@agoric.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Dan Connolly <connolly@agoric.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
closes: #6337
Description
startPSM wasn't setting decimals when creating a new trading pair.
Also,
gov-add-psm.js
had the wrong keywords in its config.Security Considerations
None.
Documentation Considerations
None
Testing Considerations
Manual