From 77dfa66acbe2b79d241dce6b1a94b379115963a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Lambert?= <44363395+lambertkevin@users.noreply.github.com> Date: Wed, 6 Apr 2022 14:54:29 +0200 Subject: [PATCH] Hotfix - v21.36.1 on Master (#1859) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * bugfix/swap-operation-details-duplicates getCompleteSwapHistory modified to avoid returning the same swap operations multiple times (#1854) * v21.36.1 Co-authored-by: Côme Grellard --- package.json | 2 +- src/exchange/swap/getCompleteSwapHistory.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 183d7e1cd5..871889402d 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "type": "git", "url": "https://github.com/LedgerHQ/ledger-live-common" }, - "version": "21.36.0", + "version": "21.36.1", "main": "lib/index.js", "types": "lib/index.d.ts", "license": "Apache-2.0", diff --git a/src/exchange/swap/getCompleteSwapHistory.ts b/src/exchange/swap/getCompleteSwapHistory.ts index e62f6d0d0e..fff8943278 100644 --- a/src/exchange/swap/getCompleteSwapHistory.ts +++ b/src/exchange/swap/getCompleteSwapHistory.ts @@ -113,7 +113,7 @@ const getCompleteSwapHistory = ( day = startOfDay(swap.operation.date); data = [swap]; continue; - } else if (!skip) { + } else if (!skip && !data.find((d) => d.swapId === swap.swapId)) { data.push(swap); }