nomad-xyz / nomad-monorepo

Contracts, off-chain agents, and libraries for Nomad
https://nomad.xyz
77 stars 16 forks source link

Improve UX for replaced txs #222

Closed fedekunze closed 2 years ago

fedekunze commented 2 years ago

I replaced a tx using Nomad while sending USDC to Evmos. The UI displayed an error and couldn't find the transaction

Screen Shot 2022-05-15 at 3 33 54 PM

Error msg below:

transaction was replaced [ See: https://links.ethers.org/v5-errors-TRANSACTION_REPLACED ] (cancelled=false, reason="repriced", replacement={"hash":"0x95f172b94ce5f30165c4548d90c065771f64ce623ff90911a127254f059d6043","type":2,"accessList":[],"blockHash":"0xe777d89b6b5fa6a5390d405234c275a57439ec17a91e95f02a2016d4f17affa6","blockNumber":14780229,"transactionIndex":159,"confirmations":2,"from":"0x57404015B5b7ba7b8aF4EB1464182f9cbB3a9ea5","gasPrice":{"type":"BigNumber","hex":"0x07d78dbcc4"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x59682f00"},"maxFeePerGas":{"type":"BigNumber","hex":"0x08c4a36f22"},"gasLimit":{"type":"BigNumber","hex":"0xec14"},"to":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","value":{"type":"BigNumber","hex":"0x00"},"nonce":0,"data":"0x095ea7b300000000000000000000000088a69b4e698a4b090df6cf5bd7b2d47325ad30a300000000000000000000000000000000000000000000000000000003d01aa8f0","r":"0x2580cdb013723b935f190344e724a8820fd1c2d948b4f3898c699532e5ad63ec","s":"0x0ac19454b213d1c8cb61480b5c4ad71710cd9bba510f00d2f529babe43157bcc","v":1,"creates":null,"chainId":1}, hash="0x5e4d05ad07aaa12976596f4573c549f8967010b38e0e133377bbf3a3554cc49b", receipt={"to":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","from":"0x57404015B5b7ba7b8aF4EB1464182f9cbB3a9ea5","contractAddress":null,"transactionIndex":159,"gasUsed":{"type":"BigNumber","hex":"0xea53"},"logsBloom":"0x00000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000101000000000000000000000200000000000000000000008000800000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000020000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000800000000000000000000000000000000","blockHash":"0xe777d89b6b5fa6a5390d405234c275a57439ec17a91e95f02a2016d4f17affa6","transactionHash":"0x95f172b94ce5f30165c4548d90c065771f64ce623ff90911a127254f059d6043","logs":[{"transactionIndex":159,"blockNumber":14780229,"transactionHash":"0x95f172b94ce5f30165c4548d90c065771f64ce623ff90911a127254f059d6043","address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","topics":["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925","0x00000000000000000000000057404015b5b7ba7b8af4eb1464182f9cbb3a9ea5","0x00000000000000000000000088a69b4e698a4b090df6cf5bd7b2d47325ad30a3"],"data":"0x00000000000000000000000000000000000000000000000000000003d01aa8f0","logIndex":302,"blockHash":"0xe777d89b6b5fa6a5390d405234c275a57439ec17a91e95f02a2016d4f17affa6"}],"blockNumber":14780229,"confirmations":2,"cumulativeGasUsed":{"type":"BigNumber","hex":"0xae4dbc"},"effectiveGasPrice":{"type":"BigNumber","hex":"0x07d78dbcc4"},"status":1,"type":2,"byzantium":true}, code=TRANSACTION_REPLACED, version=providers/5.6.4)