Skip to content

Commit

Permalink
Merge branch 'binary-com:master' into likhith/shaheer/COJ-506/integra…
Browse files Browse the repository at this point in the history
…te-manual-upload-flow
  • Loading branch information
shaheer-deriv committed Feb 21, 2024
2 parents 4896b0c + 396b2e8 commit 46e41b9
Show file tree
Hide file tree
Showing 173 changed files with 1,879 additions and 3,602 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Download Remote Config Backup File
uses: ./.github/actions/download_remote_config_backup
with:
REMOTE_CONFIG_URL: ${{ env.REMOTE_CONFIG_URL }}
REMOTE_CONFIG_URL: ${{ vars.REMOTE_CONFIG_URL }}
- name: Build
uses: "./.github/actions/build"
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Download Remote Config Backup File
uses: ./.github/actions/download_remote_config_backup
with:
REMOTE_CONFIG_URL: ${{ env.REMOTE_CONFIG_URL }}
REMOTE_CONFIG_URL: ${{ vars.REMOTE_CONFIG_URL }}
- name: Build
uses: "./.github/actions/build"
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_uat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Download Remote Config Backup File
uses: ./.github/actions/download_remote_config_backup
with:
REMOTE_CONFIG_URL: ${{ env.REMOTE_CONFIG_URL }}
REMOTE_CONFIG_URL: ${{ vars.REMOTE_CONFIG_URL }}
- name: Build
uses: "./.github/actions/build"
with:
Expand Down
8 changes: 8 additions & 0 deletions __mocks__/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ jest.mock('@deriv-com/analytics', () => ({
pageView: jest.fn(),
reset: jest.fn(),
setAttributes: jest.fn(),
getFeatureValue: jest.fn(),
getInstances: jest.fn().mockReturnValue({
ab: {
GrowthBook: {
setRenderer: jest.fn(),
},
},
}),
},
}));

Expand Down
122 changes: 61 additions & 61 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/account-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "rimraf dist && npm run test && npm run serve"
},
"dependencies": {
"@deriv-com/ui": "1.8.1",
"@deriv-com/ui": "1.8.2",
"@deriv/api": "^1.0.0",
"@deriv/library": "^1.0.0",
"@deriv/quill-design": "^1.3.2",
Expand Down
56 changes: 56 additions & 0 deletions packages/api/src/hooks/__tests__/useCountryList.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { renderHook } from '@testing-library/react-hooks';
import useQuery from '../../useQuery';
import useClientCountry from '../useClientCountry';

jest.mock('../../useQuery');

const mockUseQuery = useQuery as jest.MockedFunction<typeof useQuery<'website_status'>>;

describe('useClientCountry', () => {
it('should return an undefined', () => {
// @ts-expect-error need to come up with a way to mock the return type of useFetch
mockUseQuery.mockReturnValue({
data: {
website_status: undefined,
},
});
const { result } = renderHook(() => useClientCountry());

expect(result.current.data).toBeUndefined();
});

it('should return Indonesia country code', () => {
// @ts-expect-error need to come up with a way to mock the return type of useFetch
mockUseQuery.mockReturnValue({
data: {
website_status: {
api_call_limits: {
max_proposal_subscription: {
applies_to: '',
max: 0,
},
max_requestes_general: {
applies_to: '',
hourly: 0,
minutely: 0,
},
max_requests_outcome: {
applies_to: '',
hourly: 0,
minutely: 0,
},
max_requests_pricing: {
applies_to: '',
hourly: 0,
minutely: 0,
},
},
currencies_config: {},
clients_country: 'id',
},
},
});
const { result } = renderHook(() => useClientCountry());
expect(result.current.data).toBe('id');
});
});
1 change: 1 addition & 0 deletions packages/api/src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,4 @@ export { default as useResetVirtualBalance } from './useResetVirtualBalance';
export { default as useExchangeRates } from './useExchangeRates';
export { default as useIsDIELEnabled } from './useIsDIELEnabled';
export { default as useKycAuthStatus } from './useKycAuthStatus';
export { default as useClientCountry } from './useClientCountry';
Loading

0 comments on commit 46e41b9

Please sign in to comment.