Skip to content

Commit

Permalink
πŸ› FIX: don't emit another request when it's an authorize action
Browse files Browse the repository at this point in the history
  • Loading branch information
riverrun46 committed Sep 27, 2023
1 parent aab8b62 commit aef0f93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/content-script/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const callMetalet = async (params: MetaletParams) => {
try {
await tryCall(params)
} catch (e: any) {
// If the error comes from timeout, we try again
if (e.message.includes('Could not establish connection.')) {
// If the error comes from timeout and it's a query action, we try again
if (e.message.includes('Could not establish connection.') && params.action.includes('query')) {
setTimeout(async () => {
await tryCall(params)
}, 1000)
Expand Down

0 comments on commit aef0f93

Please sign in to comment.