-
Notifications
You must be signed in to change notification settings - Fork 15
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
Hotfix: Handle Bridge drains history when no receipt is available #3229
Conversation
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.
These changes all look sensible, nicely done!
The only thing I would suggest, is that if we know we will definitely get the receipt at some point, maybe the wording could be "Receipt not yet available", or if that is too long maybe just "Pending"?
Hey @iamsamgibbs, I've checked in with Mel and updated the copy to "Generating...": ![]() |
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.
Approving this with and offer of trying of reproducing this in production :)
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.
The changes all look like they should solve the issue, so 🤞 they do.
Nice job going into the trenches and solving the issue 💯
Description
Thanks to @Nortsova for alerting me of an issue she ran across when off-ramping her crypto. Once the transfer was picked up by Bridge, the drains history disappeared in the UI as the
bridgeGetDrainsHistory
query started returning an error. After a while, the issue went away and drains history was visible again.I looked through the logs and realised it was trying to read the drain receipt's URL, but it was not available:
Most likely, when a new transfer is created, the receipt is not available immediately but only after a few minutes or so.
This PR changes the
getDrainsHistory
handler to gracefully handle a case where there's no receipt as well as introduces an extra state in the UI.Testing
I could not test it even when connected to prod, it's an intermittent issue that only reproduces under the right circumstances.
I attached all the investigation details above in a hope this justifies my fixes.
Also, here's a screenshot from local dev connected to Bridge prod, just to prove the drains history still works:
![image](https://private-user-images.githubusercontent.com/112586815/372261994-02b5cf1d-0be9-409e-a16c-5233b4f9e063.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MTkxNDAsIm5iZiI6MTczODgxODg0MCwicGF0aCI6Ii8xMTI1ODY4MTUvMzcyMjYxOTk0LTAyYjVjZjFkLTBiZTktNDA5ZS1hMTZjLTUyMzNiNGY5ZTA2My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwNlQwNTE0MDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wN2Q2ZGQ1ODZlMjQ3MzllODBkN2VlYmM5M2FiZWM3MGE4OTYxYjI4M2MzNmJiNDYwMTEwMjE5ZDQyMTViZWU1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.vP-JE_RckFMaJ75NzetqhvZ_9iz5kbPU7xjHEJR8mxU)