Skip to content

Commit

Permalink
fix: get creds promisfy
Browse files Browse the repository at this point in the history
  • Loading branch information
hz002 committed Oct 30, 2024
1 parent 041debb commit 8ffa321
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8ffa321

Please sign in to comment.