Updated on 2026-08-14

This commit is contained in:
Tangem 2019-01-29 09:14:21 +03:00
parent 06e972b8db
commit fa92ff45c8
11 changed files with 80 additions and 13 deletions

View file

@ -61,10 +61,10 @@ class ConfirmTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallbac
amount = CoinEngine.Amount(intent.getStringExtra(Constant.EXTRA_AMOUNT), intent.getStringExtra(Constant.EXTRA_AMOUNT_CURRENCY))
if (ctx.blockchain == Blockchain.Token && amount.currency != Blockchain.Ethereum.currency)
tvIncFee.visibility = View.INVISIBLE
else
if (engine.allowSelectFeeInclusion())
tvIncFee.visibility = View.VISIBLE
else
tvIncFee.visibility = View.INVISIBLE
etAmount.setText(amount.toValueString())
tvCurrency.text = engine.balanceCurrency
@ -74,8 +74,9 @@ class ConfirmTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallbac
btnSend.visibility = View.INVISIBLE
val allowFeeLevelSelection = engine!!.allowSelectFeeLevel()
for (lol in rgFee.touchables) {
lol.isEnabled = !(ctx.blockchain == Blockchain.Ethereum || ctx.blockchain == Blockchain.EthereumTestNet || ctx.blockchain == Blockchain.Token || ctx.blockchain == Blockchain.BitcoinCash || ctx.blockchain == Blockchain.Litecoin)
lol.isEnabled = allowFeeLevelSelection
}
// set listeners

View file

@ -55,16 +55,15 @@ class PrepareTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallbac
@Suppress("DEPRECATION") val html = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
Html.fromHtml(engine!!.balanceHTML, Html.FROM_HTML_MODE_LEGACY)
else
else
Html.fromHtml(engine!!.balanceHTML)
tvBalance.text = html
//TODO - to engine
if ((ctx.blockchain == Blockchain.Token && engine.balance.currency!=Blockchain.Ethereum.currency) ||
((ctx.blockchain == Blockchain.RootstockToken && engine.balance.currency!=Blockchain.Rootstock.currency))){
if (!engine.allowSelectFeeInclusion()) {
rgIncFee.visibility = View.INVISIBLE
} else
} else {
rgIncFee.visibility = View.VISIBLE
}
if (ctx.card!!.remainingSignatures < 2)
etAmount.isEnabled = false