You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
Problem:
When a user triggers speed-up-a-tx or cancel-a-tx option in metamask, d0x dapps using this module are unable to detect the new state and hence all UI elements keep listening to old tx forever (until it's out of mempool?), practically requiring localstorage cleanup on user side.
Solution:
I've spent some time researching d0x modules related to the issue, and found out it's best to address it in this module in ::watch-events as a hash-replacing fn.
On web3 side the issue is well-known and being worked on (web3/web3.js#3585 (comment)), however as of now there is no separate event that web3 provider can notify us of (e.g. original tx hash listener resolving with failure).
I looked for existing solutions, IMO gnosis handled it nicely via https://github.com/gnosis/safe-react/pull/2473/files, there is this findSpeedupTx function that I started to implement; basically what it does is search pending block for tx by same nonce + sender and input data (if input data diverges it's a replacement tx, not a speed-up).
tl;dr working on adding a findSpeedupTx fn to tx-watcher in this module to detect speed-up + replacement tx, based on a gnosis PR
The text was updated successfully, but these errors were encountered:
Problem:
When a user triggers
speed-up-a-tx
orcancel-a-tx
option in metamask, d0x dapps using this module are unable to detect the new state and hence all UI elements keep listening to old tx forever (until it's out of mempool?), practically requiring localstorage cleanup on user side.Solution:
I've spent some time researching d0x modules related to the issue, and found out it's best to address it in this module in
::watch-events
as a hash-replacing fn.On web3 side the issue is well-known and being worked on (web3/web3.js#3585 (comment)), however as of now there is no separate event that web3 provider can notify us of (e.g. original tx hash listener resolving with failure).
I looked for existing solutions, IMO gnosis handled it nicely via https://github.com/gnosis/safe-react/pull/2473/files, there is this
findSpeedupTx
function that I started to implement; basically what it does is search pending block for tx by same nonce + sender and input data (if input data diverges it's a replacement tx, not a speed-up).tl;dr
working on adding afindSpeedupTx
fn to tx-watcher in this module to detect speed-up + replacement tx, based on a gnosis PRThe text was updated successfully, but these errors were encountered: