Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Ability to see progress after using QR code to transfer grants #3162

Closed
bsclifton opened this issue Dec 23, 2020 · 2 comments · Fixed by #3488
Closed

Ability to see progress after using QR code to transfer grants #3162

bsclifton opened this issue Dec 23, 2020 · 2 comments · Fixed by #3488

Comments

@bsclifton
Copy link
Member

bsclifton commented Dec 23, 2020

Problem Description

Users that have accrued a balance of virtual grants (ad earnings) on iOS have the ability to transfer them to desktop via a QR code shown on desktop's rewards screen (brave://rewards). If you open up the info panel (triangle icon) on iOS, there is a way to start the process which will take a picture of the QR code.

The problem is that once this is started, there is no insight into what the status of that transfer is. Support-wise, it can be difficult to ask for payment Ids and look manually. A spec was put together (named "Drain Poll Spec" in Drive) with a proposal to share a text status

Feature Overview

Status can be shown as Invalid, Pending, In Progress, Delayed, and Complete

Spec

Spec: Brave Rewards on iOS (BAT drain UX improvements)

@kylehickinson kylehickinson added this to the 1.25 milestone Mar 30, 2021
@kjozwiak
Copy link
Member

kjozwiak commented May 3, 2021

  • Verification PASSED on iPhone 11 running iOS 14.4.2 using 1.25 (21.5.3.20)
  • Verification PASSED on iPad Mini 4 running iOS 13.7 using 1.25 (21.5.3.20)

Cases that were used for verification:

Test Case #1 - End to End Check

  • launched 1.25 (21.5.3.20) and switched to Staging
  • claimed a grant via Settings -> View Rewards Debug Menu -> Fetch & Claim Promotions
  • once claimed, converted the wallet to a Legacy via Settings -> View Rewards Debug Menu -> Create Legacy Wallet
  • ensured that tapping Legacy Wallet Transfer correctly opens Wallet Transfer Status with instructions on scanning QR code
  • ensured that the Wallet Transfer Status screen with instructions on scanning QR code can be opened via Settings -> Brave Rewards -> Legacy Wallet Transfer
  • ensured that the Legacy Wallet Transfer notification isn't being removed until either X is tapped or a transfer has occurred
  • ensured that the Your legacy wallet transfer has completed! doesn't re-appear when when tapping on X
  • ensured that once the drain was completed, the Legacy Wallet Transfer UI is removed from Settings -> Brave Rewards

Ensured that the drain successfully completed via iOS as per the following:

