format for latest standard
This commit is contained in:
parent
4108efd9c7
commit
c2af183911
77 changed files with 1697 additions and 1693 deletions
|
|
@ -9,7 +9,6 @@ const schemas = ph.loadSchemas()
|
||||||
function fetchAccounts () {
|
function fetchAccounts () {
|
||||||
return db.oneOrNone('select data from user_config where type=$1', ['accounts'])
|
return db.oneOrNone('select data from user_config where type=$1', ['accounts'])
|
||||||
.then(row => {
|
.then(row => {
|
||||||
|
|
||||||
// Hard code this for now
|
// Hard code this for now
|
||||||
const accounts = [{
|
const accounts = [{
|
||||||
code: 'blockcypher',
|
code: 'blockcypher',
|
||||||
|
|
|
||||||
|
|
@ -114,4 +114,3 @@ function run () {
|
||||||
inquirer.prompt(questions)
|
inquirer.prompt(questions)
|
||||||
.then(answers => processCryptos(answers.crypto))
|
.then(answers => processCryptos(answers.crypto))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,3 @@ function run () {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -505,13 +505,23 @@ function plugins (settings, deviceId) {
|
||||||
: null
|
: null
|
||||||
|
|
||||||
const cassette1Alert = cashOutEnabled && device.cassette1 < config.cashOutCassette1AlertThreshold
|
const cassette1Alert = cashOutEnabled && device.cassette1 < config.cashOutCassette1AlertThreshold
|
||||||
? {code: 'LOW_CASH_OUT', cassette: 1, machineName, deviceId: device.deviceId,
|
? {code: 'LOW_CASH_OUT',
|
||||||
notes: device.cassette1, denomination: denomination1, fiatCode}
|
cassette: 1,
|
||||||
|
machineName,
|
||||||
|
deviceId: device.deviceId,
|
||||||
|
notes: device.cassette1,
|
||||||
|
denomination: denomination1,
|
||||||
|
fiatCode}
|
||||||
: null
|
: null
|
||||||
|
|
||||||
const cassette2Alert = cashOutEnabled && device.cassette2 < config.cashOutCassette2AlertThreshold
|
const cassette2Alert = cashOutEnabled && device.cassette2 < config.cashOutCassette2AlertThreshold
|
||||||
? {code: 'LOW_CASH_OUT', cassette: 2, machineName, deviceId: device.deviceId,
|
? {code: 'LOW_CASH_OUT',
|
||||||
notes: device.cassette2, denomination: denomination2, fiatCode}
|
cassette: 2,
|
||||||
|
machineName,
|
||||||
|
deviceId: device.deviceId,
|
||||||
|
notes: device.cassette2,
|
||||||
|
denomination: denomination2,
|
||||||
|
fiatCode}
|
||||||
: null
|
: null
|
||||||
|
|
||||||
return _.compact([cashInAlert, cassette1Alert, cassette2Alert])
|
return _.compact([cashInAlert, cassette1Alert, cassette2Alert])
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ const axios = require('axios')
|
||||||
const BN = require('../../../bn')
|
const BN = require('../../../bn')
|
||||||
|
|
||||||
function ticker (account, fiatCode, cryptoCode) {
|
function ticker (account, fiatCode, cryptoCode) {
|
||||||
|
|
||||||
return axios.get('https://bitpay.com/api/rates/' + cryptoCode + '/' + fiatCode)
|
return axios.get('https://bitpay.com/api/rates/' + cryptoCode + '/' + fiatCode)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
const data = r.data
|
const data = r.data
|
||||||
|
|
|
||||||
|
|
@ -52,4 +52,3 @@ function ticker (account, fiatCode, cryptoCode) {
|
||||||
module.exports = {
|
module.exports = {
|
||||||
ticker
|
ticker
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,4 +35,3 @@ function authorize (account, toAddress, cryptoAtoms, cryptoCode) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue