Improve pix onramp payment handling#631
Conversation
✅ Deploy Preview for pendulum-pay ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
ebma
left a comment
There was a problem hiding this comment.
Looks good to me overall, cool that only the few changes are necessary to make this work. I suppose you still need to test whether it actually works @gianfra-t?
| if (!(balanceCheckError instanceof Error)) throw balanceCheckError; | ||
| const { message } = balanceCheckError; | ||
|
|
||
| const isCheckTimeout = message.includes('did not meet the limit within the specified time'); |
There was a problem hiding this comment.
This check seems quite brittle to me, any chance we can refactor to make it less reliant on the exact wording of the error message?
There was a problem hiding this comment.
Yes, we can start implementing some better practices and return custom errors probably, not only here but everywhere...
|
@ebma yes only testing, and also removing the entry from the teleport service was missing. I decided to use the quote id instead of the address encoding to have more control over each specific ramp and the associated teleport operation. For testing, well I think the best would be to merge and test on staging a true ramp, I don't think this can be mocked. We just need to be sure we are encoding correctly the reference on the br code. |
Co-authored-by: Marcel Ebert <mail@marcel-ebert.de>
Issue: #620.
Change description
failedstate after 30 minutes.failedone. Additionally, when requesting, a teleport will not be added if existing already in the set.Additional changes
moonebamToPendulumXcmoperation.