uri: remove old options.

This commit is contained in:
Christopher Jeffrey 2017-01-11 19:02:12 -08:00
parent f192dab0a6
commit 6e7a19ef35
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -58,11 +58,6 @@ URI.prototype.fromOptions = function fromOptions(options) {
this.amount = options.amount;
}
if (options.version != null) {
assert(util.isUInt32(options.version), 'Version must be a uint32.');
this.version = options.version;
}
if (options.label) {
assert(typeof options.label === 'string', 'Label must be a string.');
this.label = options.label;
@ -73,15 +68,6 @@ URI.prototype.fromOptions = function fromOptions(options) {
this.message = options.message;
}
if (options.key) {
if (typeof options.key === 'string') {
this.key = KeyRing.fromSecret(options.key);
} else {
this.key = KeyRing.fromOptions(options.key);
assert(this.key.privateKey, 'Key must have a private key.');
}
}
if (options.request) {
assert(typeof options.request === 'string', 'Request must be a string.');
this.request = options.request;