Skip to content

Commit

Permalink
Merge pull request #13 from ReneUhrin/master
Browse files Browse the repository at this point in the history
check prefix in BTC
  • Loading branch information
rpanak-generalbytes authored Nov 30, 2018
2 parents bad4648 + b362859 commit 0826dd6
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,15 @@ public Classification classify(String input) {
return new Classification(Classification.TYPE_UNKNOWN);
}
input = input.trim().replace("\n","");


if (input.contains(":")) {
//remove leading protocol
input = input.substring(input.indexOf(":") + 1);
if (!input.toLowerCase().startsWith("bitcoin:")) {
return new Classification(Classification.TYPE_UNKNOWN);
} else {
//remove leading protocol
input = input.substring(input.indexOf(":") + 1);
}
}

//remove leading slashes
Expand Down

0 comments on commit 0826dd6

Please sign in to comment.