paste bip70 (#621)

This commit is contained in:
m2049r 2019-09-22 10:09:18 +02:00 committed by GitHub
parent f46ba75771
commit 2c3f582672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 3 deletions

View File

@ -140,7 +140,7 @@ public class SendAddressWizardFragment extends SendWizardFragment {
next = null; next = null;
} else { } else {
// maybe a bip72 or 70 URI // maybe a bip72 or 70 URI
String bip70 = PaymentProtocolHelper.getBip70(enteredAddress); final String bip70 = PaymentProtocolHelper.getBip70(enteredAddress);
if (bip70 != null) { if (bip70 != null) {
// looks good - resolve through xmr.to // looks good - resolve through xmr.to
processBip70(bip70); processBip70(bip70);
@ -198,8 +198,16 @@ public class SendAddressWizardFragment extends SendWizardFragment {
et.setText(address); et.setText(address);
et.setSelection(et.getText().length()); et.setSelection(et.getText().length());
etAddress.requestFocus(); etAddress.requestFocus();
} else } else {
Toast.makeText(getActivity(), getString(R.string.send_address_invalid), Toast.LENGTH_SHORT).show(); 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();
}
} }
}); });