Browse Source

Merge pull request #1077 from meriadec/fix/1007-ripple-trustline

Fixes #1007
master
Meriadec Pillet 7 years ago
committed by GitHub
parent
commit
8280fb4bca
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/bridge/RippleJSBridge.js

6
src/bridge/RippleJSBridge.js

@ -192,9 +192,11 @@ type Tx = {
const txToOperation = (account: Account) => ({
id,
sequence,
type: txType,
outcome: { fee, deliveredAmount, ledgerVersion, timestamp },
specification: { source, destination },
}: Tx): Operation => {
}: Tx): ?Operation => {
if (txType === 'trustline') return null
const type = source.address === account.freshAddress ? 'OUT' : 'IN'
let value = deliveredAmount ? parseAPICurrencyObject(deliveredAmount) : 0
const feeValue = parseAPIValue(fee)
@ -334,7 +336,7 @@ const RippleJSBridge: WalletBridge<Transaction> = {
unit: currency.units[0],
lastSyncDate: new Date(),
}
account.operations = transactions.map(txToOperation(account))
account.operations = transactions.map(txToOperation(account)).filter(Boolean)
o.next(account)
}
}

Loading…
Cancel
Save