-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ecoBridge infinite loop #1628
Conversation
✅ Deploy Preview for swapr ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Tested and: USDC from Ethereum to Arbitrum (Socket) ✅ USDC from Gnosis to Polygon ❌ On Swapr it shows as if the bridge failed: But on socketscan it shows that it's still in progress: USDC from Ethereum to Gnosis (OmniBridge) ❌ When user clicks on the "Collect" option, they receive the following error message: Also another thing I noticed: the status "failed" does not change, even when you go to check the transaction id status "bridge in progress" and even when "Bridge successful" on Swapr, it appears in the status "failed". |
I made a transaction from Gnosis to Ethereum (Connext) and couldn't claim it on Ethereum. Don't know if this is fixed in this PR :) |
Hey, This PR should have fixed it. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo Socket has a bug on /bridge-status endpoint. When I bridged XDAI to USDC from Gnosis to Polygon I got this: The reason why status becomes 'Failed' is because /bridge-status endpoint returns 500 if called right after initiating bridging (which indicates some kind of bug). Few seconds later same call returns correct result. My suggestion for fixing this:
I'll add a commit with this briefly |
…ev/swapr-dapp into 1626/fix/ecoBridge-infinite-loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@@ -44,6 +44,13 @@ const createSelectPendingTransactions = (selectOwnedTxs: ReturnType<typeof creat | |||
return pendingTxs | |||
}) | |||
|
|||
const createSelectFailedTransactions = (selectOwnedTxs: ReturnType<typeof createSelectOwnedTransactions>) => | |||
createSelector(selectOwnedTxs, ownedTxs => { | |||
const failedTxs = ownedTxs.filter(tx => tx.status === SocketTxStatus.ERROR && !tx.partnerTxHash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be wrong, but it should be ||
instead no?
Summary
Fixes #1626
I think
_activeBridge
check was introduced to improve logging when error happends but it occured to be the error 🐛