Skip to content
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

Cap retry attempts for tipping fee #14386

Closed
Miyayes opened this issue Feb 26, 2021 · 1 comment · Fixed by brave/brave-core#8446
Closed

Cap retry attempts for tipping fee #14386

Miyayes opened this issue Feb 26, 2021 · 1 comment · Fixed by brave/brave-core#8446

Comments

@Miyayes
Copy link
Collaborator

Miyayes commented Feb 26, 2021

Description

If a one-time tip succeeds but the 5% fee portion fails, the browser retries the fee portion repeatedly. We should limit these retries to 3 times per browser session.

Note: The fee portion is only sent if the original tip is successful. If the main tip portion is not successful, then the fee portion is never triggered.

Steps to Reproduce

  1. Make a tip so that the main tip portion is successful, but the fee portion fails.
  2. Check retry attempts for the fee portion.

Actual result:

Observe that the retries keep going every 45 seconds to a minute.

Expected result:

Should only retry up to 3 times per browser session.

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Apr 16, 2021

Verification passed on


Brave | 1.24.65 Chromium: 90.0.4430.72 (Official Build) dev (64-bit)
-- | --
Revision | b6172ef8d07ef486489a4b11b66b2eaeed50d132-refs/branch-heads/4430@{#1233}
OS | Windows 10 OS Version 2004 (Build 19041.867)


[5868:19304:0416/173222.878:VERBOSE1:uphold.cc(247)] Uphold transfer fee timer set for 138 s
  • Ensured Transaction fee failed, retrying logs is shown thrice in logs when the internet is disconnected
[5868:19304:0416/173440.890:INFO:uphold.cc(261)] Transaction fee failed, retrying
[5868:19304:0416/173538.892:INFO:uphold.cc(261)] Transaction fee failed, retrying
[5868:19304:0416/173540.908:INFO:uphold.cc(265)] Transaction fee failed, no remaining attempts this session

  • Ensured that transaction fee is processed when the internet is re-connected
[ REQUEST ]
> URL: https://api-sandbox.uphold.com/v0/me/cards/........../transactions
> Method: UrlMethod::POST
> Content: {"denomination":{"amount":"0.050000","currency":"BAT"},"destination":"..........","message":"5% transaction fee collected by Brave Software International"}
> Content Type: application/json; charset=utf-8
[17348:8856:0416/174307.712:VERBOSE5:ledger_impl.cc(144)]
[ REQUEST ]


[ RESPONSE - OnRequest ]
> Url: https://api-sandbox.uphold.com/v0/me/cards/........../transactions
> Result: Success
> HTTP Code: 202
> Body: {"createdAt":"2021-04-16T12:13:08.069Z","denomination":{"amount":"0.05",.....


Verified PASSED on 1.24.76, Chromium 90.0.4430.85 using Android 9, Google Pixel XL, arm64.

2021-04-30 13:05:26.946 11173-11173/? V/chromium: [VERBOSE1:uphold.cc(247)] Uphold transfer fee timer set for 24 s

  • Ensured Transaction fee failed, retrying logs is shown thrice in logs when the internet is disconnected
2021-04-30 13:05:50.998 11173-11173/? I/chromium: [INFO:uphold.cc(261)] Transaction fee failed, retrying
2021-04-30 13:05:50.998 11173-11173/? V/chromium: [VERBOSE1:uphold.cc(247)] Uphold transfer fee timer set for 7 s
2021-04-30 13:05:58.055 11173-11173/? I/chromium: [INFO:uphold.cc(261)] Transaction fee failed, retrying
2021-04-30 13:05:58.055 11173-11173/? V/chromium: [VERBOSE1:uphold.cc(247)] Uphold transfer fee timer set for 72 s
2021-04-30 13:07:10.114 11173-11173/? I/chromium: [INFO:uphold.cc(265)] Transaction fee failed, no remaining attempts this session
  • Ensured that transaction fee is processed when the internet is re-connected
  [ REQUEST ]
    > URL: https://api-sandbox.uphold.com/v0/me/cards/373ab929-0607-4fbc-b83b-80fd78e06932/transactions
    > Method: UrlMethod::POST
    > Content: {"denomination":{"amount":"0.050000","currency":"BAT"},"destination":"1b2b466f-5c15-49bf-995e-c91777d3da93","message":"5% transaction fee collected by Brave Software International"}
    > Content Type: application/json; charset=utf-8
2021-04-30 13:08:39.877 11937-11937/? V/chromium: [VERBOSE6:logging_util.cc(136)] 
    [ RESPONSE - OnRequest ]
    > Url: https://api-sandbox.uphold.com/v0/me/cards/373ab929-0607-4fbc-b83b-80fd78e06932/transactions
    > Result: Success
    > HTTP Code: 202
    > Body: {"createdAt":"2021-04-30T20:08:38.992Z","denomination":{"amount":"0.05","currency":"BAT","pair":"BATBAT","rate":"1.00"},"fees":[],"id":"4fa17c10-1f5d-4b91-b0ab-42afd9302fc1","message":"5% transaction fee collected by Brave Software International","network":"uphold","normalized":[{"commission":"0.00","currency":"USD","fee":"0.00","rate":"1.26092","target":"origin","amount":"0.06"}],"params":{"currency":"BAT","margin":"0.00","pair":"BATBAT","rate":"1.00","ttl":3599984,"type":"internal"},"priority":"normal","status":"pending","type":"transfer","destination":{"node":{"type":"anonymous"},"type":"anonymous","description":"Uphold Member","amount":"0.05","base":"0.05","commission":"0.00","currency":"BAT","fee":"0.00","rate":"1.00"},"origin":{"amount":"0.05","base":"0.05","CardId":"373ab929-0607-4fbc-b83b-80fd78e06932","commission":"0.00","currency":"BAT","description":"Stephen Donner","fee":"0.00","isMember":true,"node":{"id":"373ab929-0607-4fbc-b83b-80fd78e06932","type":"card","user":{"id":"829c5793-884e-4667-ad9f-4c111f0e1942"}},"rate":"1.00","sources":[],"type":"card"}}
2021-04-30 13:08:39.881 11937-11937/? V/chromium: [VERBOSE5:ledger_impl.cc(144)] 
    [ REQUEST ]

@stephendonner stephendonner added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass - Android ARM and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants