From 2c3f5826726378dd674ae90f27f6b325b8cf7f28 Mon Sep 17 00:00:00 2001 From: m2049r Date: Sun, 22 Sep 2019 10:09:18 +0200 Subject: [PATCH] paste bip70 (#621) --- .../fragment/send/SendAddressWizardFragment.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/m2049r/xmrwallet/fragment/send/SendAddressWizardFragment.java b/app/src/main/java/com/m2049r/xmrwallet/fragment/send/SendAddressWizardFragment.java index b5cd86cd..98edc0a9 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/fragment/send/SendAddressWizardFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/fragment/send/SendAddressWizardFragment.java @@ -140,7 +140,7 @@ public class SendAddressWizardFragment extends SendWizardFragment { next = null; } else { // maybe a bip72 or 70 URI - String bip70 = PaymentProtocolHelper.getBip70(enteredAddress); + final String bip70 = PaymentProtocolHelper.getBip70(enteredAddress); if (bip70 != null) { // looks good - resolve through xmr.to processBip70(bip70); @@ -198,8 +198,16 @@ public class SendAddressWizardFragment extends SendWizardFragment { et.setText(address); et.setSelection(et.getText().length()); etAddress.requestFocus(); - } else - Toast.makeText(getActivity(), getString(R.string.send_address_invalid), Toast.LENGTH_SHORT).show(); + } else { + final String bip70 = PaymentProtocolHelper.getBip70(clip); + if (bip70 != null) { + final EditText et = etAddress.getEditText(); + et.setText(clip); + et.setSelection(et.getText().length()); + processBip70(bip70); + } else + Toast.makeText(getActivity(), getString(R.string.send_address_invalid), Toast.LENGTH_SHORT).show(); + } } });