From 839e6293624e8d590d5d74e5e4450b5b425142cd Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Mon, 10 Apr 2017 21:18:37 -0400 Subject: [PATCH] Fix bid position and claim sequence regexes --- ui/js/uri.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/js/uri.js b/ui/js/uri.js index 98883c6be..1eb86ada0 100644 --- a/ui/js/uri.js +++ b/ui/js/uri.js @@ -74,12 +74,12 @@ uri.parseLbryUri = function(lbryUri, requireProto=false) { throw new Error(`Invalid claim ID ${claimId}.`); } - if (bidPosition && !bidPosition.match(/^-?[1-9][0-9]+$/)) { - throw new Error('Bid position must be a number.'); + if (claimSequence && !claimSequence.match(/^-?[1-9][0-9]*$/)) { + throw new Error('Claim sequence must be a number.'); } - if (claimSequence && !claimSequence.match(/^-?[1-9][0-9]+$/)) { - throw new Error('Claim sequence must be a number.'); + if (bidPosition && !bidPosition.match(/^-?[1-9][0-9]*$/)) { + throw new Error('Bid position must be a number.'); } // Validate path