diff --git a/app/src/main/java/com/alphawallet/app/repository/EthereumNetworkBase.java b/app/src/main/java/com/alphawallet/app/repository/EthereumNetworkBase.java index 2defcda9b0..31d1a88765 100644 --- a/app/src/main/java/com/alphawallet/app/repository/EthereumNetworkBase.java +++ b/app/src/main/java/com/alphawallet/app/repository/EthereumNetworkBase.java @@ -1097,7 +1097,7 @@ private static String getNodeRPC(String infuraKey, long chainId) } else { - return info.backupNodeUrl != null ? info.backupNodeUrl : info.rpcServerUrl; + return info.rpcServerUrl; // Not Infura, use directly } } diff --git a/app/src/main/java/com/alphawallet/app/web3/JsInjectorClient.java b/app/src/main/java/com/alphawallet/app/web3/JsInjectorClient.java index 12083fd398..b9c3806026 100644 --- a/app/src/main/java/com/alphawallet/app/web3/JsInjectorClient.java +++ b/app/src/main/java/com/alphawallet/app/web3/JsInjectorClient.java @@ -65,7 +65,7 @@ public void setChainId(long chainId) public void setTSChainId(long chainId) { this.chainId = chainId; - this.rpcUrl = EthereumNetworkRepository.getTSNodeURL(chainId); + this.rpcUrl = EthereumNetworkRepository.getDefaultNodeURL(chainId); } public String initJs(Context context) diff --git a/app/src/main/java/com/alphawallet/app/web3/Web3TokenView.java b/app/src/main/java/com/alphawallet/app/web3/Web3TokenView.java index 0b8b22010e..5de22e1b2f 100644 --- a/app/src/main/java/com/alphawallet/app/web3/Web3TokenView.java +++ b/app/src/main/java/com/alphawallet/app/web3/Web3TokenView.java @@ -153,35 +153,7 @@ private void init() { @Override public boolean onConsoleMessage(ConsoleMessage msg) { - if (!showingError && msg.messageLevel() == ConsoleMessage.MessageLevel.ERROR) - { - if (msg.message().contains(REFRESH_ERROR)) return true; //don't stop for refresh error - String errorLine = ""; - try - { - LineNumberReader lineNumberReader = new LineNumberReader(new StringReader(unencodedPage)); - lineNumberReader.setLineNumber(0); - - String lineStr; - while ((lineStr = lineNumberReader.readLine()) != null) - { - if (lineNumberReader.getLineNumber() == msg.lineNumber()) - { - errorLine = Utils.escapeHTML(lineStr); //ensure string is displayed exactly how it is read - break; - } - } - } - catch (Exception e) - { - errorLine = ""; - } - - String errorMessage = RENDERING_ERROR.replace("${ERR1}", msg.message()); - if (!TextUtils.isEmpty(errorLine)) errorMessage += RENDERING_ERROR_SUPPLIMENTAL.replace("$ERR1", String.valueOf(msg.lineNumber())).replace("$ERR2", errorLine); //.replace("$ERR2", errorMessage) - showError(errorMessage); - unencodedPage = null; - } + Timber.w("Web3Token Message: %s", msg.message()); return true; } diff --git a/build.gradle b/build.gradle index 27caeb39af..2b5610a4ba 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { classpath 'com.android.tools.build:gradle:7.4.2' //NB - there is an issue with newer versions of gradle. The APK balloons out, so far haven't diagnosed why. //If you want to try upgrading gradle plugin past 3.5.4 you will need to also diagnose the APK ballooning issue. - classpath "io.realm:realm-gradle-plugin:10.16.1" + classpath "io.realm:realm-gradle-plugin:10.18.0" // WARNING WARNING WARNING // you are about to add here a dependency to be used in the Android app // don't do that. add that dependency to app/build.gradle