docs
docs copied to clipboard
Coinbase - Error when swapping ETH without enough funds to cover gas
My engineering team here at Coinbase is receiving the below error. Could we get this fixed?
Steps to reproduce:
- Go to Uniswap
- Swap some Eth but without enough funds to cover gas
- Hit Cancel on the transaction sign confirmation
Swap failed: [object object]
The code snippet how we send the error to the dapp. The response object has a field named errorMessage that has the error string
const { id, ...rest } = response; constresp = JSON.stringify( { type:'WEB3_RESPONSE', id, response:rest, } ); // Notify CipherProvider when we get a response back. // https://github.cbhq.net/wallet/wallet-mobile/blob/master/libs/cipher-web-view/src/CipherProviderWalletLinkRelay.ts#L117 constjs = ``window.CipherProvider.respond(${resp});``; webViewRef.current?.injectJavaScript(js);