fix: send coins function arguments
This commit is contained in:
parent
3c33695b9d
commit
5eb4fca5a9
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ const ticker = require('../lib/ticker')
|
||||||
|
|
||||||
const [toAddress, cryptoValue, cryptoCode] = process.argv.slice(2)
|
const [toAddress, cryptoValue, cryptoCode] = process.argv.slice(2)
|
||||||
|
|
||||||
function computeCrypto(cryptoCode, value) {
|
function computeCrypto (cryptoCode, value) {
|
||||||
try {
|
try {
|
||||||
const cryptoRec = coinUtils.getCryptoCurrency(cryptoCode)
|
const cryptoRec = coinUtils.getCryptoCurrency(cryptoCode)
|
||||||
const unitScale = cryptoRec.unitScale
|
const unitScale = cryptoRec.unitScale
|
||||||
|
|
@ -75,7 +75,7 @@ settingsLoader.loadLatest()
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Sending...')
|
console.log('Sending...')
|
||||||
return wallet.sendCoins(settings, toAddress, cryptoAtoms, cryptoCode)
|
return wallet.sendCoins(settings, { toAddress, cryptoAtoms, cryptoCode })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log('Success.')
|
console.log('Success.')
|
||||||
process.exit(0)
|
process.exit(0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue