mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2024-11-25 17:02:28 +00:00
monero spec, from what i've found, says to use tx_amount for amount in uri. some places just use "amount" like BTC or other coins like that
This commit is contained in:
parent
5bbfd5f8b2
commit
ca7684b83a
2 changed files with 7 additions and 2 deletions
|
@ -12,5 +12,6 @@ public class Constants {
|
|||
|
||||
public static final String URI_PREFIX = "monero:";
|
||||
public static final String URI_ARG_AMOUNT = "tx_amount";
|
||||
public static final String URI_ARG_AMOUNT2 = "amount";
|
||||
public static final String NAV_ARG_TXINFO = "nav_arg_txinfo";
|
||||
}
|
||||
|
|
|
@ -22,11 +22,15 @@ public class UriData {
|
|||
}
|
||||
|
||||
public String getAmount() {
|
||||
return params.get(Constants.URI_ARG_AMOUNT);
|
||||
String txAmount = params.get(Constants.URI_ARG_AMOUNT);
|
||||
if(txAmount == null) {
|
||||
return params.get(Constants.URI_ARG_AMOUNT2);
|
||||
}
|
||||
return txAmount;
|
||||
}
|
||||
|
||||
public boolean hasAmount() {
|
||||
return params.containsKey(Constants.URI_ARG_AMOUNT);
|
||||
return params.containsKey(Constants.URI_ARG_AMOUNT) || params.containsKey(Constants.URI_ARG_AMOUNT2);
|
||||
}
|
||||
|
||||
public static UriData parse(String uri) {
|
||||
|
|
Loading…
Reference in a new issue