Updated on 2026-08-14

This commit is contained in:
Tangem 2018-12-13 16:47:09 +03:00
parent 5c794c42dd
commit 4e11cfcec0
2 changed files with 15 additions and 6 deletions

View file

@ -236,12 +236,7 @@ public abstract class CoinEngine {
public void defineWallet() throws CardProtocol.TangemException {
try {
String wallet;
if (ctx.getBlockchain() == Blockchain.BitcoinCash) {
wallet = calculateAddress(ctx.getCard().getWalletPublicKeyRar());
} else {
wallet = calculateAddress(ctx.getCard().getWalletPublicKey());
}
String wallet = calculateAddress(ctx.getCard().getWalletPublicKey());
ctx.getCoinData().setWallet(wallet);
}
catch (Exception e)

View file

@ -424,6 +424,20 @@ public class BtcCashEngine extends CoinEngine {
return coinData.getUnspentInputsDescription();
}
@Override
public void defineWallet() throws CardProtocol.TangemException {
try {
String wallet = calculateAddress(ctx.getCard().getWalletPublicKeyRar());
ctx.getCoinData().setWallet(wallet);
}
catch (Exception e)
{
ctx.getCoinData().setWallet("ERROR");
throw new CardProtocol.TangemException("Can't define wallet address");
}
}
// @Override
// public String getAmountDescription(TangemCard mCard, String amount) throws Exception {
// return mCard.getAmountDescription(Double.parseDouble(amount));