Updated on 2026-08-14
This commit is contained in:
parent
7c49298522
commit
30616bbfcd
2 changed files with 25 additions and 3 deletions
|
|
@ -105,4 +105,25 @@ public enum Blockchain {
|
|||
return getImageResource();
|
||||
}
|
||||
|
||||
public String getUriScheme() {
|
||||
String scheme = null;
|
||||
switch (this) {
|
||||
case Bitcoin:
|
||||
case BitcoinDual:
|
||||
scheme = "bitcoin";
|
||||
break;
|
||||
case Ethereum:
|
||||
case Token:
|
||||
case TokenEmv:
|
||||
scheme = "ethereum";
|
||||
break;
|
||||
case Litecoin:
|
||||
scheme = "litecoin";
|
||||
break;
|
||||
case Ripple:
|
||||
scheme = "ripple";
|
||||
}
|
||||
return scheme;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,10 +197,11 @@ public abstract class CoinEngine {
|
|||
public abstract Uri getShareWalletUri();
|
||||
|
||||
public Uri getShareWalletUriEx(){
|
||||
if (ctx.getBlockchain() == Blockchain.BitcoinCash)
|
||||
return getShareWalletUri();
|
||||
String scheme = ctx.getBlockchain().getUriScheme();
|
||||
if (scheme != null)
|
||||
return Uri.parse(scheme + ":" + getShareWalletUri());
|
||||
else
|
||||
return Uri.parse(ctx.getBlockchain().name().toLowerCase() + ":" + getShareWalletUri().toString());
|
||||
return getShareWalletUri();
|
||||
}
|
||||
|
||||
public abstract boolean checkNewTransactionAmount(Amount amount);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue