diff --git a/src/background/service/keyring/eth-lattice-keyring/eth-lattice-keyring.ts b/src/background/service/keyring/eth-lattice-keyring/eth-lattice-keyring.ts index 2a1e406ca77..578aa223df7 100644 --- a/src/background/service/keyring/eth-lattice-keyring/eth-lattice-keyring.ts +++ b/src/background/service/keyring/eth-lattice-keyring/eth-lattice-keyring.ts @@ -50,14 +50,16 @@ class LatticeKeyring extends OldLatticeKeyring { // send a msg to the render process to open lattice connector // and collect the credentials - const creds = await Browser.runtime.sendMessage({ + const credsResult = await Browser.runtime.sendMessage({ target: OffscreenCommunicationTarget.latticeOffscreen, params: { url, }, - }) - - return creds; + }); + if (credsResult.error) { + throw new Error(credsResult.error); + } + return credsResult.result; } catch (err: any) { throw new Error(err); }