Skip to content

Commit

Permalink
chore: clean up outdated todos
Browse files Browse the repository at this point in the history
- whether an address is parsable or not is not a consideration for the vstorage story (#9066)
- instead, this should be interpreted as an unexpected error if this path is reached
- throwing here would not solve much - this is a notifier divorced from the callsite. instead,
- the caller will experience an error when they try and use UNPARSABLE_CHAIN_ADDRESS
  • Loading branch information
0xpatrickdev committed Jul 31, 2024
1 parent fd2b352 commit c9adf32
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/orchestration/src/exos/chain-account-kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@ export const prepareChainAccountKit = (zone, { watch, asVow }) =>
this.state.connection = connection;
this.state.remoteAddress = remoteAddr;
this.state.localAddress = localAddr;
const address = findAddressField(remoteAddr);
if (!address) {
console.error('⚠️ failed to parse chain address', remoteAddr);
}
this.state.chainAddress = harden({
// FIXME need a fallback value like icacontroller-1-connection-1 if this fails
// https://github.com/Agoric/agoric-sdk/issues/9066
value: findAddressField(remoteAddr) || UNPARSABLE_CHAIN_ADDRESS,
value: address || UNPARSABLE_CHAIN_ADDRESS,
chainId: this.state.chainId,
encoding: 'bech32',
});
Expand Down

0 comments on commit c9adf32

Please sign in to comment.