diff --git a/connect.txt b/connect.txt new file mode 100644 index 00000000..f57b1651 --- /dev/null +++ b/connect.txt @@ -0,0 +1 @@ +http://192.168.1.108:8070?otp=faa31556ce0d7c3f11315a7d58a3b009274087de4078bc55f07b58d784cc25a5 diff --git a/lib/tx.js b/lib/tx.js index fcc49b58..32c0bc70 100644 --- a/lib/tx.js +++ b/lib/tx.js @@ -23,13 +23,18 @@ function massage (tx) { const transformDates = r => mapValuesWithKey(transformDate, r) const mapBN = r => { - const update = { + const update = r.direction === 'cashIn' + ? { cryptoAtoms: BN(r.cryptoAtoms), fiat: BN(r.fiat), cashInFee: BN(r.cashInFee), cashInFeeCrypto: BN(r.cashInFeeCrypto), minimumTx: BN(r.minimumTx) } + : { + cryptoAtoms: BN(r.cryptoAtoms), + fiat: BN(r.fiat) + } return _.assign(r, update) }