diff --git a/app/build.gradle b/app/build.gradle index 9c5915f2b2..eec350794b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -15,7 +15,7 @@ android { applicationId "com.tangem.wallet" minSdkVersion 21 targetSdkVersion 27 - versionCode 76 + versionCode 77 versionName "0.88.1." + generateVersionName() testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } @@ -47,9 +47,9 @@ dependencies { implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:design:27.1.1' implementation 'com.android.support:support-compat:27.1.1' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.android.support:cardview-v7:27.1.1' implementation 'com.android.support:support-v4:27.1.1' + implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.google.zxing:core:3.3.2' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.madgag.spongycastle:core:1.56.0.0' diff --git a/app/src/main/java/com/tangem/presentation/activity/ConfirmPaymentActivity.kt b/app/src/main/java/com/tangem/presentation/activity/ConfirmPaymentActivity.kt index 4a0d906381..92ae0fb282 100644 --- a/app/src/main/java/com/tangem/presentation/activity/ConfirmPaymentActivity.kt +++ b/app/src/main/java/com/tangem/presentation/activity/ConfirmPaymentActivity.kt @@ -77,24 +77,24 @@ class ConfirmPaymentActivity : AppCompatActivity(), NfcAdapter.ReaderCallback { rgFee = findViewById(R.id.rgFee) val engine = CoinEngineFactory.create(card!!.blockchain) + + val balanceWithAlter = engine!!.getBalanceWithAlter(card).replace(",", ".") if (card!!.blockchain == Blockchain.Token) { - val html = Html.fromHtml(engine!!.getBalanceWithAlter(card)) + val html = Html.fromHtml(balanceWithAlter) tvBalance.text = html } else - tvBalance.text = engine!!.getBalanceWithAlter(card) + tvBalance.text = balanceWithAlter - incFee = intent.getBooleanExtra("IncFee", true); - if (incFee) { - tvIncFee!!.setText(R.string.including_fee) - } else { - tvIncFee!!.setText(R.string.not_including_fee) - } + incFee = intent.getBooleanExtra("IncFee", true) + if (incFee) + tvIncFee.setText(R.string.including_fee) + else + tvIncFee.setText(R.string.not_including_fee) - if (card!!.blockchain == Blockchain.Token) { - tvIncFee!!.visibility = View.INVISIBLE - } else { - tvIncFee!!.visibility = View.VISIBLE - } + if (card!!.blockchain == Blockchain.Token) + tvIncFee.visibility = View.INVISIBLE + else + tvIncFee.visibility = View.VISIBLE etAmount!!.setText(intent.getStringExtra(SignPaymentActivity.EXTRA_AMOUNT)) tvCurrency.text = engine.getBalanceCurrency(card) @@ -102,7 +102,7 @@ class ConfirmPaymentActivity : AppCompatActivity(), NfcAdapter.ReaderCallback { tvCardID.text = card!!.cidDescription - etWallet!!.setText(intent.getStringExtra("Wallet")) + etWallet.setText(intent.getStringExtra("Wallet")) etFee!!.setText("?") @@ -175,8 +175,6 @@ class ConfirmPaymentActivity : AppCompatActivity(), NfcAdapter.ReaderCallback { } catch (e: Exception) { e.printStackTrace() tvFeeEquivalent.text = "" - tvCurrency2.visibility = View.GONE - tvFeeEquivalent.visibility = View.GONE } } @@ -231,7 +229,6 @@ class ConfirmPaymentActivity : AppCompatActivity(), NfcAdapter.ReaderCallback { } - // request estimate fee listener serverApiHelper!!.setEstimateFee { blockCount, estimateFeeResponse -> when (blockCount) {