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 notification when user tries to connect second custodian account in wallet generation flow #17271

Closed
Miyayes opened this issue Jul 30, 2021 · 3 comments · Fixed by brave/brave-core#9669

Comments

@Miyayes
Copy link
Collaborator

Miyayes commented Jul 30, 2021

Description

When a user tries to connect a second Uphold/custodian account in the wallet generation flow, no error modal is shown.

Solution

The relevant error modal should show for the "2 custodian accounts to 1 browser" error case.

@szilardszaloki
Copy link
Contributor

We're creating a notification for the "ambiguous Uphold accounts" case here and creating the modals for all the notifications in #16652 in one go (deliberated with @Miyayes).

@LaurenWags
Copy link
Member

@brave/legacy_qa #17265 can be tested along side this issue

@LaurenWags
Copy link
Member

LaurenWags commented Aug 18, 2021

Verification passed with

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)

Verified scenarios from brave/brave-core#9669 (comment)

Upgrade Case

Confirmed 1.28.105 is in the correct state (see brave/brave-core#9669 (comment) as a guide)

Example Example
Screen Shot 2021-08-18 at 2 31 39 PM Screen Shot 2021-08-18 at 2 31 50 PM

Logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d..........5/claim
> Method: POST
> Content: {"signedLinkingRequest":"ey.......
[36757:775:0818/143029.086406:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d.........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}

Upgrade to 1.29.x.
After opening the panel in 1.29.x I now see the expected notification. Closing this notification shows the pre-link state, which is also expected.

Example Example
Screen Shot 2021-08-18 at 2 34 21 PM Screen Shot 2021-08-18 at 2 36 12 PM

Logs do not repeatedly show the 403 error, which is expected now per #17265.

Logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d........5/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJi.....
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d.........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}
[36901:775:0818/143414.889469:INFO:post_claim_uphold.cc(123)] Forbidden
[36901:775:0818/143414.890496:VERBOSE1:uphold.cc(188)] Disconnecting wallet

Additionally, looking at brave://rewards-internals I can now see that I am no longer in the "PENDING" state, I have moved (as expected) to "NOT_CONNECTED".

Example Example
Screen Shot 2021-08-18 at 2 52 28 PM Screen Shot 2021-08-18 at 2 52 42 PM
Clean Profile

Confirmed that after attempting to link the second KYC'd Uphold account I do not see the 403 errors repeatedly in the logs:

[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/7.............4/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}
[37143:775:0818/154412.656110:VERBOSE9:logging_util.cc(137)] 
[ RESPONSE HEADERS ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/7........4/claim
[37143:775:0818/154412.656944:INFO:post_claim_uphold.cc(123)] Forbidden
[37143:775:0818/154412.657703:VERBOSE1:uphold.cc(188)] Disconnecting wallet

Confirmed message is shown on panel.
Confirmed UI returned to NOT_CONNECTED state.

Example Example Example Example
Screen Shot 2021-08-18 at 3 52 05 PM Screen Shot 2021-08-18 at 3 52 12 PM Screen Shot 2021-08-18 at 3 52 22 PM Screen Shot 2021-08-18 at 3 52 34 PM

Verification passed on

Brave | 1.29.64 Chromium: 92.0.4515.159 (Official Build) beta (64-bit)
-- | --
Revision | 0185b8a19c88c5dfd3e6c0da6686d799e9bc3b52-refs/branch-heads/4515@{#2052}
OS | Windows 10 OS Version 2009 (Build 19043.1165)

Verified scenarios from brave/brave-core#9669 (comment)

Clean profile

Confirmed that after attempting to link the second KYC'd Uphold account I do not see the 403 errors repeatedly in the logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d8d70c76-3ab4-4100-8eb0-1901aad92948/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib2R5Ijp7ImRlbm9taW5hdGlvbiI6eyJhbW91bnQiOiIwIiwiY3VycmVuY3kiOiJCQVQifSwiZGVzdGluYXRpb24iOiJkMjM2ZTRkZC1mY2ExLTRmNzEtODc1Ni0zNzMzMmZhNGM1OTMifSwiaGVhZGVycyI6eyJkaWdlc3QiOiJTSEEtMjU2PUoybmFXRjY2UHI1aWh1bnZIZGxvUFNBOS8xdnFROWxlUU9PSUpSTUxWd1U9Iiwic2lnbmF0dXJlIjoia2V5SWQ9XCJwcmltYXJ5XCIsYWxnb3JpdGhtPVwiZWQyNTUxOVwiLGhlYWRlcnM9XCJkaWdlc3RcIixzaWduYXR1cmU9XCJsRGFBdDEwWi8xMUo4MU9CUWZCVjZtQWNkKzVlakkrMzJLT3Bzb1c3eW91aTJ6UmRwVmd6ZGVGY0RvWEtqdkY0eThmWGlaSGx4QllQdTdFN3J2NzVDdz09XCIifSwib2N0ZXRzIjoie1wiZGVub21pbmF0aW9uXCI6e1wiYW1vdW50XCI6XCIwXCIsXCJjdXJyZW5jeVwiOlwiQkFUXCJ9LFwiZGVzdGluYXRpb25cIjpcImQyMzZlNGRkLWZjYTEtNGY3MS04NzU2LTM3MzMyZmE0YzU5M1wifSJ9"}
> Content Type: application/json; charset=utf-8
[16876:14708:0824/115929.780:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/d8d70c76-3ab4-4100-8eb0-1901aad92948/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}

[16876:14708:0824/115929.783:INFO:post_claim_uphold.cc(123)] Forbidden
[16876:14708:0824/115929.792:VERBOSE1:uphold.cc(188)] Disconnecting wallet

Confirmed message is shown on panel.
Confirmed UI returned to NOT_CONNECTED state.

Example Example Example Example
image image image image
Upgrade profile

Confirmed 1.28.106 is in the correct state

Example Example
image image
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/8.....3/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib2R5Ijp7ImRlbm9taW5hdGlvbiI6eyJhbW91bnQiOiIwIiwiY3VycmVuY3kiOiJCQVQifSwiZGVzdGluYXRpb24iOiJkMjM2ZTRkZC1mY2ExLTRmNzEtODc1Ni0zNzMzMmZhNGM1OTMifSwiaGVhZGVycyI6eyJkaWdlc3QiOiJTSEEtMjU2PUoybmFXRjY2UHI1aWh1bnZIZGxvUFNBOS8xdnFROWxlUU9PSUpSTUxWd1U9Iiwic2lnbmF0dXJlIjoia2V5SWQ9XCJwcmltYXJ5XCIsYWxnb3JpdGhtPVwiZWQyNTUxOVwiLGhlYWRlcnM9XCJkaWdlc3RcIixzaWduYXR1cmU9XCIxM1hwN0FxbUFQckRKRWtxU1d0VGdoM3VXNTZRN1RzaExHWTZYd2pnSGQ4K1Z6cE55aUVVekdGeXJpMmcxV1U1ZGpIK3NkTU5sTDhhMkp4YWdJZjhDQT09XCIifSwib2N0ZXRzIjoie1wiZGVub21pbmF0aW9uXCI6e1wiYW1vdW50XCI6XCIwXCIsXCJjdXJyZW5jeVwiOlwiQkFUXCJ9LFwiZGVzdGluYXRpb25cIjpcImQyMzZlNGRkLWZjYTEtNGY3MS04NzU2LTM3MzMyZmE0YzU5M1wifSJ9"}
> Content Type: application/json; charset=utf-8
[11904:8380:0824/130526.336:VERBOSE1:browser_manager.cc(65)] Browser window is inactive
[11904:8380:0824/130526.337:VERBOSE6:user_activity.cc(41)] Triggered event: 17 (2.5:2:3600 s)
[11904:8380:0824/130526.338:VERBOSE1:browser_manager.cc(99)] Browser did enter background
[11904:8380:0824/130526.346:VERBOSE6:user_activity.cc(41)] Triggered event: 02 (3:2:3600 s)
[11904:8380:0824/130526.792:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/8.....3/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}

[11904:8380:0824/130526.793:INFO:post_claim_uphold.cc(112)] Forbidden

Upgrade to 1.29.x.
After opening the panel in 1.29.x I now see the expected notification. Closing this notification shows the pre-link state, which is also expected.

Example Example
image image

Logs do not repeatedly show the 403 error, which is expected now per #17265.

Logs:

[ REQUEST ]
> URL: https://api-sandbox.uphold.com/v0/me/cards?q=currency:BAT
> Method: GET
[17740:3376:0824/131037.427:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=8d074429-609f-4558-a2e0-d5887c21eb03&platform=windows
> Result: Success
> HTTP Code: 200
> Body: {"promotions":[{"id":"f05568e6-f4a1-4438-8e81-cc0490fd14f7","createdAt":"2021-06-11T11:05:45.873298Z","expiresAt":"2021-12-11T11:05:45.873298Z","version":5,"suggestionsPerGrant":120,"approximateValue":"30","type":"ugp","available":true,"platform":"desktop","publicKeys":["6AphTvx13IgxVRG1nljV2ql1Y7yGUol6yrVMhEP85wI="],"legacyClaimed":false}]}

[17740:3376:0824/131037.702:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/8.....3/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}

[17740:3376:0824/131037.705:INFO:post_claim_uphold.cc(123)] Forbidden
[17740:3376:0824/131037.716:VERBOSE1:uphold.cc(188)] Disconnecting wallet

Additionally, looking at brave://rewards-internals I can now see that I am no longer in the "PENDING" state, I have moved (as expected) to "NOT_CONNECTED".

Example Example
image image

Verified with

Brave	1.29.71 Chromium: 92.0.4515.159 (Official Build) beta (64-bit)
Revision	0185b8a19c88c5dfd3e6c0da6686d799e9bc3b52-refs/branch-heads/4515@{#2052}
OS	Linux

Verified scenarios from brave/brave-core#9669 (comment)

Upgrade Case

Confirmed 1.28.106 is in the correct state (see brave/brave-core#9669 (comment) as a guide)

Example Example
1 2

Logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/0c0e51bd-38bc-4cf4-a132-1a218cb870d1/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJi........
> Content Type: application/json; charset=utf-8
[45304:45304:0826/082529.947860:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/0c0e51bd-38bc-4cf4-a132-1a218cb870d1/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}

Upgrade to 1.29.x.
After opening the panel in 1.29.x I now see the expected notification. Closing this notification shows the pre-link state, which is also expected.

Example Example
3 4

Logs do not repeatedly show the 403 error, which is expected now per #17265.

Logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/0c0e51bd-38bc-4cf4-a132-1a218cb870d1/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJib.........
> Content Type: application/json; charset=utf-8
[46241:46241:0826/082909.390846:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/0c0e51bd-38bc-4cf4-a132-1a218cb870d1/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}

Additionally, looking at brave://rewards-internals I can now see that I am no longer in the "PENDING" state, I have moved (as expected) to "NOT_CONNECTED".

Example Example
5 6
Clean Profile

Confirmed that after attempting to link the second KYC'd Uphold account I do not see the 403 errors repeatedly in the logs:

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/1ee2a2f8-bb59-4896-888f-c21cee46760e/claim
> Method: POST
> Content: {"signedLinkingRequest":"eyJ..........
> Content Type: application/json; charset=utf-8
[41374:41374:0826/080355.398724:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v3/wallet/uphold/1ee2a2f8-bb59-4896-888f-c21cee46760e/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}

Confirmed message is shown on panel.
Confirmed UI returned to NOT_CONNECTED state.

Example Example Example Example
1 2 3 4

@LaurenWags LaurenWags added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-Linux and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment