Updated on 2026-08-14

This commit is contained in:
Tangem 2018-09-03 11:18:31 +03:00
parent f47fe3b993
commit 90636a0e6a
6 changed files with 14 additions and 6 deletions

View file

@ -1,6 +1,7 @@
package com.tangem.data.network.task.confirm_payment;
import android.app.Activity;
import android.util.Log;
import android.view.View;
import com.tangem.data.network.request.InfuraRequest;
@ -36,13 +37,19 @@ public class ETHRequestTask extends InfuraTask {
if (request.isMethod(InfuraRequest.METHOD_ETH_GetGasPrice)) {
try {
String gasPrice = request.getResultString();
Log.i("sjjoefeff", gasPrice);
gasPrice = gasPrice.substring(2);
BigInteger l = new BigInteger(gasPrice, 16);
Log.i("sjjoefeff", gasPrice);
BigInteger m = confirmPaymentActivity.getCard().getBlockchain() == Blockchain.Token ? BigInteger.valueOf(55000) : BigInteger.valueOf(21000);
l = l.multiply(m);
String feeInGwei = confirmPaymentActivity.getCard().getAmountInGwei(String.valueOf(l));
Log.i("sjjoefeff", feeInGwei);
confirmPaymentActivity.setMinFee(feeInGwei);
confirmPaymentActivity.setMaxFee(feeInGwei);
confirmPaymentActivity.setNormalFee(feeInGwei);