bug fixes
This commit is contained in:
parent
f2a95e291a
commit
985e3811e3
14 changed files with 758 additions and 78 deletions
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
"code": "mailjet",
|
||||
"display": "Mailjet",
|
||||
"fields": [
|
||||
{
|
||||
"code": "apiKey",
|
||||
"display": "API key",
|
||||
"fieldType": "string",
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "apiSecret",
|
||||
"display": "API secret",
|
||||
"fieldType": "password",
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "fromEmail",
|
||||
"display": "From email",
|
||||
"fieldType": "string",
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "toEmail",
|
||||
"display": "To email",
|
||||
"fieldType": "string",
|
||||
"required": true,
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"code": "bitstamp",
|
||||
"display": "Bitstamp",
|
||||
"fields": [
|
||||
{
|
||||
"code": "clientId",
|
||||
"display": "Client ID",
|
||||
"fieldType": "string",
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "key",
|
||||
"display": "API key",
|
||||
"fieldType": "string",
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "secret",
|
||||
"display": "API secret",
|
||||
"fieldType": "password",
|
||||
"required": true,
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
"code": "twilio",
|
||||
"display": "Twilio",
|
||||
"fields": [
|
||||
{
|
||||
"code": "accountSid",
|
||||
"display": "Account SID",
|
||||
"fieldType": "string",
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "authToken",
|
||||
"display": "Auth token",
|
||||
"fieldType": "password",
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "fromNumber",
|
||||
"display": "From number",
|
||||
"fieldType": "string",
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "toNumber",
|
||||
"display": "To number",
|
||||
"fieldType": "string",
|
||||
"required": true,
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -11,12 +11,17 @@ function sendMessage (account, rec) {
|
|||
const body = rec.sms.body
|
||||
const _toNumber = rec.sms.toNumber || account.toNumber
|
||||
|
||||
return client.sendMessage({
|
||||
const opts = {
|
||||
body: body,
|
||||
to: _toNumber,
|
||||
from: account.fromNumber
|
||||
})
|
||||
}
|
||||
|
||||
console.log('DEBUG111: %j', opts)
|
||||
|
||||
return client.sendMessage(opts)
|
||||
.catch(err => {
|
||||
console.log('DEBUG113: %s', err)
|
||||
if (_.includes(err.code, BAD_NUMBER_CODES)) {
|
||||
const badNumberError = new Error(err.message)
|
||||
badNumberError.name = 'BadNumberError'
|
||||
|
|
@ -25,6 +30,7 @@ function sendMessage (account, rec) {
|
|||
|
||||
throw new Error(err.message)
|
||||
})
|
||||
.then(_.tap(() => console.log('DEBUG112')))
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
const BitGo = require('bitgo')
|
||||
const BN = require('../../../bn')
|
||||
|
||||
const pjson = require('../../../package.json')
|
||||
const pjson = require('../../../../package.json')
|
||||
const userAgent = 'Lamassu-Server/' + pjson.version
|
||||
|
||||
const NAME = 'BitGo'
|
||||
|
|
@ -51,8 +51,8 @@ function balance (account, cryptoCode) {
|
|||
.then(wallet => BN(wallet.wallet.spendableConfirmedBalance))
|
||||
}
|
||||
|
||||
function newAddress (account, cryptoCode, info) {
|
||||
return checkCryptoCode(cryptoCode)
|
||||
function newAddress (account, info) {
|
||||
return checkCryptoCode(info.cryptoCode)
|
||||
.then(() => getWallet(account))
|
||||
.then(wallet => {
|
||||
return wallet.createAddress()
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
"code": "bitgo",
|
||||
"display": "BitGo",
|
||||
"fields": [
|
||||
{
|
||||
"code": "token",
|
||||
"display": "API token",
|
||||
"fieldType": "string",
|
||||
"secret": true,
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "walletId",
|
||||
"display": "Wallet ID",
|
||||
"fieldType": "string",
|
||||
"secret": false,
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "walletPassphrase",
|
||||
"display": "Wallet passphrase",
|
||||
"fieldType": "string",
|
||||
"secret": true,
|
||||
"required": true,
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue