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

Show error modal when wallet verify fails because user tries verifying 2 different accounts at same custodian with same Wallet ID #16468

Closed
Miyayes opened this issue Jun 16, 2021 · 4 comments
Assignees
Labels
feature/rewards OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-macOS QA/Yes release-notes/exclude

Comments

@Miyayes
Copy link
Collaborator

Miyayes commented Jun 16, 2021

Description

A user cannot verify more than 1 of the same custodian (e.g., Uphold) account with any Rewards Wallet ID. If they try, the second Uphold linking attempt will fail. An error is logged in Rewards logs, but no specific error is shown in the UI to tell the user.

Edit: When testing in the bitFlyer case, the following generic error modal appears:

Solution

Show an error modal in the brave://rewards settings page (as part of the linking attempt process) telling the user that wallet verifying failed because their Brave Rewards wallet is already associated with another account at that custodian. @emerick can help with this error modal if needed.

Update: Wallet should not go into "Wallet verified" state with the new account. Wallet state should remain whatever it was prior to attempt to verify with a second Uphold account.

Error Modal Text

"Hmm, it looks like your Brave Rewards wallet has already been verified with another {custodian name} account. Please try verifying again using your previous account."

Copy approved by @codybanxs

@Miyayes Miyayes changed the title Show error modal when wallet verify fails because user tries verifying 2 different custodian accounts with same Wallet ID Show error modal when wallet verify fails because user tries verifying 2 different accounts at same custodian with same Wallet ID Jun 16, 2021
@Miyayes Miyayes added the priority/P2 A bad problem. We might uplift this to the next planned release. label Jun 25, 2021
@LaurenWags
Copy link
Member

Per the wallet disconnect (#15237) testing call today with @jumde @Miyayes @husobee, we encountered this problem with the below version while testing on staging env.

Brave | 1.27.78 Chromium: 91.0.4472.114 (Official Build) beta (x86_64)
-- | --
Revision | 4bb19460e8d88c3446b360b0df8fd991fee49c0b-refs/branch-heads/4472@{#1496}
OS | macOS Version 10.15.7 (Build 19H1217)

The UI is showing "Wallet Verified" and the wallet balance but it should not be. If you look at the logs you will see an error:

> Result: Failure
> HTTP Code: 403
> Body: {"message":"error linking wallet: unable to link wallets: unable to match wallets: wallets do not match","code":403}

Steps for the two scenarios which produced this issue can be found under https://github.com/brave/internal/issues/774#issuecomment-856063731. They are:

  • Scenario 1A: A user still cannot connect 2 accounts from the same custodian to a single Wallet ID (explicit disconnect)
  • Scenario 1B: A user still cannot connect 2 accounts from the same custodian to a single Wallet ID (natural disconnect)

In 1A, the UI should not show wallet balance and should show "Verify Wallet".
In 1B, the UI should not show wallet balance and should show "Disconnected".

@Miyayes please correct if I've misspoken on any of the above per today's discussions.

@zenparsing
Copy link

This may be resolved by brave/brave-core#9212

@bsclifton
Copy link
Member

Fixed with brave/brave-core#9212

@LaurenWags
Copy link
Member

LaurenWags commented Aug 18, 2021

Verified using

Brave | 1.29.63 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)
Uphold - PASSED

See #17271 (comment), #17265 (comment), #17259 (comment) for verifications with Clean and Upgrade profiles.

Screen Shot 2021-08-24 at 8 41 19 AM
Brave 1.29.64 Chromium: 92.0.4515.159 (Official Build) beta (x86_64)
Revision 0185b8a19c88c5dfd3e6c0da6686d799e9bc3b52-refs/branch-heads/4515@{#2052}
OS macOS Version 11.5.1 (Build 20G80)
Gemini - FAILED (follow up issues logged)

Since Gemini is being added with 1.29.x, there is only the Clean profile case.

  1. Clean install, staging env. Enable Gemini in flags and restart.
  2. Enable Rewards, link KYC'd Gemini wallet
  3. Manually disconnect from Gemini (from wallet panel)
  4. Confirm you are returned to pre-link state (UI, no balance, etc)
  5. Link a second (different) KYC'd Gemini wallet
  6. Logs show 403 error like below:
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/gemini/9......b/claim
> Method: POST
> Content: {"linking_info":"eyJ0......
[98738:259:0819/115838.142307:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/gemini/9.......b/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}

--> no error modal like the one requested, logged as #17569
--> UI shows "Disconnected" not "Verify wallet", logged as #17570
--> Balance is shown, this part will likely be fixed with #17474 once uplifted

Example Example
Screen Shot 2021-08-19 at 11 59 28 AM Screen Shot 2021-08-19 at 12 00 03 PM
bitFlyer - FAILED (follow up issue logged)
Clean Profile
  1. Clean install, staging env, Japan region. Enable Gemini in flags and restart.
  2. Enable Rewards, link KYC'd bitFlyer wallet
  3. Manually disconnect from bitFlyer (from wallet panel)
  4. Confirm you are returned to pre-link state (UI, no balance, etc)
  5. Link a second (different) KYC'd Gemini wallet
  6. Logs show 403 error like below:
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/bitflyer/8.........c/claim
> Method: POST
> Content: {"linkingInfo":"eyJh...........
[1321:775:0819/170811.244247:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/bitflyer/8..........c/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}
[1321:775:0819/170811.245330:INFO:post_claim_bitflyer.cc(82)] Unexpected HTTP status: 403
[1321:775:0819/170811.246716:INFO:bitflyer_authorization.cc(197)] Couldn't claim wallet

--> error shown matches the error from issue description. See #17592

Example Example Example
bF Screen Shot 2021-08-19 at 17 15 49 Screen Shot 2021-08-19 at 17 15 26
Upgrade Case

Installed 1.28.106, staging env, in Japan region, enabled Rewards
Connected bitFlyer acct 1, confirmed successful.
Disconnected from panel, confirmed UI shows no linkage and logs show that wallet is Disconnected.
Clicked on "Verify Wallet", bitFlyer site is shown.
Instead of allowing access, I logged in with a second account (from main bF page)
Go back to brave://rewards page.
Click on "Verify Wallet" again.
Now allow access.
I get redirected back to brave://rewards and the UI is as below:

Example Example
Screen Shot 2021-08-20 at 8 27 00 Screen Shot 2021-08-20 at 8 27 08

Logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/bitflyer/6............5/claim
> Method: POST
> Content: {"linkingInfo":"eyJ......
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/bitflyer/6.............5/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}
[2607:775:0820/082656.091985:VERBOSE9:logging_util.cc(137)] 
[ RESPONSE HEADERS ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/bitflyer/64ce47af-b275-4c32-9a5d-63a3c438df15/claim
[2607:775:0820/082656.092925:INFO:post_claim_bitflyer.cc(82)] Unexpected HTTP status: 403
[2607:775:0820/082656.094077:INFO:bitflyer_authorization.cc(195)] Couldn't claim wallet

Upgrade to 1.29.x.
After opening the panel in 1.29.x I do not see any notification like that in the Uphold case. Per discussion with @Miyayes, I logged a follow up issue for notification text: #17592

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/rewards OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-macOS QA/Yes release-notes/exclude
Projects
None yet
Development

No branches or pull requests

6 participants