Skip to content

Commit

Permalink
Merge pull request #2175 from AlphaWallet/fix-network-select
Browse files Browse the repository at this point in the history
Fix for wallet network changing
  • Loading branch information
JamesSmartCell authored Oct 21, 2021
2 parents 92d1eea + 9bfd07a commit ff3bf9f
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 ff3bf9f

Please sign in to comment.