Updated on 2026-08-14
This commit is contained in:
parent
ebc3abcfe1
commit
48db52b2a9
99 changed files with 860 additions and 895 deletions
|
|
@ -5,6 +5,8 @@ import android.content.Intent;
|
|||
import android.os.Bundle;
|
||||
|
||||
import com.tangem.Constant;
|
||||
import com.tangem.tangemcard.data.Blockchain;
|
||||
import com.tangem.tangemcard.data.TangemCard;
|
||||
|
||||
|
||||
public class TangemContext {
|
||||
|
|
@ -121,4 +123,17 @@ public class TangemContext {
|
|||
if (context != null) return getContext().getResources().getString(stringId);
|
||||
return "context.resources.string[" + stringId + "]";
|
||||
}
|
||||
|
||||
public void setDenomination(byte[] denomination) {
|
||||
try {
|
||||
CoinEngine engine= CoinEngineFactory.INSTANCE.create(getBlockchain());
|
||||
CoinEngine.InternalAmount internalAmount=engine.convertToInternalAmount(denomination);
|
||||
CoinEngine.Amount amount=engine.convertToAmount(internalAmount);
|
||||
card.setDenomination(denomination,amount.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
card.setDenomination(denomination,"N/A");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue