Skip to content
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

Merged
merged 3 commits into from
Jan 27, 2023

Conversation

samsiegart
Copy link
Contributor

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.

@samsiegart samsiegart marked this pull request as ready for review January 26, 2023 20:44
Copy link
Member

@turadg turadg left a 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?

@samsiegart
Copy link
Contributor Author

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.

@samsiegart samsiegart added the automerge:squash Automatically squash merge label Jan 27, 2023
@mergify mergify bot merged commit f9a3126 into master Jan 27, 2023
@mergify mergify bot deleted the read-vbank-assets branch January 27, 2023 03:13
@dckc
Copy link
Member

dckc commented Jan 27, 2023

Mocking the query client would be great, I think.

* @param {string} address
* @param {string} rpc
*/
export const queryBankBalances = async (address, rpc) => {
Copy link
Member

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({
Copy link
Member

@dckc dckc Jan 27, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants