From c73b01d54919f1460da74396b07d6f4d92fdabf6 Mon Sep 17 00:00:00 2001 From: "m.ray" <16125548+MadalinaRaicu@users.noreply.github.com> Date: Mon, 20 Feb 2023 10:59:01 -0500 Subject: [PATCH] feat(trading): do not pin row of existing account as it will become duplicated (#2942) --- libs/accounts/src/lib/accounts-table.spec.tsx | 4 ++-- libs/accounts/src/lib/accounts-table.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/accounts/src/lib/accounts-table.spec.tsx b/libs/accounts/src/lib/accounts-table.spec.tsx index 8be586cff..bd822491f 100644 --- a/libs/accounts/src/lib/accounts-table.spec.tsx +++ b/libs/accounts/src/lib/accounts-table.spec.tsx @@ -76,7 +76,7 @@ describe('AccountsTable', () => { expect(rows.length).toBe(6); }); - it('should add first asset as pinned', async () => { + it('should not add first asset as pinned', async () => { await act(async () => { render( { ); }); const rows = await screen.findAllByRole('row'); - expect(rows.length).toBe(9); + expect(rows.length).toBe(6); }); it('should get correct account data', () => { diff --git a/libs/accounts/src/lib/accounts-table.tsx b/libs/accounts/src/lib/accounts-table.tsx index 7d4efd57e..85df73839 100644 --- a/libs/accounts/src/lib/accounts-table.tsx +++ b/libs/accounts/src/lib/accounts-table.tsx @@ -58,7 +58,7 @@ export const AccountTable = forwardRef( }; } } - return currentPinnedAssetRow; + return undefined; }, [pinnedAssetId, props.pinnedAsset, props.rowData]); return (