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 { public void defineWallet() throws CardProtocol.TangemException {
try { try {
String wallet; String wallet = calculateAddress(ctx.getCard().getWalletPublicKey());
if (ctx.getBlockchain() == Blockchain.BitcoinCash) {
wallet = calculateAddress(ctx.getCard().getWalletPublicKeyRar());
} else {
wallet = calculateAddress(ctx.getCard().getWalletPublicKey());
}
ctx.getCoinData().setWallet(wallet); ctx.getCoinData().setWallet(wallet);
} }
catch (Exception e) catch (Exception e)

View file

@ -424,6 +424,20 @@ public class BtcCashEngine extends CoinEngine {
return coinData.getUnspentInputsDescription(); 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 // @Override
// public String getAmountDescription(TangemCard mCard, String amount) throws Exception { // public String getAmountDescription(TangemCard mCard, String amount) throws Exception {
// return mCard.getAmountDescription(Double.parseDouble(amount)); // return mCard.getAmountDescription(Double.parseDouble(amount));