diff --git a/libs/wallet-react/src/components/connect-dialog/connection-options.tsx b/libs/wallet-react/src/components/connect-dialog/connection-options.tsx index b0a6fe0a4..45a2fa71f 100644 --- a/libs/wallet-react/src/components/connect-dialog/connection-options.tsx +++ b/libs/wallet-react/src/components/connect-dialog/connection-options.tsx @@ -69,7 +69,8 @@ export const ConnectionOptions = ({ className="text-danger text-sm first-letter:uppercase" data-testid="connection-error" > - {error.message}: {error.data} + {error.message} + {error.data ? `: ${error.data}` : ''}
)} { expect(result).toEqual({ status: 'disconnected' }); expect(config.store.getState()).toMatchObject({ status: 'disconnected', - error: noConnectorError(), current: undefined, keys: [], pubKey: undefined, @@ -130,7 +129,7 @@ describe('refresh keys', () => { it('handles invalid connector', async () => { await config.refreshKeys(); expect(config.store.getState()).toMatchObject({ - error: noConnectorError(), + error: undefined, }); }); diff --git a/libs/wallet/src/wallet.ts b/libs/wallet/src/wallet.ts index af8a0b037..cc287e77c 100644 --- a/libs/wallet/src/wallet.ts +++ b/libs/wallet/src/wallet.ts @@ -143,7 +143,7 @@ export function createConfig(cfg: Config): Wallet { // Only refresh keys if connnected. If you aren't connect when you connect // you will get the latest keys - if (state.status === 'connected') { + if (state.status !== 'connected') { return; }