Fix standard styling issues
This commit is contained in:
parent
01153d0562
commit
fa652b8e74
1 changed files with 7 additions and 7 deletions
|
|
@ -11,7 +11,7 @@ const NAME = 'BitGo'
|
||||||
|
|
||||||
function buildBitgo (account) {
|
function buildBitgo (account) {
|
||||||
const env = account.environment === 'test' ? 'test' : 'prod'
|
const env = account.environment === 'test' ? 'test' : 'prod'
|
||||||
return new BitGo.BitGo({accessToken: account.token, env, userAgent: userAgent})
|
return new BitGo.BitGo({ accessToken: account.token, env, userAgent: userAgent })
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWallet (account) {
|
function getWallet (account) {
|
||||||
|
|
@ -78,12 +78,12 @@ function newAddress (account, info) {
|
||||||
function getStatus (account, toAddress, requested, cryptoCode) {
|
function getStatus (account, toAddress, requested, cryptoCode) {
|
||||||
const bitgo = buildBitgo(account)
|
const bitgo = buildBitgo(account)
|
||||||
return checkCryptoCode(cryptoCode)
|
return checkCryptoCode(cryptoCode)
|
||||||
.then(() => bitgo.blockchain().getAddress({address: toAddress}))
|
.then(() => bitgo.blockchain().getAddress({ address: toAddress }))
|
||||||
.then(rec => {
|
.then(rec => {
|
||||||
if (rec.balance === 0) return {status: 'notSeen'}
|
if (rec.balance === 0) return { status: 'notSeen' }
|
||||||
if (requested.gt(rec.balance)) return {status: 'insufficientFunds'}
|
if (requested.gt(rec.balance)) return { status: 'insufficientFunds' }
|
||||||
if (requested.gt(rec.confirmedBalance)) return {status: 'authorized'}
|
if (requested.gt(rec.confirmedBalance)) return { status: 'authorized' }
|
||||||
return {status: 'confirmed'}
|
return { status: 'confirmed' }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,7 +95,7 @@ function newFunding (account, cryptoCode) {
|
||||||
return wallet.createAddress()
|
return wallet.createAddress()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
const fundingAddress = result.address
|
const fundingAddress = result.address
|
||||||
return wallet.updateAddress({address: fundingAddress, label: 'Funding Address'})
|
return wallet.updateAddress({ address: fundingAddress, label: 'Funding Address' })
|
||||||
.then(() => ({
|
.then(() => ({
|
||||||
fundingPendingBalance: BN(wallet._wallet.balanceString),
|
fundingPendingBalance: BN(wallet._wallet.balanceString),
|
||||||
fundingConfirmedBalance: BN(wallet._wallet.confirmedBalanceString),
|
fundingConfirmedBalance: BN(wallet._wallet.confirmedBalanceString),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue