Updated on 2026-08-14

This commit is contained in:
Tangem 2018-09-11 18:01:02 +03:00
parent e0e92d84d7
commit a60737c318
2 changed files with 16 additions and 19 deletions

View file

@ -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'

View file

@ -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) {