diff --git a/vendor/bat-native-confirmations/src/bat/confirmations/internal/refill_tokens.cc b/vendor/bat-native-confirmations/src/bat/confirmations/internal/refill_tokens.cc index c08e8e49952a..581aea92c092 100644 --- a/vendor/bat-native-confirmations/src/bat/confirmations/internal/refill_tokens.cc +++ b/vendor/bat-native-confirmations/src/bat/confirmations/internal/refill_tokens.cc @@ -53,12 +53,19 @@ void RefillTokens::Refill( public_key_ = public_key; + nonce_ = ""; + RequestSignedTokens(); } void RefillTokens::RetryGettingSignedTokens() { BLOG(INFO) << "Retry getting signed tokens"; + if (nonce_.empty()) { + RequestSignedTokens(); + return; + } + GetSignedTokens(); } @@ -309,8 +316,8 @@ void RefillTokens::OnRefill( BLOG(ERROR) << "Failed to refill tokens"; if (should_retry) { - confirmations_->StartRetryingToGetRefillSignedTokens( - kRetryGettingRefillSignedTokensAfterSeconds); + confirmations_->StartRetryingToGetRefillSignedTokens( + kRetryGettingRefillSignedTokensAfterSeconds); } return;