[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v2/suggestions/claim
> Result: Success
> HTTP Code: 200
> Body: {"drainId":"d30288be-6fee-4040-a9ca-bae8a625c1a4"}

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/drain/d30288be-6fee-4040-a9ca-bae8a625c1a4
> Method: UrlMethod::GET

[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/drain/d30288be-6fee-4040-a9ca-bae8a625c1a4
> Result: Success
> HTTP Code: 200
> Body: {"drainId":"d30288be-6fee-4040-a9ca-bae8a625c1a4","status":"complete"}
Example Example Example Example
IMG_3676 IMG_3680 IMG_3678 IMG_3677

Ensured that the BAT from iOS was successfully transferred into the targeted desktop install:

[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/f39acfc1-f078-4778-a6b4-f1ab9453ce8d
> Result: Success
> HTTP Code: 200
> Body: {"claimId":"7b612e0c-6672-4d30-bb3f-5204faf6b0b5"}

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/f39acfc1-f078-4778-a6b4-f1ab9453ce8d/claims/7b612e0c-6672-4d30-bb3f-5204faf6b0b5
> Method: UrlMethod::GET

[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/f39acfc1-f078-4778-a6b4-f1ab9453ce8d/claims/7b612e0c-6672-4d30-bb3f-5204faf6b0b5
> Result: Success
> HTTP Code: 200
Example Example
image Screenshot 2021-05-03 160749

Test Case #2 - Invalid

  • launched 1.25 (21.5.3.20) and switched to Staging
  • claimed a grant via Settings -> View Rewards Debug Menu -> Fetch & Claim Promotions
  • converted the wallet to a Legacy wallet via Settings -> View Rewards Debug Menu -> Create Legacy Wallet
  • ensured that the Legacy Wallet Transfer notification appears under the rewards panel
  • switched Drain Status Override to Invalid under Rewards QA Settings
  • ensured that the Your legacy wallet transfer is invalid appears under the rewards panel
  • ensured that tapping on the Your legacy wallet transfer is invalid opens Wallet Transfer Status
    • ensured that the notification is dismissed from the rewards panel once Wallet Transfer Status opens
    • ensured that the correct text regarding the transfer being invalid is correctly displayed under Wallet Transfer Status
  • ensured that tapping on X closes the notification from the rewards panel
  • ensured that invalid notification doesn't re-appear after re-opening the rewards panel or restarting Brave
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards appears as Invalid
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards isn't removed when notification dismissed
  • switched Drain Status Override to Completed! under Rewards QA Settings
  • ensured that the Competed notification appears under the rewards panel
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards appears as Completed!
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards is removed when the Completed! notification has been clicked under the rewards panel
Example Example Example
IMG_3683 IMG_3684 IMG_3685

Test Case #3 - Pending

  • launched 1.25 (21.5.3.20) and switched to Staging
  • claimed a grant via Settings -> View Rewards Debug Menu -> Fetch & Claim Promotions
  • converted the wallet to a Legacy wallet via Settings -> View Rewards Debug Menu -> Create Legacy Wallet
  • ensured that the Legacy Wallet Transfer notification appears under the rewards panel
  • switched Drain Status Override to Pending under Rewards QA Settings
  • ensured that the Your legacy wallet transfer is pending appears under the rewards panel
  • ensured that tapping on the Your legacy wallet transfer is pending opens Wallet Transfer Status
    • ensured that the notification is dismissed from the rewards panel once Wallet Transfer Status opens
    • ensured that the correct text regarding the transfer still pending is correctly displayed under Wallet Transfer Status
  • ensured that tapping on X closes the notification from the rewards panel
  • ensured that pending notification doesn't re-appear after re-opening the rewards panel or restarting Brave
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards appears as Pending
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards isn't removed when notification dismissed
  • switched Drain Status Override to Completed! under Rewards QA Settings
  • ensured that the Competed notification appears under the rewards panel
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards appears as Completed!
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards is removed when the Completed! notification has been clicked under the rewards panel
Example Example Example
IMG_3689 IMG_3690 IMG_3691

Test Case #4 - In-Progress

  • launched 1.25 (21.5.3.20) and switched to Staging
  • claimed a grant via Settings -> View Rewards Debug Menu -> Fetch & Claim Promotions
  • converted the wallet to a Legacy wallet via Settings -> View Rewards Debug Menu -> Create Legacy Wallet
  • ensured that the Legacy Wallet Transfer notification appears under the rewards panel
  • switched Drain Status Override to In-Progress under Rewards QA Settings
  • ensured that the Your legacy wallet transfer is in progress appears under the rewards panel
  • ensured that tapping on the Your legacy wallet transfer is in progress opens Wallet Transfer Status
    • ensured that the notification is dismissed from the rewards panel once Wallet Transfer Status opens
    • ensured that the correct text regarding the transfer being in-progress is correctly displayed under Wallet Transfer Status
  • ensured that tapping on X closes the notification from the rewards panel
  • ensured that in progress notification doesn't re-appear after re-opening the rewards panel or restarting Brave
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards appears as In-Progress
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards isn't removed when notification dismissed
  • switched Drain Status Override to Completed! under Rewards QA Settings
  • ensured that the Competed notification appears under the rewards panel
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards appears as Completed!
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards is removed when the Completed! notification has been clicked under the rewards panel
Example Example Example
IMG_3692 IMG_3693 IMG_3694

Test Case #5 - Delayed

  • launched 1.25 (21.5.3.20) and switched to Staging
  • claimed a grant via Settings -> View Rewards Debug Menu -> Fetch & Claim Promotions
  • converted the wallet to a Legacy wallet via Settings -> View Rewards Debug Menu -> Create Legacy Wallet
  • ensured that the Legacy Wallet Transfer notification appears under the rewards panel
  • switched Drain Status Override to DelayedunderRewards QA Settings`
  • ensured that the Your legacy wallet transfer has been delayed appears under the rewards panel
  • ensured that tapping on the Your legacy wallet transfer has been delayed opens Wallet Transfer Status
    • ensured that the notification is dismissed from the rewards panel once Wallet Transfer Status opens
    • ensured that the correct text regarding the transfer being delayed is correctly displayed under Wallet Transfer Status
  • ensured that tapping on X closes the notification from the rewards panel
  • ensured that delayed notification doesn't re-appear after re-opening the rewards panel or restarting Brave
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards appears as Delayed
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards isn't removed when notification dismissed
  • switched Drain Status Override to Completed! under Rewards QA Settings
  • ensured that the Competed notification appears under the rewards panel
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards appears as Completed!
  • ensured that the Legacy Wallet Transfer button under Settings -> Brave Rewards is removed when the Completed! notification has been clicked under the rewards panel
Example Example Example
IMG_3695 IMG_3696 IMG_3697

Test Case #6 - 1.24 -> 1.25 upgrade

  • launched 1.24 (21.4.1.15) and switched to Staging
  • claimed a grant via Settings -> View Rewards Debug Menu -> Fetch & Claim Promotions
  • converted the wallet to a Legacy wallet via Settings -> View Rewards Debug Menu -> Create Legacy Wallet
  • ensured that the Legacy Wallet Transfer notification appears under the rewards panel
  • upgraded to 1.25 (21.5.3.20) via TF
  • ensured that the Legacy Wallet Transfer notification appears under the rewards panel
  • ensured that you can run through the process of claiming the grant once updated
    • basically running through the cases mentioned in Test Case #1 - End to End Check

@kjozwiak
Copy link
Member

Changing from release-notes/exclude to release-notes/include as we changed/added new UI to the legacy wallet transfer feature which is user facing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.