diff --git a/src/bridge/EthereumJSBridge.js b/src/bridge/EthereumJSBridge.js index 634b73ab..c7413e7b 100644 --- a/src/bridge/EthereumJSBridge.js +++ b/src/bridge/EthereumJSBridge.js @@ -87,7 +87,7 @@ function isRecipientValid(currency, recipient) { function mergeOps(existing: Operation[], newFetched: Operation[]) { const ids = newFetched.map(o => o.id) const all = newFetched.concat(existing.filter(o => !ids.includes(o.id))) - return uniqBy(all.sort((a, b) => a.date - b.date), 'id') + return uniqBy(all.sort((a, b) => b.date - a.date), 'id') } const fetchCurrentBlock = (perCurrencyId => currency => { diff --git a/src/bridge/RippleJSBridge.js b/src/bridge/RippleJSBridge.js index 131d764b..5e5fc5a3 100644 --- a/src/bridge/RippleJSBridge.js +++ b/src/bridge/RippleJSBridge.js @@ -55,7 +55,7 @@ function isRecipientValid(currency, recipient) { function mergeOps(existing: Operation[], newFetched: Operation[]) { const ids = existing.map(o => o.id) const all = existing.concat(newFetched.filter(o => !ids.includes(o.id))) - return all.sort((a, b) => a.date - b.date) + return all.sort((a, b) => b.date - a.date) } type Tx = {