Skip to content

Commit

Permalink
Fix for wallet network changing
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesSmartCell committed Oct 21, 2021
1 parent 5e44575 commit 9bfd07a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,7 @@ public void onActivityResult(Uri uri) {
ActivityResultLauncher<Intent> getNetwork = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(),
result -> {
int networkId = result.getData().getIntExtra(C.EXTRA_CHAIN_ID, 1);
forceChainChange = networkId;
loadNewNetwork(networkId);
});

Expand Down Expand Up @@ -1118,7 +1119,6 @@ public void OnWalletAddEthereumChainObject(WalletAddEthereumChainObject chainObj

if (forceChainChange != 0)
{
forceChainChange = 0;
return; //No action if chain change is forced
}

Expand Down Expand Up @@ -1471,7 +1471,7 @@ public void onWebpageLoadComplete()
loadUrlAfterReload = null;
if (forceChainChange != 0)
{
handler.postDelayed(() -> forceChainChange = 0, 3000);
handler.postDelayed(() -> forceChainChange = 0, 5000);
}
}
}); //execute on UI thread
Expand Down

0 comments on commit 9bfd07a

Please sign in to comment.