Updated on 2026-08-14
This commit is contained in:
parent
ec3fe16009
commit
a2e21a5d11
4 changed files with 21 additions and 2 deletions
|
|
@ -19,6 +19,7 @@ import com.tangem.domain.wallet.token.TokenEngine;
|
|||
import com.tangem.tangemcard.data.TangemCard;
|
||||
import com.tangem.tangemcard.tasks.SignTask;
|
||||
import com.tangem.util.CryptoUtil;
|
||||
import com.tangem.wallet.R;
|
||||
|
||||
import org.bitcoinj.core.ECKey;
|
||||
|
||||
|
|
@ -109,6 +110,22 @@ public class RskTokenEngine extends TokenEngine {
|
|||
@Override
|
||||
public Uri getShareWalletUri() { return Uri.parse(ctx.getCoinData().getWallet()); }
|
||||
|
||||
@Override
|
||||
public boolean isExtractPossible() {
|
||||
if (!hasBalanceInfo()) {
|
||||
ctx.setMessage(R.string.cannot_obtain_data_from_blockchain);
|
||||
} else if (!isBalanceNotZero()) {
|
||||
ctx.setMessage(R.string.wallet_empty);
|
||||
} else if (awaitingConfirmation()) {
|
||||
ctx.setMessage(R.string.please_wait_while_previous);
|
||||
} else if (!isBalanceAlterNotZero()) {
|
||||
ctx.setMessage(ctx.getString(R.string.not_enough_rbtc_for_fee));
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkNewTransactionAmount(Amount amount) {
|
||||
if (!hasBalanceInfo()) return false;
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ public class TokenEngine extends CoinEngine {
|
|||
return true;
|
||||
}
|
||||
|
||||
private boolean isBalanceAlterNotZero() {
|
||||
protected boolean isBalanceAlterNotZero() {
|
||||
if (coinData == null) return false;
|
||||
if (coinData.getBalanceAlterInInternalUnits() == null) return false;
|
||||
return coinData.getBalanceAlterInInternalUnits().notZero();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@ class PreparePaymentActivity : AppCompatActivity(), NfcAdapter.ReaderCallback {
|
|||
tvBalance.text = html
|
||||
|
||||
//TODO - to engine
|
||||
if (ctx.blockchain == Blockchain.Token && engine.balance.currency!=Blockchain.Ethereum.currency) {
|
||||
if ((ctx.blockchain == Blockchain.Token && engine.balance.currency!=Blockchain.Ethereum.currency) ||
|
||||
((ctx.blockchain == Blockchain.RootstockToken && engine.balance.currency!=Blockchain.Rootstock.currency))){
|
||||
rgIncFee!!.visibility = View.INVISIBLE
|
||||
} else {
|
||||
rgIncFee!!.visibility = View.VISIBLE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue