Retry withdrawal if it's still valid and possible - #4766
Merged
Conversation
Rely on transactor response codes being correct and retry a withdrawal if it failed but the request itself was valid. While retrying a few times for 5 minutes, doesn't completely solve our issue, this and the previous withdrawal PR should remedy 90% or more of the withdrawal problems being reported. Solving this completely is rather difficult because we would have to somehow track this promise and make sure we're resending it, but as it's mentioned in the comment block in code, sending a settlement after 5 minutes will produce different results then shown in the UI as fees will change and sometimes they will change dramatically. Small issue which was not resolved yet: Every other withdrawal might fail with no money being transferred. That is because we've stopped lying to the UI and actually report failures now.
tomasmik
requested review from
Waldz,
mdomasevicius and
tadaskay
as code owners
February 10, 2022 14:35
Guillembonet
approved these changes
Feb 10, 2022
Codecov Report
@@ Coverage Diff @@
## master #4766 +/- ##
==========================================
- Coverage 39.33% 39.20% -0.14%
==========================================
Files 356 356
Lines 19048 19084 +36
==========================================
- Hits 7492 7481 -11
- Misses 10837 10884 +47
Partials 719 719
Continue to review full report at Codecov.
|
Snawoot
approved these changes
Feb 10, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rely on transactor response codes being correct and retry
a withdrawal if it failed but the request itself was valid.
While retrying a few times for 5 minutes, doesn't completely solve our
issue, this and the previous withdrawal PR should remedy 90% or more of
the withdrawal problems being reported.
Solving this completely is rather difficult because money is actually
first taken from a provider and a payment promise is issued which has to be
settled with transactor we would have to somehow track this promise
and make sure we're resending it, but as it's mentioned in the comment
block in code, sending a settlement after 5 minutes will produce different
results then shown in the UI as fees will change and sometimes they will change dramatically.
Small issue which was not resolved yet: Every other withdrawal might
fail with no money being transferred to beneficiary or taken from provider. That is because we've stopped
lying to the UI and actually report failures now. This is not a huge deal as no real value transfer occurs.
Closes: #4631