Skip to content

Commit

Permalink
Merge pull request #235 from yashim-deriv/fix_api_logout
Browse files Browse the repository at this point in the history
yashim/chore: bump api hooks version to fix provider issue
  • Loading branch information
farrah-deriv authored Aug 1, 2024
2 parents 91d9e86 + 8b03d45 commit adcf6c4
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 23 deletions.
57 changes: 39 additions & 18 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@babel/preset-env": "^7.24.5",
"@chakra-ui/react": "^2.8.2",
"@deriv-com/analytics": "^1.10.1",
"@deriv-com/api-hooks": "^1.4.7",
"@deriv-com/api-hooks": "^1.4.8",
"@deriv-com/translations": "^1.2.4",
"@deriv-com/ui": "^1.29.0",
"@deriv-com/utils": "^0.0.28",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ describe('useAdvertiserCreate', () => {
});

it('should return modified data if the data is ready', () => {
// @ts-expect-error not all values are defined
mockUseP2PAdvertiserCreate.mockReturnValueOnce({
// @ts-expect-error not all values are defined
data: {
...mockAdvertiserCreateValues,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ describe('useAdvertiserList', () => {

it('should return modified data if the data is ready', () => {
const mockData = { ...mockAdvertiserCreateValues, is_blocked: 0 as const };
// @ts-expect-error not all properties are defined

mockUseP2pAdvertiserList.mockReturnValueOnce({
data: [
// @ts-expect-error not all properties are defined
{
...mockData,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ describe('useAdvertiserUpdate', () => {
});

it('should return modified data if the data is ready', () => {
// @ts-expect-error not all values are defined
mockUseP2pAdvertiserUpdate.mockReturnValueOnce({
// @ts-expect-error not all values are defined
data: {
...mockAdvertiserCreateValues,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ describe('useOrderDispute', () => {
});

it('should return the correct data', () => {
// @ts-expect-error - useQuery return values not specified
mockUseP2pOrderDispute.mockReturnValue({
data: {
account_currency: 'USD',
Expand All @@ -54,6 +53,7 @@ describe('useOrderDispute', () => {
payment_method: 'payment_method',
type: 'buy',
},
// @ts-expect-error - useQuery return values not specified
advertiser_details: {
completed_orders_count: 1,
first_name: 'first_name',
Expand Down

0 comments on commit adcf6c4

Please sign in to comment.