From 49e62861af09a45a7805910ee612040a13dfaa94 Mon Sep 17 00:00:00 2001 From: Rostik Kayko Date: Tue, 4 Jul 2023 14:08:10 +0300 Subject: [PATCH] refactor: fix tests --- .../src/__tests__/useWalletTransactions.spec.tsx | 3 +++ packages/hooks/src/__tests__/useWalletsList.spec.tsx | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/hooks/src/__tests__/useWalletTransactions.spec.tsx b/packages/hooks/src/__tests__/useWalletTransactions.spec.tsx index 8d45ceb0b4c0..d20c813f4685 100644 --- a/packages/hooks/src/__tests__/useWalletTransactions.spec.tsx +++ b/packages/hooks/src/__tests__/useWalletTransactions.spec.tsx @@ -15,6 +15,7 @@ describe('useWalletsList', () => { const mock = mockStore({ client: { accounts: { CRW909900: { token: '12345' } }, + currency: 'USD', loginid: 'CRW909900', }, }); @@ -106,6 +107,7 @@ describe('useWalletsList', () => { action_type: 'deposit', amount: 25, balance_after: 25, + gradient_class: 'wallet-card__usd-bg', transaction_id: 17494415481, transaction_time: 1685942136, account_category: 'wallet', @@ -119,6 +121,7 @@ describe('useWalletsList', () => { action_type: 'deposit', amount: 1000, balance_after: 1000, + gradient_class: 'wallet-card__usd-bg', transaction_id: 17494117539, transaction_time: 1685769338, account_category: 'wallet', diff --git a/packages/hooks/src/__tests__/useWalletsList.spec.tsx b/packages/hooks/src/__tests__/useWalletsList.spec.tsx index 5874eee913d8..dae5461ebaf4 100644 --- a/packages/hooks/src/__tests__/useWalletsList.spec.tsx +++ b/packages/hooks/src/__tests__/useWalletsList.spec.tsx @@ -16,6 +16,7 @@ describe('useWalletsList', () => { const mock = mockStore({ client: { accounts: { CRW909900: { token: '12345' } }, + currency: 'USD', loginid: 'CRW909900', is_crypto: () => false, }, @@ -59,16 +60,18 @@ describe('useWalletsList', () => { expect(result.current.data).toEqual([ { account_category: 'wallet', + balance: 0, currency: 'USD', gradient_card_class: 'wallet-card__usd-bg', gradient_header_class: 'wallet-header__usd-bg', - landing_company_shortcode: 'svg', - is_virtual: 0, landing_company_name: 'svg', + landing_company_shortcode: 'svg', + icon: 'IcWalletCurrencyUsd', is_demo: false, - is_selected: false, is_malta_wallet: false, - balance: 0, + is_selected: false, + is_virtual: 0, + name: 'USD Wallet', }, ]); });