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

remove addtional error check on smart-wallet #51

Closed WietzeSlagman closed 6 months ago

WietzeSlagman commented 10 months ago

closes: #50 refs: #42

Description

Ensure that the chainStorageWatcher does not throw when there is no smart-wallet present.

Initial fix with additional checks in #42 no longer works, most likely due to updated wallet factory?

Security Considerations

Assuming an error with !lastPaths is always going to be a smart-wallet not provisioned

Scaling Considerations

Documentation Considerations

Testing Considerations

Tests still pass

samsiegart commented 10 months ago

What type of error are you observing now (that differs from the one it checks)? I'm not sure if the error changed because app.inter.trade and psm.inter.trade still function properly.

samsiegart commented 6 months ago

This should be fixed now. We removed the error callback on watchLatest and changed the chain storage watcher to emit an undefined value for vstorage paths with no data instead of giving back an error. Now we just check if the value is missing to know if the smart wallet exists. Other types of errors, like network/500-errors when doing queries, are now surfaced in the error callback passed to makeAgoricChainStorageWatcher.