Skip to content

Commit

Permalink
Ensure solana_provider_ is connected before checking IsSolanaKeyringC…
Browse files Browse the repository at this point in the history
…reated (uplift to 1.47.x) (#16938)

Uplift of #16928 (squashed) to release
  • Loading branch information
brave-builds committed Jan 31, 2023
1 parent 309f3cd commit 50f88be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/brave_wallet/renderer/js_solana_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void JSSolanaProvider::AccountChangedEvent(
}

void JSSolanaProvider::DidFinishLoad() {
if (wallet_standard_loaded_) {
if (wallet_standard_loaded_ || !EnsureConnected()) {
return;
}
solana_provider_->IsSolanaKeyringCreated(
Expand Down Expand Up @@ -993,7 +993,7 @@ v8::Local<v8::Value> JSSolanaProvider::CreateTransaction(
}

void JSSolanaProvider::OnIsSolanaKeyringCreated(bool created) {
if (!created) {
if (!created || !render_frame()) {
return;
}
v8::Isolate* isolate = blink::MainThreadIsolate();
Expand Down

0 comments on commit 50f88be

Please sign in to comment.