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

@ -15,7 +15,7 @@ android {
applicationId "com.tangem.wallet"
minSdkVersion 21
targetSdkVersion 27
versionCode 65
versionCode 68
versionName "0.88.1." + generateVersionName()
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

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);

View file

@ -86,7 +86,7 @@ class ConfirmPaymentActivity : AppCompatActivity(), NfcAdapter.ReaderCallback {
etAmount!!.setText(intent.getStringExtra(SignPaymentActivity.EXTRA_AMOUNT))
tvCurrency.text = engine.getBalanceCurrency(card)
tvCurrency2.text = engine.getFeeCurrency()
tvCurrency2.text = engine.feeCurrency
tvCardID.text = card!!.cidDescription
@ -137,7 +137,7 @@ class ConfirmPaymentActivity : AppCompatActivity(), NfcAdapter.ReaderCallback {
val engineCoin = CoinEngineFactory.create(card!!.blockchain)
if (engineCoin!!.isNeedCheckNode() && !nodeCheck) {
if (engineCoin!!.isNeedCheckNode && !nodeCheck) {
Toast.makeText(baseContext, getString(R.string.cannot_reach_current_active_blockchain_node_try_again), Toast.LENGTH_LONG).show()
return@setOnClickListener
}
@ -159,7 +159,7 @@ class ConfirmPaymentActivity : AppCompatActivity(), NfcAdapter.ReaderCallback {
}
if (!engineCoin.checkAmountValue(card, txAmount, txFee, minFeeInInternalUnits)) {
finishActivityWithError(Activity.RESULT_CANCELED, getString(R.string.fee_exceeds_payment_amount_enter_correct_value_and_repeat_sending))
finishActivityWithError(Activity.RESULT_CANCELED, getString(R.string.not_enough_eth_for_transaction_fee))
return@setOnClickListener
}

View file

@ -173,7 +173,7 @@ class LoadedWallet : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
}
}
serverApiHelper!!.infura("eth_gasPrice", 67)
// serverApiHelper!!.infura("eth_gasPrice", 67)
// request card verify listener
serverApiHelper!!.setCardVerify {

View file

@ -115,6 +115,7 @@
<TextView
android:id="@+id/tvBlockchain"
android:layout_width="0dp"
android:layout_marginEnd="10dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:fontFamily="@font/maax"

View file

@ -169,7 +169,7 @@
<string name="cannot_check_balance_no_connection_with_blockchain_nodes">Cannot check balance! No connection with blockchain nodes</string>
<string name="the_wallet_is_empty">The wallet is empty</string>
<string name="please_wait_for_confirmation_of_incoming_transaction">Please wait for confirmation of incoming transaction</string>
<string name="fee_exceeds_payment_amount_enter_correct_value_and_repeat_sending">Fee exceeds payment amount. Enter correct value and repeat sending.</string>
<string name="not_enough_eth_for_transaction_fee">Not enough ETH for transaction fee</string>
<string name="pin_2_is_required_to_sign_the_payment">PIN2 is required to sign the payment</string>
<!-- EmptyWalletActivity -->