add blockchain install scripts
This commit is contained in:
parent
0e9e27b97b
commit
178f576cfb
39 changed files with 3938 additions and 750 deletions
|
|
@ -40,11 +40,10 @@ function balance (account, cryptoCode) {
|
|||
}
|
||||
|
||||
function sendCoins (account, address, cryptoAtoms, cryptoCode) {
|
||||
const confirmations = 1
|
||||
const bitcoins = cryptoAtoms.shift(-SATOSHI_SHIFT).toFixed(8)
|
||||
const coins = cryptoAtoms.shift(-SATOSHI_SHIFT).toFixed(8)
|
||||
|
||||
return checkCryptoCode(cryptoCode)
|
||||
.then(() => fetch('sendfrom', [address, bitcoins, confirmations]))
|
||||
.then(() => fetch('sendtoaddress', [address, coins]))
|
||||
.catch(err => {
|
||||
if (err.code === -6) throw new E.InsufficientFundsError()
|
||||
throw err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue