forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WALL] Jim | Aum /WALL-4459/eliminate balance prop drilling using obs…
…erver (deriv-com#15767) * chore: rename hook * chore: check for initial render and refetch and add mocks to component tests * chore: add usd as the fallback cyrrency * style: fix typo * chore: address review comments * ci: fix eslint error * ci: trigger build
- Loading branch information
Showing
49 changed files
with
700 additions
and
522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { Context } from '@deriv/integration/src/utils/mocks/mocks'; | ||
|
||
const TEMP_ACCOUNT_LIST = [ | ||
{ | ||
account_category: 'trading', | ||
account_type: 'standard', | ||
broker: 'CR', | ||
created_at: 1720591930, | ||
currency: 'USD', | ||
currency_type: 'fiat', | ||
is_disabled: 0, | ||
is_virtual: 0, | ||
landing_company_name: 'svg', | ||
linked_to: [ | ||
{ | ||
loginid: 'CRW1003', | ||
platform: 'dwallet', | ||
}, | ||
], | ||
loginid: 'CR90000243', | ||
}, | ||
{ | ||
account_category: 'wallet', | ||
account_type: 'doughflow', | ||
broker: 'CRW', | ||
created_at: 1720591899, | ||
currency: 'USD', | ||
currency_type: 'fiat', | ||
is_disabled: 0, | ||
is_virtual: 0, | ||
landing_company_name: 'svg', | ||
linked_to: [ | ||
{ | ||
loginid: 'CR90000243', | ||
platform: 'dtrade', | ||
}, | ||
], | ||
loginid: 'CRW1003', | ||
}, | ||
{ | ||
account_category: 'wallet', | ||
account_type: 'virtual', | ||
broker: 'VRW', | ||
created_at: 1720591899, | ||
currency: 'USD', | ||
currency_type: 'fiat', | ||
is_disabled: 0, | ||
is_virtual: 1, | ||
landing_company_name: 'virtual', | ||
linked_to: [], | ||
loginid: 'VRW1004', | ||
}, | ||
]; | ||
|
||
export function mockAccountList(context: Context) { | ||
if (!('account_list' in context.request)) { | ||
return; | ||
} | ||
|
||
context.response = { | ||
account_list: TEMP_ACCOUNT_LIST, | ||
echo_req: context.request, | ||
msg_type: 'account_list', | ||
req_id: context.req_id, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.