Commit 2c588ba2 authored by OptimismBot's avatar OptimismBot Committed by GitHub

Merge pull request #5502 from ethereum-optimism/harry/FE-1002

FE-1002: supportsTokenPair should return false whenever the check catches an error
parents ea6dec5e d58c0f1e
......@@ -187,13 +187,12 @@ export class StandardBridgeAdapter implements IBridgeAdapter {
// exception then we assume that the token is not supported. Other errors are thrown. Since
// the JSON-RPC API is not well-specified, we need to handle multiple possible error codes.
if (
err.message.toString().includes('CALL_EXCEPTION') ||
err.stack.toString().includes('execution reverted')
!err?.message?.toString().includes('CALL_EXCEPTION') &&
!err?.stack?.toString().includes('execution reverted')
) {
return false
} else {
throw err
console.error('Unexpected error when checking bridge', err)
}
return false
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment