Agoric / ui-kit

Components and tools for building graphical UIs
https://ui-kit-dwm.pages.dev/
Apache License 2.0
3 stars 3 forks source link

feat(web-components): surface wallet connection rpc errors #66

Closed samsiegart closed 9 months ago

samsiegart commented 9 months ago

refs https://github.com/Agoric/agoric-sdk/issues/8505

We improved error handling to the chainStorageWatcher in https://github.com/Agoric/ui-kit/pull/65, but the makeAgoricWalletConnection component uses the RPC endpoint rather than the API endpoint, and doesn't surface errors conveniently when queries fail. This adds an onRpcError parameter so that clients can respond accordingly when the RPC node is failing.

Also, made it only call await Tendermint34Client.connect(rpc) once instead of every time it queries the bank. This removes an extra round trip to reduce load on the RPC node. Also added up to 2 retries around queryBank because the tendermint client doesn't do any retries on its own.