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

Unable to disconnect Uphold wallet from Rewards #16929

Closed
bsclifton opened this issue Jul 13, 2021 · 3 comments
Closed

Unable to disconnect Uphold wallet from Rewards #16929

bsclifton opened this issue Jul 13, 2021 · 3 comments

Comments

@bsclifton
Copy link
Member

bsclifton commented Jul 13, 2021

Description

My Uphold account has gotten in an interesting state. Originally, this problem started happening when I renamed the Brave Browser card in Uphold and tried to disconnect.

Steps to Reproduce

  1. Get into this weird state. May require you to try the following:
    a. Connect Uphold wallet in rewards
    b. Rename Brave Browser card as Browser
    c. Disconnect wallet in rewards
    d. Connect Uphold wallet again in rewards
    e. A new Brave Browser card is created
    f. Rename Brave Browser card as DELETE ME
    g. Rename Browser card as Brave Browser
  2. Go to brave://rewards
  3. Click Wallet Verified button; pick Disconnect from Brave Rewards
    image

Actual result:

image

When verbose logging is enabled (brave://flags/#brave-rewards-verbose-logging), I get the following logs:

[ REQUEST ]
> URL: https://grant.rewards.brave.com/v3/wallet/uphold/payment-id-goes-here/claim
> Method: DEL
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=SHA-GOES-HERE
> Header signature: keyId="key-id-goes-here",algorithm="ed25519",headers="digest (request-target)",signature="signature-goes-here"
> Header accept: application/json
[Jul 13, 2021, 11:17:50.6 AM:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.brave.com/v3/wallet/uphold/payment-id-goes-here/claim
> Result: Failure
> HTTP Code: 500
> Body: {"message":"failed to disconnect custodian link: unable to disconnect custodian wallet: should have updated at least one wallet with disconnected custodial","code":500}

[Jul 13, 2021, 11:17:50.6 AM:ERROR:delete_claim.cc(71)] Internal server error
[Jul 13, 2021, 11:17:50.6 AM:ERROR:wallet.cc(136)] Wallet unlinking failed

Since I'm stuck in this state, the only option I have is to reset rewards completely:
image

Expected result:

Wallet should disconnect; or if not connected on server side we should disconnect the client side (invalidate token if needed).

Reproduces how often:

Not sure if 100% reproduceable from steps above; but my profile is in this state

Brave version (brave://version info)

Brave 1.28.74 Chromium: 92.0.4515.93 (Official Build) nightly (64-bit)
Revision 6eb43ff7850a1d710c3f827a0555737c74edab5c-refs/branch-heads/4515@{#1378}
OS Windows 10 OS Version 2009 (Build 19043.1083)
@bsclifton
Copy link
Member Author

If we provide a good solution for this, we can update our help article:
https://support.brave.com/hc/en-us/articles/360062026432-How-to-disconnect-your-verified-wallet

@bsclifton
Copy link
Member Author

@husobee had a fix for this on the backend; basically, the delete operation (being submit by client) was being met with a 500 error. The client then would not continue disconnecting. After the fix, a 500 is not sent and client properly disconnects

@kjozwiak
Copy link
Member

Looks like the fix is working 👍 I originally ran into #16929 (comment) several times when creating new wallets and logging into Uphold. Once the wallet was linked, I couldn't disconnect and ran into the following:

[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.brave.com/v3/wallet/uphold/92baf00b-847f-42e3-84a3-5d884f7d321f/claim
> Result: Failure
> HTTP Code: 500
> Body: {"message":"failed to disconnect custodian link: unable to disconnect custodian wallet: should have updated at least one wallet with disconnected custodial","code":500}

Once @husobee pushed the fix as per #16929 (comment), I'm now able to disconnect without running into the above. Used the following build for verification:

Brave | 1.29.8 Chromium: 92.0.4515.101 (Official Build) nightly (64-bit)
--- | ---
Revision | edb73f4fb624e2ea0cb6f5cc39c9e317ecd3535b-refs/branch-heads/4515@{#1536}
OS | Windows 10 OS Version 2009 (Build 19042.1083)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants