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

remove semi-verified state #15390

Closed
LaurenWags opened this issue Apr 20, 2021 · 7 comments · Fixed by brave/brave-core#9212
Closed

remove semi-verified state #15390

LaurenWags opened this issue Apr 20, 2021 · 7 comments · Fixed by brave/brave-core#9212

Comments

@LaurenWags
Copy link
Member

Description

Related issues:
#15028
#13151

Notification to alert user to reaching linking limit has been implemented via above issues, however blocking the connection (for Uphold wallets) has not been added yet.

When this is implemented, any additional wallet providers should be at least spot checked to confirm their existing linkage functionality is still working as designed.

Additional details/information can be obtained from @Miyayes @zenparsing @emerick

@Miyayes
Copy link
Collaborator

Miyayes commented Jun 10, 2021

Just checking: will this issue also build this in for Android? If not, we can remove the Android label.

@zenparsing
Copy link

@Miyayes Yes - the changes will be in the shared rewards engine code.

@LaurenWags
Copy link
Member Author

Suggested test plan:

cc @szilardszaloki @zenparsing @Miyayes @brave/legacy_qa

@LaurenWags
Copy link
Member Author

LaurenWags commented Jul 29, 2021

Verification in progress with the below builds. Additional notes:

  • Discussed migration from CONNECTED to NOT_CONNECTED/PENDING with @szilardszaloki. Per our discussion QA will not be able to check this scenario.
  • Additionally testing PENDING in the new state machine cannot be covered per discussions with Szilard as well.
Brave | 1.29.37 Chromium: 92.0.4515.115 (Official Build) nightly (x86_64)
-- | --
Revision | 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS | macOS Version 10.15.7 (Build 19H1217)
Upgrade (NOT_CONNECTED) - anon/virtual BAT - PASSED
  1. Using current release version, 1.27.109, clean profile, staging env, enable Rewards, claim UGP grant, note balance
  2. Close browser
  3. "Upgrade" (rename profile to Brave-Browser-Nightly) to 1.29.x
  4. Confirm balance is still the same post upgrade
  5. Confirm you are able to tip
1.27.x 1.29.x 1.29.x post tip
1 27 x 1 29 x post tip
Brave | 1.29.38 Chromium: 92.0.4515.115 (Official Build) nightly (x86_64)
-- | --
Revision | 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS | macOS Version 10.15.7 (Build 19H1217)
Upgrade (VERIFIED) - Verified KYC'd wallet linked - PASSED
  1. Using current release version, 1.27.109, clean profile, staging env, enable Rewards, link KYC'd Uphold wallet
  2. Close browser
  3. "Upgrade" (rename profile to Brave-Browser-Nightly) to 1.29.x
  4. Confirm your verified, KYC'd wallet is still linked post upgrade
  5. Confirm you are able to tip
1.27.x 1.29.x 1.29.x 1.29.x post tip
1 27 x 1 29 x 1 1 29 x 2 1 29 x post tip

Confirmed once brave-intl/bat-go#895 was merged I no longer received the "Your wallet is verified" notification on upgrade. The reason for receiving the notification initially was because I had been kicked back to PENDING state based on the incorrect response of the wallet info endpoint and then got relinked.

Brave | 1.29.40 Chromium: 92.0.4515.115 (Official Build) nightly (x86_64)
-- | --
Revision | 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS | macOS Version 10.15.7 (Build 19H1217)
Upgrade (DISCONNECTED_VERIFIED) - Verified, KYC'd wallet is Disconnected prior to upgrade - PASSED (issue encountered)
  1. Using current release version, 1.27.109, clean profile, staging env, enable Rewards, link KYC'd Uphold wallet
  2. Simulate "natural" disconnect by revoking Brave-Browser app authorization on Uphold site
  3. Close browser
  4. "Upgrade" (rename profile to Brave-Browser-Nightly) to 1.29.x
  5. Confirm your verified, KYC'd wallet is still in Disconnected status after upgrade (appropriate UI, no Uphold balance shown)
  6. Confirm you are able to reconnect
  7. Confirm you are able to tip once you reconnect
1.27.x 1.29.x 1.29.x 1.29.x post tip
1 27 x 1 29 x 1 1 29 x reconnect post tip

Note, rec'd "Your wallet is verified" message after reconnecting. Asked about it here: https://bravesoftware.slack.com/archives/CB0KCRCQN/p1627659102017500. Per this discussion we don't want to show this message on "natural" disconnect. Logged #17278.

