Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Can't catch when a speed up transaction is confirmed #626

Closed
1 of 2 tasks
duyphanz opened this issue Jun 28, 2022 · 6 comments
Closed
1 of 2 tasks

Can't catch when a speed up transaction is confirmed #626

duyphanz opened this issue Jun 28, 2022 · 6 comments
Assignees
Labels
bug Something isn't working front-end

Comments

@duyphanz
Copy link
Collaborator

duyphanz commented Jun 28, 2022

2022_06_27_101108.mp4

Step to reproduce: speed up a transaction from Metamask

  • Actual result: dApp can't catch when the tx is confirmed

ref: web3/web3.js#3585

CHECKLIST:

@duyphanz duyphanz added the bug Something isn't working label Jun 28, 2022
@duyphanz duyphanz added the wip Work in progress label Jun 30, 2022
@duyphanz
Copy link
Collaborator Author

[Updating progress]

The root cause is that BTP Dashboard didn't catch an event when user speeds up their transaction from Metamask

Solutions:

  1. Add an event listener for speeding up a transaction by Metamask API: they have a plan for this API but have not been implemented yet. Reported here
  2. Ethers exposed API for this purpose: https://blog.ricmoo.com/highlights-ethers-js-may-2021-2826e858277d. But it doesn't work on my test, the same problem as: Enable EIP- 2831 Signer transaction.wait() style rejections. ethers-io/ethers.js#1477 (comment)
  3. I'm having a test on this package: https://www.npmjs.com/package/find-replacement-tx

@duyphanz duyphanz self-assigned this Jun 30, 2022
@CyrusVorwald
Copy link
Contributor

This issue also exists for Hana wallet, so please look into it for that as well.

@CyrusVorwald
Copy link
Contributor

CyrusVorwald commented Jul 1, 2022

Also, I would like to know how other bridges get around this issue. Harmony has their own bridge, see https://bridge.harmony.one.

duyphanz pushed a commit that referenced this issue Jul 3, 2022
@duyphanz
Copy link
Collaborator Author

duyphanz commented Jul 3, 2022

This issue also exists for Hana wallet, so please look into it for that as well.

Hi @CyrusVorwald-ICON, can I have a video recording of this issue on Hana? I'd like to see steps to reproduce to notice about the problem clearly, thank you.

duyphanz added a commit that referenced this issue Jul 3, 2022
* feat: check replacement tx

* perf: reduce query token balance

* fix: wrong data

* feat: handle failed tx

* feat: handle error message

* feat: handle general error

* chore: add author

* chore: remove log

* chore: fix lint

* feat: increase icon step limit

* fix: revert .env file

Co-authored-by: Duy Phan <duyphan@orgos.net>
@duyphanz
Copy link
Collaborator Author

duyphanz commented Jul 3, 2022

Hi @CyrusVorwald-ICON, I'm now using a solution from this package (https://www.npmjs.com/package/find-replacement-tx/v/1.2.2) to solve this problem.

The testing video includes 2 parts (1. Cancel a tx, 2. Speedup a tx) here: https://drive.google.com/file/d/1RNBag7_UCXEckfMXsdRLW9BcnKbHplxS/view

Also, I would like to know how other bridges get around this issue. Harmony has their own bridge, see https://bridge.harmony.one/.

I'll need to take a deep look into their public repo here: https://github.com/harmony-one/ethhmy-bridge.frontend/tree/master/src to see how they handled this case. This action might take time, so I'll prioritize solving bug tasks first. But if you wanna prioritize this research, just me know.

@CyrusVorwald CyrusVorwald added this to the ICON Bridge Beta Launch milestone Jul 8, 2022
@duyphanz duyphanz removed the wip Work in progress label Jul 11, 2022
@duyphanz
Copy link
Collaborator Author

duyphanz commented Sep 7, 2022

I'll close this issue, we can open a new issue for Hana with more details if necessary

@duyphanz duyphanz closed this as completed Sep 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working front-end
Projects
None yet
Development

No branches or pull requests

3 participants