|
@ -56,12 +56,13 @@ BIP21.prototype.parse = function(uri) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// workaround to host insensitiveness
|
|
|
// workaround to host insensitiveness
|
|
|
var group = uri.match('[^:]*:/?/?([^?]*)'); |
|
|
var group = /[^:]*:/?/?([^?]*)/.exec(uri); |
|
|
this.setAddress(group && group[1]); |
|
|
this.setAddress(group && group[1]); |
|
|
|
|
|
|
|
|
for (var arg in info.query) { |
|
|
for (var arg in info.query) { |
|
|
var val = info.query[arg]; |
|
|
var val = info.query[arg]; |
|
|
if (arg == 'amount') val = Number(val); |
|
|
if (arg === 'amount') val = Number(val); |
|
|
|
|
|
if (arg === 'r') this.data.merchant = val; |
|
|
this.data[arg] = val; |
|
|
this.data[arg] = val; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|