Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyGrowl committed Oct 26, 2018
1 parent 92fbc11 commit 4347030
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/src/main/java/io/multy/ui/fragments/Web3Fragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private void showChooser(final int currencyId, final int networkId) {
dialog = WalletChooserDialogFragment.getInstance(currencyId, networkId);
} else if (dappUrl.equals(Prefs.getString(Constants.PREF_DRAGONS_URL, "no value")) &&
Prefs.getInt(Constants.PREF_URL_CURRENCY_ID, -1) != -1 &&
Prefs.getInt(Constants.PREF_URL_NETWORK_ID, -1) != -1) {
Prefs.getInt(Constants.PREF_URL_NETWORK_ID, -1) != -1) {
dialog = WalletChooserDialogFragment.getInstance(Prefs.getInt(Constants.PREF_URL_CURRENCY_ID), Prefs.getInt(Constants.PREF_URL_NETWORK_ID));
} else if (currencyId != -1) {
dialog = WalletChooserDialogFragment.getInstance(currencyId);
Expand Down Expand Up @@ -391,6 +391,8 @@ private void setWallet(long walletId) {
Wallet wallet = viewModel.getWallet(walletId);
fillWalletInfo(wallet);
webView.setWalletAddress(new Address(wallet.getActiveAddress().getAddress()));
webView.setRpcUrl(wallet.getNetworkId() == NativeDataHelper.NetworkId.TEST_NET.getValue() ?
"https://rinkeby.infura.io/v3/78ae782ed28e48c0b3f74ca69c4f7ca8" : "https://mainnet.infura.io/v3/78ae782ed28e48c0b3f74ca69c4f7ca8");
webView.setChainId(wallet.getNetworkId());
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/main/java/trust/web3/Web3View.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private void init() {
webViewClient = new Web3ViewClient(jsInjectorClient, new UrlHandlerManager());
WebSettings webSettings = super.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setCacheMode(WebSettings.LOAD_DEFAULT);
webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
webSettings.setBuiltInZoomControls(true);
webSettings.setDisplayZoomControls(false);
webSettings.setUseWideViewPort(true);
Expand Down

0 comments on commit 4347030

Please sign in to comment.