Updated on 2026-08-14
This commit is contained in:
parent
5c794c42dd
commit
4e11cfcec0
2 changed files with 15 additions and 6 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue