-
Notifications
You must be signed in to change notification settings - Fork 206
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 getIssuerForBrand to zoe #1276
Conversation
This looks good. Before merging can we add a unit test and coordinate with @tyg to change the documentation? |
`addPool` returns the secondary token issuers, new liquidity issuers and such.
…k into 1270_getIssuerFromBrand
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 there are some linting errors and we might need to rebase this on master for only the wanted changes to show. Can we also add unit tests for this and coordinate with Tom on updating the documentation?
I don't seem to be able to reply in-line so I'm not sure what lines of code the comments are attached to. I have a lint-fix. Re unit tests, there aren't currently unit tests for the code I copied from ( Re documentation: it's additive. I'll update the PR comment with a doc section. I'm not sure why it didn't offer me a PR template. |
Added a test, @dtribble do you want to take a look at it? I also asked Chris to review |
…k into 1270_getIssuerFromBrand
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.
These look like useful helpers. I'm skeptical about adding a helper for the tests and not invoking it anywhere.
I'm not sure what you mean. |
Thanks, I was looking for |
closes: #1270
This adds
getIssuerForBrand
tozcf
so that contracts can synchronously get issuers for amounts they receive. (We could add one to get it from anAmount
as well.) The also adds type declaration.This also modifies multipool
autoswap
to return the issuers etc. when a pool is added, rather than jut an acknowledgement string.Testing
There is no existing test for
getBrandForIssuer
. The test for this new operation should be added with that. The operation currently gets ad hoc testing because the subsystem tests or dapp-token-economy relies on it.The tests for multipool autoswap were updated are updated to accomodate and test that the new return result returns a record with at least some expected fields.
Documentation
This adds a new operation to ZCF, which should be added to the API documentation site.
This changes the return result of creating a multipool autoswap. The previous return was just a worthless string. Now we can get the issuers, etc. That's not currently documented, but could be extended with that information.