-
Notifications
You must be signed in to change notification settings - Fork 205
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(web-components): read purses from bank instead of smart wallet #6861
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.
I imagine it's not practical right now, but what would it take to have a test that required updating for this change?
I think for the effort to be worth the value we'd want e2e tests with a real local chain running. We could also just mock the queryclient or the follower to return the type of data we expect, but I don't know how much safer that makes us feel. |
Mocking the query client would be great, I think. |
* @param {string} address | ||
* @param {string} rpc | ||
*/ | ||
export const queryBankBalances = async (address, rpc) => { |
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.
another copy of this? same scaling consideration applies. Filed:
const rpcClient = createProtobufRpcClient(queryClient); | ||
const bankQueryService = new QueryClientImpl(rpcClient); | ||
|
||
const { balances } = await bankQueryService.AllBalances({ |
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.
ambient authority concern applies here too.
refs Agoric/wallet-app#49
For now the dapps only care about vbank assets so we can enhance this at a later point to include pure-js purses as well.