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

web-components: pursesNotifier updates when no purses have changed #85

Open samsiegart opened 8 months ago

samsiegart commented 8 months ago

Describe the bug

When using the purses notifier from makeAgoricWalletConnection, it will notify updates intermittently even when no purses have changed. This is because it queries the bank periodically, and doesn't check if the actual results have changed or not since the last query, always triggering a new update.

This is problematic because it can lead to unnecessary re-renders in clients. It should check if the bank value is new before updating.

Note it also uses a chain storage watcher to watch vstorage for other non-bank purses, but this only updates when the values are new, so it's not part of the problem.