From adefa2db4efbb164a1c5b464eff260c421c42e78 Mon Sep 17 00:00:00 2001 From: brave-builds Date: Thu, 14 May 2020 20:14:49 +0000 Subject: [PATCH] Uplift of #5551 (squashed) to beta --- .../src/bat/ledger/internal/uphold/uphold.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/vendor/bat-native-ledger/src/bat/ledger/internal/uphold/uphold.cc b/vendor/bat-native-ledger/src/bat/ledger/internal/uphold/uphold.cc index 97eaecbb1b92..f508727b1891 100644 --- a/vendor/bat-native-ledger/src/bat/ledger/internal/uphold/uphold.cc +++ b/vendor/bat-native-ledger/src/bat/ledger/internal/uphold/uphold.cc @@ -16,6 +16,7 @@ #include "bat/ledger/internal/uphold/uphold_authorization.h" #include "bat/ledger/internal/uphold/uphold_card.h" #include "bat/ledger/internal/uphold/uphold_util.h" +#include "bat/ledger/internal/wallet/wallet_util.h" #include "bat/ledger/internal/uphold/uphold_transfer.h" #include "bat/ledger/internal/uphold/uphold_wallet.h" #include "bat/ledger/internal/ledger_impl.h" @@ -259,14 +260,7 @@ void Uphold::OnDisconectWallet( return; } - if (wallet->status == ledger::WalletStatus::VERIFIED) { - wallet->status = ledger::WalletStatus::DISCONNECTED_VERIFIED; - } else if (wallet->status == ledger::WalletStatus::CONNECTED || - wallet->status == ledger::WalletStatus::NOT_CONNECTED) { - wallet->status = ledger::WalletStatus::DISCONNECTED_NOT_VERIFIED; - } - - wallet->token = ""; + wallet = braveledger_wallet::ResetWallet(std::move(wallet)); ledger_->ShowNotification( "wallet_disconnected",