Commit 1b616660 authored by Andreas Schildbach's avatar Andreas Schildbach

InputParser: Allow all-uppercase BITCOIN scheme in Bitcoin URIs.

parent 767de96a
......@@ -102,6 +102,7 @@
<action android:name="android.intent.action.VIEW" />
<data android:scheme="bitcoin" />
<data android:scheme="BITCOIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
......
......@@ -94,9 +94,9 @@ public abstract class InputParser {
error(R.string.input_parser_invalid_paymentrequest, x.getMessage());
}
} else if (input.startsWith("bitcoin:")) {
} else if (input.startsWith("bitcoin:") || input.startsWith("BITCOIN:")) {
try {
final BitcoinURI bitcoinUri = new BitcoinURI(null, input);
final BitcoinURI bitcoinUri = new BitcoinURI(null, "bitcoin:" + input.substring(8));
final Address address = bitcoinUri.getAddress();
if (address != null && !Constants.NETWORK_PARAMETERS.equals(address.getParameters()))
throw new BitcoinURIParseException("mismatched network");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment