Merge pull request #1 from chjj/feature/BIP21
Feature/bip21 - some changes
This commit is contained in:
commit
dd2dbddfde
|
@ -56,12 +56,13 @@ BIP21.prototype.parse = function(uri) {
|
|||
}
|
||||
|
||||
// workaround to host insensitiveness
|
||||
var group = uri.match('[^:]*:/?/?([^?]*)');
|
||||
var group = /[^:]*:/?/?([^?]*)/.exec(uri);
|
||||
this.setAddress(group && group[1]);
|
||||
|
||||
for (var arg in info.query) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue