cli: fix sending.
This commit is contained in:
parent
9e479483f5
commit
f0630a830a
13
bin/cli
13
bin/cli
@ -274,16 +274,17 @@ CLI.prototype.sendTX = co(function* sendTX() {
|
|||||||
|
|
||||||
if (this.config.has('script')) {
|
if (this.config.has('script')) {
|
||||||
output.script = this.config.str('script');
|
output.script = this.config.str('script');
|
||||||
output.value = Amount.value(this.config.num(['value', 0]));
|
output.value = this.config.str(['value', 0]);
|
||||||
} else {
|
} else {
|
||||||
output.address = this.config.str(['address', 0]);
|
output.address = this.config.str(['address', 0]);
|
||||||
output.value = Amount.value(this.config.num(['value', 1]));
|
output.value = this.config.str(['value', 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
account: this.config.str('account'),
|
account: this.config.str('account'),
|
||||||
passphrase: this.config.str('passphrase'),
|
passphrase: this.config.str('passphrase'),
|
||||||
outputs: [output],
|
outputs: [output],
|
||||||
|
smart: this.config.bool('smart'),
|
||||||
rate: this.config.str('rate')
|
rate: this.config.str('rate')
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -298,16 +299,18 @@ CLI.prototype.createTX = co(function* createTX() {
|
|||||||
|
|
||||||
if (this.config.has('script')) {
|
if (this.config.has('script')) {
|
||||||
output.script = this.config.str('script');
|
output.script = this.config.str('script');
|
||||||
output.value = Amount.value(this.config.str(['value', 0]));
|
output.value = this.config.str(['value', 0]);
|
||||||
} else {
|
} else {
|
||||||
output.address = this.config.str(['address', 0]);
|
output.address = this.config.str(['address', 0]);
|
||||||
output.value = Amount.value(this.config.num(['value', 1]));
|
output.value = this.config.str(['value', 1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
account: this.config.str('account'),
|
account: this.config.str('account'),
|
||||||
passphrase: this.config.str('passphrase'),
|
passphrase: this.config.str('passphrase'),
|
||||||
outputs: [output]
|
outputs: [output],
|
||||||
|
smart: this.config.bool('smart'),
|
||||||
|
rate: this.config.str('rate')
|
||||||
};
|
};
|
||||||
|
|
||||||
tx = yield this.wallet.createTX(options);
|
tx = yield this.wallet.createTX(options);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user