Skip to content

Commit

Permalink
fix: allow unrecognized dApp requests
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidsowardx committed Apr 4, 2024
1 parent a6c41bc commit b6b50e0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/chrome/dapp/dapp-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,10 @@ export const ChromeDAppClient = (logger: AppLogger) => {
interactionId: crypto.randomUUID(),
} as ExtensionInteraction)

if (message.interactionId)
sendMessage({
interactionId: message.interactionId,
discriminator: 'failure',
error: 'InvalidDappRequest',
})

logger.error({ reason: 'InvalidDappRequest', message })
if (message.interactionId) {
logger.warn({ reason: 'UnrecognizedDappRequest', message })
return onDappRequest(addOriginToWalletInteraction(message))
}
})
}

Expand Down

0 comments on commit b6b50e0

Please sign in to comment.