Upgrade (a SEMI-VERIFIED state) - link 2 KYC'd Uphold accounts prior to upgrade - PASSED (encountered issue)
  1. Using current release version, 1.27.109, clean profile, staging env, enable Rewards, link KYC'd Uphold wallet
  2. Manually disconnect from Uphold (from wallet panel)
  3. Confirm you are returned to pre-link state (UI, no balance, etc)
  4. Link a second KYC'd Uphold wallet
  5. Confirm UI appears fine (UI, balance is shown), but logs show 403 error for linking (https://grant.rewards.bravesoftware.com/v3/wallet/uphold/<paymentID>/claim)

example logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/3........7/claim
> Method: POST
> Content: {"signedLinkingRequest":"ey...........
> Content Type: application/json; charset=utf-8
[99975:775:0730/084522.183930:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/3.............7/claim
> Result: Failure
> HTTP Code: 403
> Body: {"message":"error linking wallet: unable to link wallets: unable to match wallets: wallets do not match","code":403}
[99975:775:0730/084522.185136:INFO:post_claim_uphold.cc(112)] Forbidden
  1. Close browser
  2. "Upgrade" (rename profile to Brave-Browser-Nightly) to 1.29.x
  3. Confirm your 2nd verified, KYC'd wallet is no longer connected
  4. UI shows pre-link state (UI, no balance)

example logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/3.........7/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJ..........
> Content Type: application/json; charset=utf-8
[266:775:0730/084942.492632:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/3............7/claim
> Result: Failure
> HTTP Code: 403
> Body: {"message":"error linking wallet: unable to link wallets: unable to match wallets: wallets do not match","code":403}
  1. Attempt to link the 2nd KYC'd Uphold wallet (same one from step 4)
    --> encountered a crash when doing this. Logged crash when trying to re-link previous Uphold account in certain case #17259
1.27.x Account 1 1.27.x Account 2 1.29.x
acct 1 acct 2 1 29 x

Also logged #17265 for going from PENDING to NOT_CONNECTED when server returns "wallets do not match".

Brave | 1.29.43 Chromium: 92.0.4515.115 (Official Build) nightly (x86_64)
-- | --
Revision | 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS | macOS Version 10.15.7 (Build 19H1217)
Upgrade (DISCONNECTED_NOT_VERIFIED) - pending->disconnected - PASSED

Note - this case covers having Uphold user status = pending and then simulating a natural disconnect prior to upgrade.

  1. Clean profile, 1.27.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = pending in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.27.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
Screen Shot 2021-08-02 at 11 29 20 AM Screen Shot 2021-08-02 at 11 29 29 AM
  1. Go to uphold site, revoke access. Confirm DISCONNECTED_NOT_VERIFIED on brave://rewards-internals page.
Example Example
Screen Shot 2021-08-02 at 11 31 53 AM Screen Shot 2021-08-02 at 11 32 42 AM
  1. Close browser
  2. Upgrade to 1.29.x
  3. Should be in DISCONNECTED_VERIFIED state after upgrade (confirm on brave://rewards-internals)
Example Example
Screen Shot 2021-08-02 at 11 35 06 AM Screen Shot 2021-08-02 at 11 35 48 AM
  1. Confirmed was able to click on Disconnected from panel and re-auth Uphold, at which point I got the new notification alerting me that my account was still in a pending state with Uphold:
Screen Shot 2021-08-02 at 11 36 50 AM
  1. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/206695986-How-do-I-sign-up-for-Uphold-Web-
Upgrade (DISCONNECTED_NOT_VERIFIED) - blocked->disconnected - PASSED

Note - this case covers having Uphold user status = blocked and then simulating a natural disconnect prior to upgrade.

  1. Clean profile, 1.27.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = blocked in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.27.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
Screen Shot 2021-08-02 at 1 25 04 PM Screen Shot 2021-08-02 at 1 25 19 PM
  1. Go to uphold site, revoke access. Confirm DISCONNECTED_NOT_VERIFIED on brave://rewards-internals page.
Example Example
Screen Shot 2021-08-02 at 1 26 41 PM Screen Shot 2021-08-02 at 1 26 47 PM
  1. Close browser
  2. Upgrade to 1.29.x
  3. Should be in DISCONNECTED_VERIFIED state after upgrade (confirm on brave://rewards-internals)
Example Example
Screen Shot 2021-08-02 at 1 29 28 PM Screen Shot 2021-08-02 at 1 29 34 PM
  1. Confirmed was able to click on Disconnected from panel and re-auth Uphold, at which point I got the new notification alerting me that my account was still in a blocked state with Uphold:
Screen Shot 2021-08-02 at 1 30 38 PM
  1. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/360045765351-Why-we-block-or-restrict-accounts-and-how-to-reduce-the-risk
Upgrade (DISCONNECTED_NOT_VERIFIED) - restricted->disconnected - PASSED

Note - this case covers having Uphold user status = restricted and then simulating a natural disconnect prior to upgrade.

  1. Clean profile, 1.27.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = restricted in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.27.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
Screen Shot 2021-08-02 at 2 04 18 PM Screen Shot 2021-08-02 at 2 04 50 PM
  1. Go to uphold site, revoke access. Confirm DISCONNECTED_NOT_VERIFIED on brave://rewards-internals page.
Example Example
Screen Shot 2021-08-02 at 2 06 17 PM Screen Shot 2021-08-02 at 2 06 23 PM
  1. Close browser
  2. Upgrade to 1.29.x
  3. Should be in DISCONNECTED_VERIFIED state after upgrade (confirm on brave://rewards-internals)
Example Example
Screen Shot 2021-08-02 at 2 07 39 PM Screen Shot 2021-08-02 at 2 07 45 PM
  1. Confirmed was able to click on Disconnected from panel and re-auth Uphold, at which point I got the new notification alerting me that my account was still in a restricted state with Uphold:
Screen Shot 2021-08-02 at 2 08 36 PM
  1. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/360045765351-Why-we-block-or-restrict-accounts-and-how-to-reduce-the-risk
Upgrade (PENDING/pending) - PASSED

Note - this case covers having Uphold user status = pending (in Uphold response) prior to upgrade.

  1. Clean profile, 1.27.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = pending in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.27.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
Screen Shot 2021-08-02 at 2 33 53 PM Screen Shot 2021-08-02 at 2 34 05 PM
  1. Close browser
  2. Upgrade to 1.29.x
  3. Look at brave://rewards-internals logs and check the Event Tab for PENDING ==> NOT_CONNECTED messaging:
Screen Shot 2021-08-02 at 2 43 59 PM
  1. Should be in NOT_CONNECTED state after upgrade (confirm on brave://rewards-internals)
Screen Shot 2021-08-02 at 2 35 40 PM
  1. Confirmed there was a notification presented on panel alerting me that my account was still in a pending state with Uphold.
pend upgrade
  1. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/206695986-How-do-I-sign-up-for-Uphold-Web-

Additional note, in step 11 I was in PENDING state after upgrade (per notification in step 12), however the wallet generation flow sorted my wallet state out and sent me (properly) to NOT_CONNECTED.

Upgrade (PENDING/blocked) - PASSED

Note - this case covers having Uphold user status = blocked (in Uphold response) prior to upgrade.

  1. Clean profile, 1.27.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = blocked in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.27.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
Screen Shot 2021-08-02 at 3 06 03 PM Screen Shot 2021-08-02 at 3 06 13 PM
  1. Close browser
  2. Upgrade to 1.29.x
  3. Look at brave://rewards-internals logs and check the Event Tab for PENDING ==> NOT_CONNECTED messaging:
Screen Shot 2021-08-02 at 3 08 42 PM
  1. Should be in NOT_CONNECTED state after upgrade (confirm on brave://rewards-internals)
Screen Shot 2021-08-02 at 3 08 50 PM
  1. Confirmed there was a notification presented on panel alerting me that my account was still in a blocked state with Uphold:
Screen Shot 2021-08-02 at 3 08 58 PM
  1. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/360045765351-Why-we-block-or-restrict-accounts-and-how-to-reduce-the-risk

Additional note, in step 11 I was in PENDING state after upgrade, however the wallet generation flow sorted my wallet state out and sent me (properly) to NOT_CONNECTED.

Upgrade (PENDING/restricted) - PASSED

Note - this case covers having Uphold user status = restricted (in Uphold response) prior to upgrade.

  1. Clean profile, 1.27.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = restricted in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.27.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
Screen Shot 2021-08-02 at 3 20 11 PM Screen Shot 2021-08-02 at 3 20 21 PM
  1. Close browser
  2. Upgrade to 1.29.x
  3. Look at brave://rewards-internals logs and check the Event Tab for PENDING ==> NOT_CONNECTED messaging:
Screen Shot 2021-08-02 at 3 22 05 PM
  1. Should be in NOT_CONNECTED state after upgrade (confirm on brave://rewards-internals)
Screen Shot 2021-08-02 at 3 21 32 PM
  1. Confirmed there was a notification presented on panel alerting me that my account was still in a restricted state with Uphold:
Screen Shot 2021-08-02 at 3 21 38 PM
  1. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/360045765351-Why-we-block-or-restrict-accounts-and-how-to-reduce-the-risk

Additional note, in step 11 I was in PENDING state after upgrade, however the wallet generation flow sorted my wallet state out and sent me (properly) to NOT_CONNECTED.

Clean profile - Sign up for new Uphold account - PASSED
  1. Using current release version, 1.29.x, clean profile, staging env, enable Rewards, claim UGP grant
  2. Go to Verify wallet modal and select Uphold
  3. Follow UI on Uphold sandbox site to create a new account, enter all KYC info
  4. If you are not auto-approved (likely), ping in shared channel to request verification/completion of KYC process
  5. Wait for this confirmation (you may need to set this profile aside until you get confirmation)
  6. Once you get confirmation, go back to Rewards and go to Verify wallet modal again and connect the newly created Uphold account
  7. Confirm UI reflects Uphold is connected
Example Example Example
Screen Shot 2021-08-02 at 10 07 40 AM Screen Shot 2021-08-02 at 10 10 00 AM Screen Shot 2021-08-02 at 10 10 07 AM
  1. Confirm on brave://rewards-internals
Screen Shot 2021-08-02 at 10 11 00 AM
  1. Confirm on server (curl "https://grant.rewards.bravesoftware.com/v3/wallet/paymentId" | jq '.')
{
  "paymentId": "b...............d",
  "depositAccountProvider": {
    "name": "uphold",
    "id": "7............1",
    "linkingId": "d.............7"
  },
  "walletProvider": {
    "id": "",
    "name": "brave"
  },
  "altcurrency": "BAT",
  "publicKey": "0ec4fbc9bcf126afeab2dd4a2aee249b05b63c1bb4f2168aaf0dd4295293bb1d"
}

In the above "id" under "depositAccountProvider" has a value, so it is correctly linked on the server

  1. Confirm Brave Browser card created on sandbox uphold site
Screen Shot 2021-08-02 at 10 09 01 AM
  1. Add BAT to Brave Browser card and confirm balance gets reflected in the browser (enable 2factor auth on uphold to be able to add BAT)
Example Example
Screen Shot 2021-08-02 at 10 40 52 AM Screen Shot 2021-08-02 at 10 40 59 AM
  1. Tip away the 30 BAT from UGP grant
Example Example
Screen Shot 2021-08-02 at 10 47 59 AM Screen Shot 2021-08-02 at 10 48 05 AM
  1. Tip to an Uphold KYC'd publisher, confirm tip goes thru
Example Example Example
Screen Shot 2021-08-02 at 10 51 58 AM Screen Shot 2021-08-02 at 10 52 02 AM Screen Shot 2021-08-02 at 10 52 17 AM
New Notifications - PASSED

Confirmed each of the new notifications listed in brave/brave-core#9212 (comment) displayed in the UI.

Pending Blocked Restricted BAT not available
pending notification blocked notification restricted notification BAT unavail

"Learn more" URLs are listed in TCs from above for first 3 new notifications.

For the BAT unavailable notification, the "Learn more" link directs me to https://support.uphold.com/hc/en-us/articles/360033020351-Brave-BAT-and-US-availability.

How to trigger the above notifications:

  1. Launch browser with a clean profile and --enable-logging=stderr --vmodule="*/bat-native-ledger/*"=9,"*/brave_rewards/*"=9,"*/bat-native-ads/*"=9,"*/bat-native-confirmations/*"=9,"*/brave_ads/*"=9,"*/brave_user_model/*"=9 --brave-ads-staging --brave-ads-debug --rewards=staging=true
  2. Enable Rewards
  3. Click on Verify Wallet, Uphold option, and the continue to login link
  4. Login to Uphold with a KYC'd verified account
  5. In the logs look for the response to https://api-sandbox.uphold.com/v0/me

example:

[ RESPONSE - OnRequest ]
> Url: https://api-sandbox.uphold.com/v0/me
> Result: Success
> HTTP Code: 200
> Body: {"address":{"city.....
  1. Close the browser
  2. Copy the body (I also formatted using json formatter for easier reading) and paste into a text file
  3. Locate the "status" (between "type" and "state")
  4. You will change this to pending, blocked, or restricted to test those notifications.
  5. Open Charles Proxy
  6. Create a rewrite rule as below. Copy the modified body and paste that in Value field of the Replace section.
Example Example
1 2
  1. Launch the browser and open the panel/trigger some call to Uphold.
  2. If you changed the "status" value to pending, you should see the Pending notification, etc.
  3. To check the BAT unavailable notification, leave "status" as "ok" but remove BAT from the "currencies" section.

Note - make sure you have SSL Proxying enabled for api-sandbox.uphold.com or this won't work.

Screen Shot 2021-08-03 at 8 38 13 AM
Brave | 1.29.46 Chromium: 92.0.4515.115 (Official Build) nightly (x86_64)
-- | --
Revision | 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS | macOS Version 10.15.7 (Build 19H1217)
Clean profile - simulate natural Disconnect - PASSED (issue encountered)

Scenario 1:

  1. Clean profile, non-Japan region, staging environment.
  2. Enable Rewards
  3. Link a KYC'd Uphold wallet
  4. Confirm wallet is linked (balance shows in browser, etc)
  5. Navigate to Uphold site (make sure brave://rewards page is closed if open in any tabs)
  6. Revoke Brave-Browser access to simulate natural disconnect
  7. Open panel - Encounter Uphold doesn't always get the "Disconnected" UI/Disconnected (Verified) state correctly #17329

Scenario 2:

  1. Clean profile, non-Japan region, staging environment.
  2. Enable Rewards
  3. Link a KYC'd Uphold wallet
  4. Confirm wallet is linked (balance shows in browser, etc)
  5. Navigate to Uphold site (make sure brave://rewards page is closed if open in any tabs)
  6. Revoke Brave-Browser access to simulate natural disconnect
  7. Open brave://rewards-internals
  8. UI shows "Disconnected", no balance is displayed
  9. Open panel
  10. UI shows "Disconnected", no balance is displayed
  11. Open brave://rewards-internals
  12. Wallet status is "Disconnected (Verified)"
Example Example Example
Screen Shot 2021-08-03 at 2 59 12 PM Screen Shot 2021-08-03 at 2 59 21 PM Screen Shot 2021-08-03 at 2 59 29 PM
  1. Confirmed able to click on "Disconnected" from both brave://rewards and panel and be directed to re-authorize Brave Browser
  2. Confirmed re-auth is successful
Brave | 1.29.57 Chromium: 92.0.4515.131 (Official Build) beta (x86_64)
-- | --
Revision | 6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29-refs/branch-heads/4515@{#1933}
OS | macOS Version 10.15.7 (Build 19H1323)
Simulate Upgrade from NY State Case - PASSED

Pre-req, be on release channel version (1.27.111 was Release version at time of this test)

  1. Clean profile, US region, staging environment.
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (remove "BAT" from list of currencies in https://api-sandbox.uphold.com/v0/me response but user still remains verified/KYC'd)
  5. Restart release version, connect Uphold account
  6. Confirm info is shown in logs:
[16716:775:0811/141622.981685:INFO:uphold_wallet.cc(77)] BAT not allowed
  1. Confirm when you are directed back to Rewards you get a message about how your state isn't supported (or similar)
Screen Shot 2021-08-11 at 2 15 55 PM
  1. Request Chris to send you an ad grant to your payment ID and claim ad grant once you receive it (this ad grant should not be moved to Uphold account)
Screen Shot 2021-08-11 at 2 23 52 PM
  1. Confirm clicking on "Verify wallet" does nothing in the UI.
  2. Close Brave. Upgrade to version 1.29.x
  3. Launch browser
  4. You should get a notification about how BAT Is not allowed in your region, confirm NOT_CONNECTED status in brave://rewards-internals
Example Example Example
Screen Shot 2021-08-11 at 2 27 30 PM Screen Shot 2021-08-11 at 2 27 52 PM Screen Shot 2021-08-11 at 2 28 03 PM

Logs:

[16823:775:0811/142719.207961:INFO:uphold_wallet.cc(115)] BAT is not allowed for the user!
[16823:775:0811/142719.208551:VERBOSE1:uphold.cc(188)] Disconnecting wallet
[16823:775:0811/142719.227856:VERBOSE1:uphold.cc(114)] Uphold wallet is not VERIFIED.
  1. Confirm UI returns to pre-wallet connected state (no Uphold balance, no "Wallet verified" text, Ads balance is displayed)
Screen Shot 2021-08-11 at 2 29 48 PM
  1. Confirm if you click on "Verify wallet" you are able to choose a provider from the modal.
Brave | 1.29.60 Chromium: 92.0.4515.131 (Official Build) beta (x86_64)
-- | --
Revision | 6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29-refs/branch-heads/4515@{#1933}
OS | macOS Version 10.15.7 (Build 19H1323)
Semi-Verified state (Upgrade) - PASSED

Pre-req: Have server linking limit set to 4

  1. Install 1.28.x Release Channel version (1.28.105), staging env
  2. Enable Rewards
  3. Link an Uphold account that has already been linked 4 times

Logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/6......5/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJ.......
> Content Type: application/json; charset=utf-8
[20922:775:0813/092736.724454:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/6..........5/claim
> Result: Failure
> HTTP Code: 409
> Body: {"message":"error linking wallet: unable to link wallets: failed to insert new custodian link: unable to add too many wallets to a single user","code":409}
[20922:775:0813/092736.724563:VERBOSE9:logging_util.cc(137)] 
[ RESPONSE HEADERS ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/6....5/claim
  1. Confirm no linkage on server (use curl command: curl "https://grant.rewards.bravesoftware.com/v3/wallet/paymentID")

Logs:

{
  "paymentId": "6..........5",
  "walletProvider": {
    "id": "",
    "name": "brave"
  },
  "altcurrency": "BAT",
  "publicKey": "8e535f9e32bc046a437987f1e5b7e33c4409ae1e97c62a75b1f445f375330bdd"
}
  1. Confirm you can see Uphold balance in browser, UI appears like everything is fine
Example Example
Screen Shot 2021-08-13 at 9 27 52 AM Screen Shot 2021-08-13 at 9 28 02 AM
  1. Upgrade to 1.29.x
  2. Confirm you are now in the NOT_CONNECTED state (no balance is shown, UI doesn't show that you are verified, etc)
Example Example Example Example
Screen Shot 2021-08-13 at 9 51 27 AM Screen Shot 2021-08-13 at 9 51 41 AM Screen Shot 2021-08-13 at 9 51 55 AM Screen Shot 2021-08-13 at 9 52 20 AM

Logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/6.............5/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJ.......
[21120:775:0813/095118.402612:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/62............5/claim
> Result: Failure
> HTTP Code: 409
> Body: {"message":"error linking wallet: unable to link wallets: failed to insert new custodian link: unable to add too many wallets to a single user","code":409}
[21120:775:0813/095118.402723:VERBOSE9:logging_util.cc(137)] 
[ RESPONSE HEADERS ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/6....5/claim
[21120:775:0813/095118.403990:INFO:post_claim_uphold.cc(133)] Conflict
[21120:775:0813/095118.404987:VERBOSE1:uphold.cc(188)] Disconnecting wallet
[21120:775:0813/095118.419184:VERBOSE1:uphold.cc(114)] Uphold wallet is not VERIFIED.
[21120:775:0813/095119.016546:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/6.........5/claim
> Result: Failure
> HTTP Code: 409
> Body: {"message":"error linking wallet: unable to link wallets: failed to insert new custodian link: unable to add too many wallets to a single user","code":409}
[21120:775:0813/095119.016640:VERBOSE9:logging_util.cc(137)] 
[ RESPONSE HEADERS ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/6......5/claim
[21120:775:0813/095119.017568:INFO:post_claim_uphold.cc(133)] Conflict
Semi-Verified state (Clean profile) - PASSED

Pre-req: Have server linking limit set to 4

  1. Install 1.29.x, staging env
  2. Enable Rewards
  3. Link an Uphold account that has already been linked 4 times

Logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/7...........0/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJ..........
[21457:775:0813/112725.558881:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/7..........0/claim
> Result: Failure
> HTTP Code: 409
> Body: {"message":"error linking wallet: unable to link wallets: failed to insert new custodian link: unable to add too many wallets to a single user","code":409}
[21457:775:0813/112725.558989:VERBOSE9:logging_util.cc(137)] 
[ RESPONSE HEADERS ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/7...........0/claim
[21457:775:0813/112725.560147:INFO:post_claim_uphold.cc(133)] Conflict
[21457:775:0813/112725.561089:VERBOSE1:uphold.cc(188)] Disconnecting wallet
  1. Confirm no linkage on server (use curl command: curl "https://grant.rewards.bravesoftware.com/v3/wallet/paymentID")

Logs:

{
  "paymentId": "7............0",
  "walletProvider": {
    "id": "",
    "name": "brave"
  },
  "altcurrency": "BAT",
  "publicKey": "c324ec5bcfe13c8377a0035015fd04e9636a8d88a11a2b81876c7ec44fad5070"
}
  1. Confirm you are now in the NOT_CONNECTED state (no balance is shown, UI doesn't show that you are verified, etc)
Example Example Example Example
Screen Shot 2021-08-13 at 11 31 00 AM Screen Shot 2021-08-13 at 11 31 06 AM Screen Shot 2021-08-13 at 11 31 14 AM Screen Shot 2021-08-13 at 11 31 21 AM
Additional semi-verified upgrade scenario - PASSED

After discussing with @hollons @Brave-Matt, I ran the additional scenario below to confirm BAT which did not move to Uphold prior to 1.29.x, would still be available to the user after upgrading to 1.29.x.

  1. Clean install 1.28.105 (current release)
  2. Enable Rewards, restore a wallet with an ad grant waiting
  3. Claim ad grant --> at this point I have some BAT which should move to Uphold if my Uphold account is in good standing/hasn't been linked too many times/etc.
  4. Request Ben to set staging wallet linking limit to 4
  5. Link an Uphold account which has been linked too many times
  6. I am now in "the" semi verified state (although in actuality it is more of "a" semi-verified state). brave://rewards page UI looks fine, no obvious problems. however brave://rewards-internals shows that my BAT didn't move to Uphold as do the logs below:
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/e..........c/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib.........
> Content Type: application/json; charset=utf-8
[23743:775:0814/112613.839894:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/e...........c/claim
> Result: Failure
> HTTP Code: 409
> Body: {"message":"error linking wallet: unable to link wallets: failed to insert new custodian link: unable to add too many wallets to a single user","code":409}
[23743:775:0814/112613.839974:VERBOSE9:logging_util.cc(137)] 
[ RESPONSE HEADERS ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/e...........c/claim
[23743:775:0814/112613.840845:INFO:post_claim_uphold.cc(122)] Not found
[23743:775:0814/112613.855295:VERBOSE5:ledger_impl.cc(119)] 
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v2/suggestions/claim
> Method: POST
> Content: {"credentials":[{"publicKey":"bgo3.........
[23743:775:0814/112614.153619:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v2/suggestions/claim
> Result: Failure
> HTTP Code: 400
> Body: {"message":"Error draining: wallet is not verified","code":400}
[23743:775:0814/112614.153702:VERBOSE9:logging_util.cc(137)] 
[ RESPONSE HEADERS ]
> Url: https://grant.rewards.bravesoftware.com/v2/suggestions/claim
[23743:775:0814/112614.154583:INFO:post_suggestions_claim.cc(59)] Invalid request
[23743:775:0814/112614.155376:INFO:credentials_promotion.cc(526)] Failed to parse drain tokens response
[23743:775:0814/112614.156228:INFO:wallet.cc(200)] Claiming tokens failed
Example Example
Screen Shot 2021-08-14 at 11 29 31 AM Screen Shot 2021-08-14 at 11 29 39 AM
  1. Upgrade to 1.29.x
  2. After this upgrade I can see that brave://rewards no longer shows my Uphold balance, but does continue to show my Ad grant that didn't move to Uphold
  3. brave://rewards-internals also still shows ad grant balance (which was not moved to Uphold with 1.28.x) and you can see that it no longer has me as "verified" (in actuality, I wasn't "verified" in 1.28.x I was in a "Pending" state, but the UI didn't reflect that 😞 )
  4. Also on brave://rewards-internals under Event Logs you can see that I went from "Pending" --> "Not Connected" which is expected in this case
  5. Also, user will see this notification from the panel.
Example Example Example Example
Screen Shot 2021-08-14 at 11 31 46 AM Screen Shot 2021-08-14 at 11 31 54 AM Screen Shot 2021-08-14 at 11 32 17 AM Screen Shot 2021-08-14 at 11 32 35 AM
  1. Confirmed that I can still use the ad grant (virtual) BAT after upgrading to 1.29.x.
Example Example Example
Screen Shot 2021-08-14 at 11 47 02 AM Screen Shot 2021-08-14 at 11 46 49 AM Screen Shot 2021-08-14 at 11 37 57 AM

Additional Uphold functionality regression as per #15390 (comment) was completed and details can be found under https://github.com/brave/internal/issues/788#issuecomment-889075534

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Aug 9, 2021

Verification passed on

Brave | 1.30.9 Chromium: 92.0.4515.131 (Official Build) nightly (64-bit)
-- | --
Revision | 6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29-refs/branch-heads/4515@{#1933}
OS | Windows 10 OS Version 2009 (Build 19043.1110)

Upgrade (NOT_CONNECTED) - anon/virtual BAT - PASSED
  1. Using current release version, 1.27.111, clean profile, staging env, enable Rewards, claim UGP grant, note balance
  2. Close browser
  3. "Upgrade" (rename profile to Brave-Browser-Nightly) to 1.29.x
  4. Confirm balance is still the same post upgrade
  5. Confirm you are able to tip
1.27.x 1.29.x 1.29.x post tip
image image image

Brave | 1.29.58 Chromium: 92.0.4515.131 (Official Build) beta (64-bit)
-- | --
Revision | 6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29-refs/branch-heads/4515@{#1933}
OS | Windows 10 OS Version 2009 (Build 19043.1165)

Upgrade (VERIFIED) - Verified KYC'd wallet linked - PASSED
  1. Using current release version, 1.28.x, clean profile, staging env, enable Rewards, link KYC'd Uphold wallet
  2. Close browser
  3. "Upgrade" (rename profile to Brave-Browser-Beta) to 1.29.x
  4. Confirm your verified, KYC'd wallet is still linked post upgrade
  5. Confirm you are able to tip
1.28.x 1.29.x 1.29.x post tip
image image image
1.27.x 1.29.x 1.29.x post tip
image image image
Upgrade (DISCONNECTED_VERIFIED) - Verified, KYC'd wallet is Disconnected prior to upgrade - PASSED (issue encountered #17278 )
  1. Using current release version, 1.27.109, clean profile, staging env, enable Rewards, link KYC'd Uphold wallet
  2. Simulate "natural" disconnect by revoking Brave-Browser app authorization on Uphold site
  3. Close browser
  4. "Upgrade" (rename profile to Brave-Browser-Nightly) to 1.29.x
  5. Confirm your verified, KYC'd wallet is still in Disconnected status after upgrade (appropriate UI, no Uphold balance shown)
  6. Confirm you are able to reconnect
  7. Confirm you are able to tip once you reconnect
1.28.x 1.29.x 1.29.x 1.29.x post tip
image image image image

Brave | 1.29.58 Chromium: 92.0.4515.131 (Official Build) beta (64-bit)
-- | --
Revision | 6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29-refs/branch-heads/4515@{#1933}
OS | Windows 10 OS Version 2009 (Build 19043.1165)

Upgrade (a SEMI-VERIFIED state)_PASSED
  1. Install 1.28.x
  2. Enable Rewards
  3. Link an Uphold account that has already been linked 4 times
  4. Confirm no linkage on server (use curl command - to be provided later)
  5. Confirm you can see Uphold balance in browser
1.28.x 1.28.x balance 1.29.x 1.29.x balance
image image image image

Event logs
image

Console logs

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/df50aabc-a100-4ad7-82b8-a929d70d6150/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib2R5Ijp7ImRlbm9taW5hdGlvbiI6eyJhbW91bnQiOiIwIiwiY3VycmVuY3kiOiJCQVQifSwiZGVzdGluYXRpb24iOiI0ZjE1Nzg2OC1lMjQzLTRlYWItYmJlYS1lMTAzMThhM2I5NzEifSwiaGVhZGVycyI6eyJkaWdlc3QiOiJTSEEtMjU2PThWbmdyanBDT3crbS9MSC9DNXMrL3hCMzRYZXFHeDNWTHl3aUJXM0pNOXc9Iiwic2lnbmF0dXJlIjoia2V5SWQ9XCJwcmltYXJ5XCIsYWxnb3JpdGhtPVwiZWQyNTUxOVwiLGhlYWRlcnM9XCJkaWdlc3RcIixzaWduYXR1cmU9XCJPK0YrNU10a0xJaGtOMVJ0bW5KTHQyMWt5VXBvZE1RcVdLNW95RENHaFpqdjZvK2RNNjU2RkJUQU1RNFFPSUdzRUZnV2lqV09IelRZNHdmYTN0bEZCZz09XCIifSwib2N0ZXRzIjoie1wiZGVub21pbmF0aW9uXCI6e1wiYW1vdW50XCI6XCIwXCIsXCJjdXJyZW5jeVwiOlwiQkFUXCJ9LFwiZGVzdGluYXRpb25cIjpcIjRmMTU3ODY4LWUyNDMtNGVhYi1iYmVhLWUxMDMxOGEzYjk3MVwifSJ9"}
> Content Type: application/json; charset=utf-8
[9600:15648:0813/151500.500:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/df50aabc-a100-4ad7-82b8-a929d70d6150/claim
> Result: Failure
> HTTP Code: 409
> Body: {"message":"error linking wallet: unable to link wallets: failed to insert new custodian link: unable to add too many wallets to a single user","code":409}
  1. Upgrade to 1.29.x
  2. Confirm you are now in the NOT_CONNECTED state (no balance is shown, UI doesn't show that you are verified, etc)

Event logs
image

no balance is shown the UI
image

wallet status Not connected and balance is zero in wallet info
image

Confirmed that https://grant.rewards.bravesoftware.com/v3/wallet/linking-info?paymentId=df50aabc-a100-4ad7-82b8-a929d70d6150 returns {} as the wallet is not verified and payment id is not attached to any wallet (Gemini/uphold)

Confirmed https://grant.rewards.bravesoftware.com/v3/wallet/df50aabc-a100-4ad7-82b8-a929d70d6150 returns

{"paymentId":"df50aabc-a100-4ad7-82b8-a929d70d6150","walletProvider":{"id":"","name":"brave"},"altcurrency":"BAT","publicKey":"984c77bdf24d1b66ecd878b1e13aaa7c8ec1273f20d30f92baa21c4966d55f9f"}
  1. Link the uphold account in 1.29.x (use the same uphold account used in step 3)
  2. Confirmed balance is shown as zero and pre-wallet state verify wallet in the panel and linking limit reached notification is shown on BR panel
1.29.x 1.29.x
image image

Console log for max linking limit reached

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/df50aabc-a100-4ad7-82b8-a929d70d6150/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib2R5Ijp7ImRlbm9taW5hdGlvbiI6eyJhbW91bnQiOiIwIiwiY3VycmVuY3kiOiJCQVQifSwiZGVzdGluYXRpb24iOiI0ZjE1Nzg2OC1lMjQzLTRlYWItYmJlYS1lMTAzMThhM2I5NzEifSwiaGVhZGVycyI6eyJkaWdlc3QiOiJTSEEtMjU2PThWbmdyanBDT3crbS9MSC9DNXMrL3hCMzRYZXFHeDNWTHl3aUJXM0pNOXc9Iiwic2lnbmF0dXJlIjoia2V5SWQ9XCJwcmltYXJ5XCIsYWxnb3JpdGhtPVwiZWQyNTUxOVwiLGhlYWRlcnM9XCJkaWdlc3RcIixzaWduYXR1cmU9XCJPK0YrNU10a0xJaGtOMVJ0bW5KTHQyMWt5VXBvZE1RcVdLNW95RENHaFpqdjZvK2RNNjU2RkJUQU1RNFFPSUdzRUZnV2lqV09IelRZNHdmYTN0bEZCZz09XCIifSwib2N0ZXRzIjoie1wiZGVub21pbmF0aW9uXCI6e1wiYW1vdW50XCI6XCIwXCIsXCJjdXJyZW5jeVwiOlwiQkFUXCJ9LFwiZGVzdGluYXRpb25cIjpcIjRmMTU3ODY4LWUyNDMtNGVhYi1iYmVhLWUxMDMxOGEzYjk3MVwifSJ9"}
> Content Type: application/json; charset=utf-8
[16868:9308:0813/154103.239:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/df50aabc-a100-4ad7-82b8-a929d70d6150/claim
> Result: Failure
> HTTP Code: 409
> Body: {"message":"error linking wallet: unable to link wallets: failed to insert new custodian link: unable to add too many wallets to a single user","code":409}

[16868:9308:0813/154103.240:INFO:post_claim_uphold.cc(133)] Conflict
[16868:9308:0813/154103.243:VERBOSE1:uphold.cc(188)] Disconnecting wallet
[16868:9308:0813/154103.266:VERBOSE1:uphold.cc(114)] Uphold wallet is not VERIFIED.

Event _logs_

image

  1. Link the 2nd uphold account in 1.29.x (use the different uphold account)

Confirmed wallet balance is zero and wallet is not verified due to max linking limit reached

2nd uphold account 2nd uphold account
image image

Event _logs_
image

console logs

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/df50aabc-a100-4ad7-82b8-a929d70d6150/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib2R5Ijp7ImRlbm9taW5hdGlvbiI6eyJhbW91bnQiOiIwIiwiY3VycmVuY3kiOiJCQVQifSwiZGVzdGluYXRpb24iOiJkMjM2ZTRkZC1mY2ExLTRmNzEtODc1Ni0zNzMzMmZhNGM1OTMifSwiaGVhZGVycyI6eyJkaWdlc3QiOiJTSEEtMjU2PUoybmFXRjY2UHI1aWh1bnZIZGxvUFNBOS8xdnFROWxlUU9PSUpSTUxWd1U9Iiwic2lnbmF0dXJlIjoia2V5SWQ9XCJwcmltYXJ5XCIsYWxnb3JpdGhtPVwiZWQyNTUxOVwiLGhlYWRlcnM9XCJkaWdlc3RcIixzaWduYXR1cmU9XCJVUGFxeTdxMVlGYkFXcnorODBjYzE5dVNsN0VsUTZ2ZS9ONmR0cHBjS2ExOHVmMUowU3hWWlR2ZW8vWXFCZGxJK28ycFl2UHRFTTVRdldBbERSdzVBdz09XCIifSwib2N0ZXRzIjoie1wiZGVub21pbmF0aW9uXCI6e1wiYW1vdW50XCI6XCIwXCIsXCJjdXJyZW5jeVwiOlwiQkFUXCJ9LFwiZGVzdGluYXRpb25cIjpcImQyMzZlNGRkLWZjYTEtNGY3MS04NzU2LTM3MzMyZmE0YzU5M1wifSJ9"}
> Content Type: application/json; charset=utf-8
[16868:9308:0813/155008.905:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/df50aabc-a100-4ad7-82b8-a929d70d6150/claim
> Result: Failure
> HTTP Code: 409
> Body: {"message":"error linking wallet: unable to link wallets: failed to insert new custodian link: unable to add too many wallets to a single user","code":409}

[16868:9308:0813/155008.908:INFO:post_claim_uphold.cc(133)] Conflict
[16868:9308:0813/155008.914:VERBOSE1:uphold.cc(188)] Disconnecting wallet
[16868:9308:0813/155008.934:VERBOSE1:uphold.cc(114)] Uphold wallet is not VERIFIED.

wallet _info_
image

Clean profile_Semi verified state check_PASSED
  1. Clean profile 1.29.x
  2. Enable rewards
  3. Link KYC'd uphold account
  4. wallet linking limit reached notification is shown on BR panel
  5. Balance is not shown on the UI and wallet status Not connected and balance is zero in wallet info
1.29.x (linking limit notifi) 1.29.x (balance is zero) 1.29.x (wallet info)
image image image

Console log for max linking limit reached

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/8af2e36b-f2f6-4125-9da3-2034425a1b1f/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib2R5Ijp7ImRlbm9taW5hdGlvbiI6eyJhbW91bnQiOiIwIiwiY3VycmVuY3kiOiJCQVQifSwiZGVzdGluYXRpb24iOiI0ZjE1Nzg2OC1lMjQzLTRlYWItYmJlYS1lMTAzMThhM2I5NzEifSwiaGVhZGVycyI6eyJkaWdlc3QiOiJTSEEtMjU2PThWbmdyanBDT3crbS9MSC9DNXMrL3hCMzRYZXFHeDNWTHl3aUJXM0pNOXc9Iiwic2lnbmF0dXJlIjoia2V5SWQ9XCJwcmltYXJ5XCIsYWxnb3JpdGhtPVwiZWQyNTUxOVwiLGhlYWRlcnM9XCJkaWdlc3RcIixzaWduYXR1cmU9XCJ3VGtiSDNUSmtSMHRzK3VyMDM1ajMyUDJ0VjVMbkEybWpKMmtacVhPallINkpuZmtpMFZ3Zy9xSjJlNy9CZWxsV2xFcW5WYjRqQ2pFTVlXN0Vrak1BZz09XCIifSwib2N0ZXRzIjoie1wiZGVub21pbmF0aW9uXCI6e1wiYW1vdW50XCI6XCIwXCIsXCJjdXJyZW5jeVwiOlwiQkFUXCJ9LFwiZGVzdGluYXRpb25cIjpcIjRmMTU3ODY4LWUyNDMtNGVhYi1iYmVhLWUxMDMxOGEzYjk3MVwifSJ9"}
> Content Type: application/json; charset=utf-8
[1108:7084:0813/180525.830:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/8af2e36b-f2f6-4125-9da3-2034425a1b1f/claim
> Result: Failure
> HTTP Code: 409
> Body: {"message":"error linking wallet: unable to link wallets: failed to insert new custodian link: unable to add too many wallets to a single user","code":409}

[1108:7084:0813/180525.834:INFO:post_claim_uphold.cc(133)] Conflict
[1108:7084:0813/180525.836:VERBOSE1:uphold.cc(188)] Disconnecting wallet
[1108:7084:0813/180525.858:VERBOSE1:uphold.cc(114)] Uphold wallet is not VERIFIED.

Event log
image

Confirmed that https://grant.rewards.bravesoftware.com/v3/wallet/linking-info?paymentId=8af2e36b-f2f6-4125-9da3-2034425a1b1f returns {} as the wallet is not verified and payment id is not attached to any wallet (Gemini/uphold)

Confirmed https://grant.rewards.bravesoftware.com/v3/wallet/8af2e36b-f2f6-4125-9da3-2034425a1b1f returns

{"paymentId":"8af2e36b-f2f6-4125-9da3-2034425a1b1f","walletProvider":{"id":"","name":"brave"},"altcurrency":"BAT","publicKey":"840519e3ea126c5d87ccba039b257a04ad95c439239a1665c1fbce3624dd503c"}
  1. Connect 2nd uphold kyc'd account
  2. Confirmed max linking limit reached notification is shown on the BR panel
  3. Wallet balance is zero and wallet is in not connected state in wallet info and in event logs
2nd uphold acct 2nd uphold acct 2nd uphold acct
image image image

Console log for max linking limit reached

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/8af2e36b-f2f6-4125-9da3-2034425a1b1f/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib2R5Ijp7ImRlbm9taW5hdGlvbiI6eyJhbW91bnQiOiIwIiwiY3VycmVuY3kiOiJCQVQifSwiZGVzdGluYXRpb24iOiJkMjM2ZTRkZC1mY2ExLTRmNzEtODc1Ni0zNzMzMmZhNGM1OTMifSwiaGVhZGVycyI6eyJkaWdlc3QiOiJTSEEtMjU2PUoybmFXRjY2UHI1aWh1bnZIZGxvUFNBOS8xdnFROWxlUU9PSUpSTUxWd1U9Iiwic2lnbmF0dXJlIjoia2V5SWQ9XCJwcmltYXJ5XCIsYWxnb3JpdGhtPVwiZWQyNTUxOVwiLGhlYWRlcnM9XCJkaWdlc3RcIixzaWduYXR1cmU9XCIzelY4WU0zU01Gdk5CT0JuRzBoS2l3c0UvdmtYN2UydjNaRjNtVXpjV1cyT2dKTExWQjhpSExOVEsvSmhoSFlqbjk0VWw1RHZXK1ZLeDJDZ1c4MFFEUT09XCIifSwib2N0ZXRzIjoie1wiZGVub21pbmF0aW9uXCI6e1wiYW1vdW50XCI6XCIwXCIsXCJjdXJyZW5jeVwiOlwiQkFUXCJ9LFwiZGVzdGluYXRpb25cIjpcImQyMzZlNGRkLWZjYTEtNGY3MS04NzU2LTM3MzMyZmE0YzU5M1wifSJ9"}
> Content Type: application/json; charset=utf-8
[1108:7084:0813/195316.294:VERBOSE1:browser_manager.cc(65)] Browser window is inactive
[1108:7084:0813/195316.296:VERBOSE6:user_activity.cc(41)] Triggered event: 17 (50.5:2:3600 s)
[1108:7084:0813/195316.719:VERBOSE1:browser_manager.cc(52)] Browser window is active
[1108:7084:0813/195316.719:VERBOSE6:user_activity.cc(41)] Triggered event: 16 (50.5:2:3600 s)
[1108:7084:0813/195316.722:VERBOSE2:tab_manager.cc(77)] Tab id 5 was updated
[1108:7084:0813/195316.730:VERBOSE6:user_activity.cc(41)] Triggered event: 11 (50.5:2:3600 s)
[1108:7084:0813/195317.464:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/8af2e36b-f2f6-4125-9da3-2034425a1b1f/claim
> Result: Failure
> HTTP Code: 409
> Body: {"message":"error linking wallet: unable to link wallets: failed to insert new custodian link: unable to add too many wallets to a single user","code":409}

[1108:7084:0813/195317.466:INFO:post_claim_uphold.cc(133)] Conflict
[1108:7084:0813/195317.477:VERBOSE1:uphold.cc(188)] Disconnecting wallet
[1108:7084:0813/195317.491:VERBOSE1:uphold.cc(114)] Uphold wallet is not VERIFIED.

Event log
image

Upgrade (a SEMI-VERIFIED state) - link 2 KYC'd Uphold accounts prior to upgrade - PASSED (encountered issue)
  1. Using current release version, 1.28.105, clean profile, staging env, enable Rewards, link KYC'd Uphold wallet
  2. Manually disconnect from Uphold (from wallet panel)
  3. Confirm you are returned to pre-link state (UI, no balance, etc)
  4. Link a second KYC'd Uphold wallet
  5. Confirm UI appears fine (UI, balance is shown), but logs show 403 error for linking
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/3....7/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib2R5Ijp7ImRlbm9taW5hdGlvbiI6eyJhbW91bnQiOiIwIiwiY3VycmVuY3kiOiJCQVQifSwiZGVzdGluYXRpb24iOiJkMjM2ZTRkZC1mY2ExLTRmNzEtODc1Ni0zNzMzMmZhNGM1OTMifSwiaGVhZGVycyI6eyJkaWdlc3QiOiJTSEEtMjU2PUoybmFXRjY2UHI1aWh1bnZIZGxvUFNBOS8xdnFROWxlUU9PSUpSTUxWd1U9Iiwic2lnbmF0dXJlIjoia2V5SWQ9XCJwcmltYXJ5XCIsYWxnb3JpdGhtPVwiZWQyNTUxOVwiLGhlYWRlcnM9XCJkaWdlc3RcIixzaWduYXR1cmU9XCJFRW8yM3l5ZXI5c2tQMCsxTVRTQjdSK0N6TGdYZkpidG1uYkdVSE9qc1NHYTg5TTBCVDA4M0QwNGRGbTRnUnRwcmNEY2FLTkdZOFhXbHdtc0dkcURBQT09XCIifSwib2N0ZXRzIjoie1wiZGVub21pbmF0aW9uXCI6e1wiYW1vdW50XCI6XCIwXCIsXCJjdXJyZW5jeVwiOlwiQkFUXCJ9LFwiZGVzdGluYXRpb25cIjpcImQyMzZlNGRkLWZjYTEtNGY3MS04NzU2LTM3MzMyZmE0YzU5M1wifSJ9"}
> Content Type: application/json; charset=utf-8
[8644:11060:0817/155736.190:VERBOSE1:browser_manager.cc(99)] Browser did enter background
[8644:11060:0817/155736.191:VERBOSE6:user_activity.cc(41)] Triggered event: 02 (21:2:3600 s)
[8644:11060:0817/155736.688:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/3....7/claim
> Result: Failure
> HTTP Code: 403
> Body: {"message":"error linking wallet: unable to link wallets: unable to match wallets: wallets do not match","code":403}

[8644:11060:0817/155736.689:INFO:post_claim_uphold.cc(112)] Forbidden
  1. Close browser
  2. "Upgrade" (rename profile to Brave-Browser-Nightly) to 1.29.x
  3. Confirm your 2nd verified, KYC'd wallet is no longer connected
  4. UI shows pre-link state (UI, no balance)
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/3....7/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib2R5Ijp7ImRlbm9taW5hdGlvbiI6eyJhbW91bnQiOiIwIiwiY3VycmVuY3kiOiJCQVQifSwiZGVzdGluYXRpb24iOiJkMjM2ZTRkZC1mY2ExLTRmNzEtODc1Ni0zNzMzMmZhNGM1OTMifSwiaGVhZGVycyI6eyJkaWdlc3QiOiJTSEEtMjU2PUoybmFXRjY2UHI1aWh1bnZIZGxvUFNBOS8xdnFROWxlUU9PSUpSTUxWd1U9Iiwic2lnbmF0dXJlIjoia2V5SWQ9XCJwcmltYXJ5XCIsYWxnb3JpdGhtPVwiZWQyNTUxOVwiLGhlYWRlcnM9XCJkaWdlc3RcIixzaWduYXR1cmU9XCJFRW8yM3l5ZXI5c2tQMCsxTVRTQjdSK0N6TGdYZkpidG1uYkdVSE9qc1NHYTg5TTBCVDA4M0QwNGRGbTRnUnRwcmNEY2FLTkdZOFhXbHdtc0dkcURBQT09XCIifSwib2N0ZXRzIjoie1wiZGVub21pbmF0aW9uXCI6e1wiYW1vdW50XCI6XCIwXCIsXCJjdXJyZW5jeVwiOlwiQkFUXCJ9LFwiZGVzdGluYXRpb25cIjpcImQyMzZlNGRkLWZjYTEtNGY3MS04NzU2LTM3MzMyZmE0YzU5M1wifSJ9"}
> Content Type: application/json; charset=utf-8
[14920:14052:0817/160100.561:VERBOSE1:browser_manager.cc(99)] Browser did enter background
[14920:14052:0817/160100.561:VERBOSE6:user_activity.cc(41)] Triggered event: 02 (0.5:2:3600 s)
[14920:14052:0817/160100.686:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/3.....7/claim
> Result: Failure
> HTTP Code: 403
> Body: {"message":"error linking wallet: unable to link wallets: unable to match wallets: wallets do not match","code":403}

[14920:14052:0817/160100.688:INFO:post_claim_uphold.cc(123)] Forbidden
  1. Attempt to link the 2nd KYC'd Uphold wallet (same one from step 4)
    --> encountered the issue go from PENDING to NOT_CONNECTED when server returns wallets do not match #17265
1.28.x Account 1 1.28.x Account 1 - Disconnect via panel 1.28.x Account 2 1.29.x 1.29.x
image image image image image
Upgrade (DISCONNECTED_NOT_VERIFIED) - pending->disconnected - PASSED

Note - this case covers having Uphold user status = pending and then simulating a natural disconnect prior to upgrade.

  1. Clean profile, 1.28.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = pending in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.28.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
image image
  1. Go to uphold site, revoke access. Confirm DISCONNECTED_NOT_VERIFIED on brave://rewards-internals page.
Example Example
image image
  1. Close browser
  2. Upgrade to 1.29.x
  3. Should be in DISCONNECTED_VERIFIED state after upgrade (confirm on brave://rewards-internals)
Example Example
image image
  1. Confirmed was able to click on Disconnected from panel and re-auth Uphold, at which point I got the new notification alerting me that my account was still in a pending state with Uphold:
    image

  2. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/206695986-How-do-I-sign-up-for-Uphold-Web-

Upgrade (DISCONNECTED_NOT_VERIFIED) - blocked->disconnected - PASSED

Note - this case covers having Uphold user status = blocked and then simulating a natural disconnect prior to upgrade.

  1. Clean profile, 1.28.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = blocked in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.28.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
image image
  1. Go to uphold site, revoke access. Confirm DISCONNECTED_NOT_VERIFIED on brave://rewards-internals page.
Example Example
image image
  1. Close browser
  2. Upgrade to 1.29.x
  3. Should be in DISCONNECTED_VERIFIED state after upgrade (confirm on brave://rewards-internals)
Example Example
image image
  1. Confirmed was able to click on Disconnected from panel and re-auth Uphold, at which point I got the new notification alerting me that my account was still in a blocked state with Uphold:

image

  1. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/360045765351-Why-we-block-or-restrict-accounts-and-how-to-reduce-the-risk
Upgrade (DISCONNECTED_NOT_VERIFIED) - restricted->disconnected - PASSED

Note - this case covers having Uphold user status = restricted and then simulating a natural disconnect prior to upgrade.

  1. Clean profile, 1.28.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = restricted in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.28.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
image image
  1. Go to uphold site, revoke access. Confirm DISCONNECTED_NOT_VERIFIED on brave://rewards-internals page.
Example Example
image image
  1. Close browser
  2. Upgrade to 1.29.x
  3. Should be in DISCONNECTED_VERIFIED state after upgrade (confirm on brave://rewards-internals)
Example Example
image image
  1. Confirmed was able to click on Disconnected from panel and re-auth Uphold, at which point I got the new notification alerting me that my account was still in a restricted state with Uphold:
    image

  2. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/360045765351-Why-we-block-or-restrict-accounts-and-how-to-reduce-the-risk

Upgrade (PENDING/blocked) - PASSED

Note - this case covers having Uphold user status = blocked (in Uphold response) prior to upgrade.

  1. Clean profile, 1.28.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = blocked in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.28.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
image image
  1. Close browser

  2. Upgrade to 1.29.x

  3. Look at brave://rewards-internals logs and check the Event Tab for PENDING ==> NOT_CONNECTED messaging:
    image

  4. Should be in NOT_CONNECTED state after upgrade (confirm on brave://rewards-internals)
    image

  5. Confirmed there was a notification presented on panel alerting me that my account was still in a blocked state with Uphold:
    image

  6. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/360045765351-Why-we-block-or-restrict-accounts-and-how-to-reduce-the-risk

Upgrade (PENDING/pending) - PASSED

Note - this case covers having Uphold user status = pending (in Uphold response) prior to upgrade.

  1. Clean profile, 1.28.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = pending in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.28.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
image image
  1. Close browser

  2. Upgrade to 1.29.x

  3. Look at brave://rewards-internals logs and check the Event Tab for PENDING ==> NOT_CONNECTED messaging:
    image

  4. Should be in NOT_CONNECTED state after upgrade (confirm on brave://rewards-internals)
    image

  5. Confirmed there was a notification presented on panel alerting me that my account was still in a pending state with Uphold.
    image

Upgrade (PENDING/restricted) - PASSED

Note - this case covers having Uphold user status = restricted (in Uphold response) prior to upgrade.

  1. Clean profile, 1.28.x (current release)
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (ex. put Uphold user status = restricted in https://api-sandbox.uphold.com/v0/me response)
  5. Restart 1.28.x, connect Uphold account
  6. Confirm PENDING on brave://rewards-internals and on wallet panel
Example Example
image image
  1. Close browser

  2. Upgrade to 1.29.x

  3. Look at brave://rewards-internals logs and check the Event Tab for PENDING ==> NOT_CONNECTED messaging:
    image

  4. Confirmed there was a notification presented on panel alerting me that my account was still in a restricted state with Uphold:
    image

  5. Clicking on "Learn more" button directs me to: https://support.uphold.com/hc/en-us/articles/360045765351-Why-we-block-or-restrict-accounts-and-how-to-reduce-the-risk

Simulate Upgrade from NY State Case - PASSED

Pre-req, be on release channel version (1.28.106 was Release version at time of this test)

  1. Clean profile, US region, staging environment.
  2. Enable Rewards
  3. Close browser
  4. Use Charles Proxy to attempt re-write (remove "BAT" from list of currencies in https://api-sandbox.uphold.com/v0/me response but user still remains verified/KYC'd)
  5. Restart release version, connect Uphold account
  6. Confirm info is shown in logs:
[19396:9020:0820/164603.136:INFO:uphold_wallet.cc(77)] BAT not allowed
  1. Confirm when you are directed back to Rewards you get a message about how your state isn't supported (or similar)

image

  1. Request Chris to send you an ad grant to your payment ID and claim ad grant once you receive it (this ad grant should not be moved to Uphold account)
    image

image

  1. Confirm clicking on "Verify wallet" does nothing in the UI.
  2. Close Brave. Upgrade to version 1.29.x
  3. Launch browser
  4. You should get a notification about how BAT Is not allowed in your region, confirm NOT_CONNECTED status in brave://rewards-internals
Example Example Example
image image image

Logs:

[17776:18568:0820/194420.033:INFO:uphold_wallet.cc(115)] BAT is not allowed for the user!
[17776:18568:0820/194420.034:VERBOSE1:uphold.cc(188)] Disconnecting wallet
[17776:18568:0820/194420.043:VERBOSE1:uphold.cc(114)] Uphold wallet is not VERIFIED.
  1. Confirm UI returns to pre-wallet connected state (no Uphold balance, no "Wallet verified" text, Ads balance is displayed)
    image

  2. Confirm if you click on "Verify wallet" you are able to choose a provider from the modal.
    image

Clean profile - simulate natural Disconnect - PASSED

Scenario 1:

  1. Clean profile, non-Japan region, staging environment.
  2. Enable Rewards
  3. Link a KYC'd Uphold wallet
  4. Confirm wallet is linked (balance shows in browser, etc)
  5. Navigate to Uphold site (make sure brave://rewards page is closed if open in any tabs)
  6. Revoke Brave-Browser access to simulate natural disconnect
  7. Open panel - Confirmed I correctly get the "Disconnected" UI/state when opening the panel or brave://rewards after simulating natural disconnect from Uphold.

Scenario 2:

  1. Clean profile, non-Japan region, staging environment.
  2. Enable Rewards
  3. Link a KYC'd Uphold wallet
  4. Confirm wallet is linked (balance shows in browser, etc)
  5. Navigate to Uphold site (make sure brave://rewards page is closed if open in any tabs)
  6. Revoke Brave-Browser access to simulate natural disconnect
  7. Open brave://rewards-internals
  8. UI shows "Disconnected", no balance is displayed
  9. Open panel
  10. UI shows "Disconnected", no balance is displayed
  11. Open brave://rewards-internals
  12. Wallet status is "Disconnected (Verified)"
Example Example Example
image image image
  1. Confirmed able to click on "Disconnected" from both brave://rewards and panel and be directed to re-authorize Brave Browser
  2. Confirmed re-auth is successful
New Notifications - PASSED

[Followed the steps which @LaurenWags mentioned in the test plan above]
Confirmed each of the new notifications listed in brave/brave-core#9212 (comment) displayed in the UI

  • Confirmed verify wallet does nothing
  • Confirmed wallet balance is not shown in the UI
  • Confirmed wallet status is Not connected in the brave://rewards-internals
  • Confirmed wallet status in event log is PENDING ==> NOT_CONNECTED
Pending Blocked Restricted BAT not available
image image image image
Clean profile - Sign up for new Uphold account - PASSED
  1. Using current release version, 1.29.x, clean profile, staging env, enable Rewards, claim UGP grant
  2. Go to Verify wallet modal and select Uphold
  3. Follow UI on Uphold sandbox site to create a new account, enter all KYC info
  4. If you are not auto-approved (likely), ping in shared channel to request verification/completion of KYC process
  5. Wait for this confirmation (you may need to set this profile aside until you get confirmation)
  6. Once you get confirmation, go back to Rewards and go to Verify wallet modal again and connect the newly created Uphold account
  7. Confirm UI reflects Uphold is connected
Example Example Example
image image image
  1. Confirm on brave://rewards-internals
    image

  2. Confirm on server (https://grant.rewards.bravesoftware.com/v3/wallet/1.......3)

{
  "paymentId": "189689ab-e577-4edc-8b79-60d943d2d8e3",
  "depositAccountProvider": {
    "name": "uphold",
    "id": "c.......a",
    "linkingId": "2.....d"
  },
  "walletProvider": {
    "id": "",
    "name": "brave"
  },
  "altcurrency": "BAT",
  "publicKey": "d6947980f73749c282e145f8534719f380198ee9e992d3c4b24dcb3ebb66d786"
}

In the above "id" under "depositAccountProvider" has a value, so it is correctly linked on the server

  1. Confirm Brave Browser card created on sandbox uphold site

  2. Add BAT to Brave Browser card and confirm balance gets reflected in the browser (enable 2factor auth on uphold to be able to add BAT)

Example Example
image image
  1. Tip away the 30 BAT from UGP grant
Example Example
image image
  1. Tip to an Uphold KYC'd publisher, confirm tip goes thru
Example Example Example
image image image
  1. Confirmed contribution fee shown correctly in uphold and console logs

image

[ REQUEST ]
> URL: https://api-sandbox.uphold.com/v0/me/cards/c522a32e-cb61-4a13-adf8-8133c5835f9a/transactions
> Method: 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
[12932:4720:0823/134811.904:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://api-sandbox.uphold.com/v0/me/cards/c522a32e-cb61-4a13-adf8-8133c5835f9a/transactions
> Result: Success
> HTTP Code: 202
> Body: {"application":{"clientId":"4c2b665ca060d912fec5c735c734859a06118cc8","name":"Brave Browser"},"createdAt":"2021-08-23T08:18:10.509Z","denomination":{"amount":"0.05","currency":"BAT"
[ REQUEST ]
> URL: https://api-sandbox.uphold.com/v0/me/cards/c522a32e-cb61-4a13-adf8-8133c5835f9a/transactions
> Method: POST
> Content: {"denomination":{"amount":"0.950000","currency":"BAT"},"destination":"abf1ff79-a239-42af-abff-20eb121edd1c","message":""}
> Content Type: application/json; charset=utf-8
[12932:4720:0823/134801.782:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://api-sandbox.uphold.com/v0/me/cards/c522a32e-cb61-4a13-adf8-8133c5835f9a/transactions
> Result: Success
> HTTP Code: 202
> Body: {"application":{"clientId":"4c2b665ca060d912fec5c735c734859a06118cc8","name":"Brave Browser"},"createdAt":"2021-08-23T08:18:00.383Z","denomination":{"amount":"0.95","currency":"BAT","

@stephendonner
Copy link

Verified PASSED using

Brave 1.29.74 Chromium: 93.0.4577.58 (Official Build) (64-bit)
Revision c4410ece044414ea42fa4ba328d08195e818a99c-refs/branch-heads/4577@{#1076}
OS Linux

Ran the Semi-Verified state (Clean profile) test from #15390 (comment) with @LaurenWags by my (virtual) side 👍

Pre-req: Have server linking limit set to 4

Steps:

  1. Install 1.29.x, staging env
  2. Enable Rewards
  3. Link an Uphold account that has already been linked 4 times
  • Confirmed it went from PENDING ====> NOT_CONNECTED.
  • Confirmed that the UI in brave://rewards no longer shows Wallet Verified status, etc.
example example example example example
Screen Shot 2021-08-27 at 12 11 54 PM Screen Shot 2021-08-27 at 12 12 12 PM Screen Shot 2021-08-27 at 12 15 32 PM Screen Shot 2021-08-27 at 12 17 17 PM Screen Shot 2021-08-27 at 12 17 40 PM

@srirambv
Copy link
Contributor

Verification passed on Oppo Reno 5 with Android 11 running 1.29.74 x64 build

Scenario 1: Upgrade (NOT_CONNECTED) - anon/virtual BAT
  • Installed current release version, 1.28.106,
  • Enabled Rewards and claimed UGP Grant, Verified wallet balance
  • Exit browser
  • Upgrade to 1.29.74 build
  • Verified balance is retained during upgrade
  • Verified able to tip a publisher post upgrade and balance updates accordingly
1.28.x 1.29.x Tip sent on 1.29.x
image image image
Scenario 2: Upgrade (VERIFIED) - Verified KYC'd wallet linked
  • Installed current release version, 1.28.106,
  • Enabled Rewards and connected to a KYC wallet
  • Exit browser
  • Upgrade to 1.29.74 build
  • Verified wallet is still connected post upgrade
  • Verified able to tip a publisher post upgrade and wallet balance updates accordingly
1.28.x 1.29.x Tip sent on 1.29.x
image image image
Scenario 3: Upgrade (DISCONNECTED_VERIFIED) - Verified, KYC'd wallet is Disconnected prior to upgrade
  • Installed current release version, 1.28.106,
  • Enabled Rewards and connected to a KYC wallet
  • Disconnect the wallet via Uphold, ensured panel shows disconnected message
  • Exit browser
  • Upgrade to 1.29.74 build
  • Verified wallet is still disconnected post upgrade
  • Verified able to re-connect the KYC wallet again post upgrade
  • Verified able to tip a publisher post upgrade and wallet balance updates accordingly
1.28.x Disconencted 1.29.x Disconnected 1.29.x Re-connected Tip sent on 1.29.x
image image image image
Scenario 4: Upgrade (a SEMI-VERIFIED state) - link 2 KYC'd Uphold accounts prior to upgrade
  • Installed current release version, 1.28.106
  • Launched staging env and enable Rewards, link KYC'd Uphold wallet
  • Manually disconnect from Uphold (from wallet panel)
  • Verified returned to pre-link state (UI, no balance, etc)
  • Linked a second KYC'd Uphold wallet
  • Verified UI appears fine (UI, balance is shown), but logs show 403 error for linking (https://grant.rewards.bravesoftware.com/v3/wallet/uphold/<paymentID>/claim)
[ REQUEST ]
    > URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d3.......1/claim
    > Method: POST
    > Content: {"signedLinkingRequest":"eyJ......J9"}
    > Content Type: application/json; charset=utf-8
2021-08-31 06:40:34.738 19036-19036/? V/chromium: [VERBOSE6:logging_util.cc(136)] 
    [ RESPONSE - OnRequest ]
    > Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d32.......1/claim
    > Result: Failure
    > HTTP Code: 403
    > Body: {"message":"error linking wallet: unable to link wallets: unable to match wallets: wallets do not match","code":403}
  • Quit Browser
  • Upgraded to 1.29.x
  • Verified 2nd verified, KYC'd wallet is no longer connected
  • Verified UI shows pre-link state (UI, no balance)
    [ REQUEST ]
    > URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d3.....1/claim
    > Method: POST
    > Content: {"signedLinkingRequest":"ey......9"}
    > Content Type: application/json; charset=utf-8
2021-08-31 06:42:36.197 20591-20591/? V/chromium: [VERBOSE6:logging_util.cc(136)] 
    [ RESPONSE - OnRequest ]
    > Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d3.....1/claim
    > Result: Failure
    > HTTP Code: 403
    > Body: {"message":"error linking wallet: unable to link wallets: unable to match wallets: wallets do not match","code":403}
2021-08-31 06:42:36.205 20591-20591/? I/chromium: [INFO:post_claim_uphold.cc(123)] Forbidden
2021-08-31 06:42:36.210 20591-20591/? V/chromium: [VERBOSE1:uphold.cc(188)] Disconnecting wallet
2021-08-31 06:42:36.712 20591-20591/? V/chromium: [VERBOSE6:logging_util.cc(136)] 
    [ RESPONSE - OnRequest ]
    > Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d3......1/claim
    > Result: Failure
    > HTTP Code: 403
    > Body: {"message":"error linking wallet: unable to link wallets: unable to match wallets: wallets do not match","code":403}
2021-08-31 06:42:36.722 20591-20591/? I/chromium: [INFO:post_claim_uphold.cc(123)] Forbidden
1.28.x Acc #1 1.28.x Acc #2 1.29.76
image image image
Scenario 5: Upgrade (DISCONNECTED_NOT_VERIFIED) - pending->disconnected
  • Clean install on 1.28.x (current release)
  • Enable Rewards on staging environment and close the browser
  • Using Charles Proxy re-wrote Uphold user status to pending in https://api-sandbox.uphold.com/v0/me response
  • Restart 1.28.x, connect Uphold account
  • Verified PENDING on brave://rewards-internals and on wallet panel
  • Go to uphold site, revoke access. Confirm DISCONNECTED_NOT_VERIFIED on brave://rewards-internals page.
  • Close browser
  • Upgrade to 1.29.76
  • Should be in DISCONNECTED_VERIFIED state after upgrade (confirm on brave://rewards-internals)
  • No notification shown due to Implement wallet state notifications for Android #17780
image image image
Scenario 6: Upgrade (PENDING/blocked)
  • Clean install on 1.28.x (current release)
  • Enable Rewards on staging environment and close the browser
  • Using Charles Proxy re-wrote Uphold user status to pending in https://api-sandbox.uphold.com/v0/me response
  • Restart 1.28.x, connect Uphold account
  • Verified PENDING on brave://rewards-internals and on wallet panel
  • Upgrade to 1.29.76
  • Verified brave://rewards-internals shows PENDING ==> NOT_CONNECTED in Event logs tab
  • No notification shown due to Implement wallet state notifications for Android #17780
image image
Scenario 7: New Notifications
Not Implemented. Logged #17780
Scenario 8: Clean profile - simulate natural Disconnect

Scenario 1:

  • Clean install on a non-JP region
  • Enable Rewards on staging environment
  • Link a KYC Uphold wallet
  • Verified wallet is linked (Wallet balance updates from Uphold)
  • Visited Uphold account and revoked Brave-Browser access to simulate natural disconnect
  • Verified opening BR Panel shows "Disconnected" UI

Scenario 2:

  • Clean install on a non-JP region
  • Enable Rewards on staging environment
  • Link a KYC Uphold wallet
  • Verified wallet is linked (Wallet balance updates from Uphold)
  • Visited Uphold account and revoked Brave-Browser access to simulate natural disconnect
  • Verified BR panel shows "Disconnected", no balance is displayed
  • Verified brave://rewards-internals status is "Disconnected (Verified)"
  • Verified able to tap on "Disconnected" on panel and be directed to re-authorize Brave Browser
  • Verified able to re-auth successful
Scenario 9: Semi-Verified state (Upgrade)

Device limit has not been tested before on Android and since its a notification that is shown it may not be implemented so will have to wait for #17780 to be done to check this one

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.

9 participants