fix cashOut bug

This commit is contained in:
Josh Harvey 2017-09-05 18:30:08 +02:00
parent c860df1576
commit f6a7e11435
2 changed files with 7 additions and 1 deletions

1
connect.txt Normal file
View file

@ -0,0 +1 @@
http://192.168.1.108:8070?otp=faa31556ce0d7c3f11315a7d58a3b009274087de4078bc55f07b58d784cc25a5

View file

@ -23,13 +23,18 @@ function massage (tx) {
const transformDates = r => mapValuesWithKey(transformDate, r) const transformDates = r => mapValuesWithKey(transformDate, r)
const mapBN = r => { const mapBN = r => {
const update = { const update = r.direction === 'cashIn'
? {
cryptoAtoms: BN(r.cryptoAtoms), cryptoAtoms: BN(r.cryptoAtoms),
fiat: BN(r.fiat), fiat: BN(r.fiat),
cashInFee: BN(r.cashInFee), cashInFee: BN(r.cashInFee),
cashInFeeCrypto: BN(r.cashInFeeCrypto), cashInFeeCrypto: BN(r.cashInFeeCrypto),
minimumTx: BN(r.minimumTx) minimumTx: BN(r.minimumTx)
} }
: {
cryptoAtoms: BN(r.cryptoAtoms),
fiat: BN(r.fiat)
}
return _.assign(r, update) return _.assign(r, update)
} }