diff --git a/app/build.gradle b/app/build.gradle index 9c6e829861..7154210727 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -283,7 +283,7 @@ dependencies { // Wallet kits implementation 'com.github.horizontalsystems:ton-kit-android:763a5c3' implementation 'com.github.horizontalsystems:bitcoin-kit-android:ced5801' - implementation 'com.github.horizontalsystems:ethereum-kit-android:a5eff38' + implementation 'com.github.horizontalsystems:ethereum-kit-android:0c770e3' implementation 'com.github.horizontalsystems:blockchain-fee-rate-kit-android:1d3bd49' implementation 'com.github.horizontalsystems:binance-chain-kit-android:c1509a2' implementation 'com.github.horizontalsystems:market-kit-android:4201f8f' diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/evmfee/EvmCommonGasDataService.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/evmfee/EvmCommonGasDataService.kt index 4b4c59b0a9..feca8f1bd4 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/evmfee/EvmCommonGasDataService.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/evmfee/EvmCommonGasDataService.kt @@ -27,14 +27,18 @@ open class EvmCommonGasDataService( } return evmKit.estimateGas(stubTransactionData, gasPrice) - .map { estimatedGasLimit -> - val gasLimit = if (surchargeRequired) EvmFeeModule.surcharged(estimatedGasLimit) else estimatedGasLimit - GasData( - gasLimit = gasLimit, - estimatedGasLimit = estimatedGasLimit, - gasPrice = gasPrice - ) - } + .onErrorResumeNext { + evmKit.estimateGas(stubTransactionData) + } + .map { estimatedGasLimit -> + val gasLimit = + if (surchargeRequired) EvmFeeModule.surcharged(estimatedGasLimit) else estimatedGasLimit + GasData( + gasLimit = gasLimit, + estimatedGasLimit = estimatedGasLimit, + gasPrice = gasPrice + ) + } } companion object {