Skip to content

Commit 2d33c03

Browse files
committed
Tokens fail to retry due to empty nonce
1 parent 0e5e600 commit 2d33c03

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

vendor/bat-native-confirmations/src/bat/confirmations/internal/refill_tokens.cc

+9-2
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,19 @@ void RefillTokens::Refill(
5353

5454
public_key_ = public_key;
5555

56+
nonce_ = "";
57+
5658
RequestSignedTokens();
5759
}
5860

5961
void RefillTokens::RetryGettingSignedTokens() {
6062
BLOG(INFO) << "Retry getting signed tokens";
6163

64+
if (nonce_.empty()) {
65+
RequestSignedTokens();
66+
return;
67+
}
68+
6269
GetSignedTokens();
6370
}
6471

@@ -309,8 +316,8 @@ void RefillTokens::OnRefill(
309316
BLOG(ERROR) << "Failed to refill tokens";
310317

311318
if (should_retry) {
312-
confirmations_->StartRetryingToGetRefillSignedTokens(
313-
kRetryGettingRefillSignedTokensAfterSeconds);
319+
confirmations_->StartRetryingToGetRefillSignedTokens(
320+
kRetryGettingRefillSignedTokensAfterSeconds);
314321
}
315322

316323
return;

0 commit comments

Comments
 (0)