Monero uses a different query param for amount
(cherry picked from commit 6128df6e7443eb33318de0c966369df440e55e05)
This commit is contained in:
parent
30ff489e22
commit
de59e05880
1 changed files with 6 additions and 2 deletions
|
@ -943,15 +943,19 @@ public class MessageAdapter extends ArrayAdapter<Message> {
|
|||
viewHolder.audioPlayer.setVisibility(View.GONE);
|
||||
viewHolder.download_button.setVisibility(View.VISIBLE);
|
||||
final var uri = message.wholeIsKnownURI();
|
||||
if ("bitcoin".equals(uri.getScheme())) {
|
||||
final var amount = uri.getQueryParameter("amount");
|
||||
final var formattedAmount = amount == null || amount.equals("") ? "" : amount + " ";
|
||||
if ("bitcoin".equals(uri.getScheme())) {
|
||||
viewHolder.download_button.setIconResource(R.drawable.bitcoin_24dp);
|
||||
viewHolder.download_button.setText("Send " + formattedAmount + "Bitcoin");
|
||||
} else if ("bitcoincash".equals(uri.getScheme())) {
|
||||
final var amount = uri.getQueryParameter("amount");
|
||||
final var formattedAmount = amount == null || amount.equals("") ? "" : amount + " ";
|
||||
viewHolder.download_button.setIconResource(R.drawable.bitcoin_cash_24dp);
|
||||
viewHolder.download_button.setText("Send " + formattedAmount + "Bitcoin Cash");
|
||||
} else if ("monero".equals(uri.getScheme())) {
|
||||
final var amount = uri.getQueryParameter("tx_amount");
|
||||
final var formattedAmount = amount == null || amount.equals("") ? "" : amount + " ";
|
||||
viewHolder.download_button.setIconResource(R.drawable.monero_24dp);
|
||||
viewHolder.download_button.setText("Send " + formattedAmount + "Monero");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue