Skip to content

Commit c8edd7d

Browse files
committed
chore: updated api-hooks package that fixes issue with authorizing only first account
1 parent 92eea90 commit c8edd7d

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@chakra-ui/react": "^2.8.2",
2020
"@datadog/browser-rum": "^5.11.0",
2121
"@deriv-com/analytics": "^1.27.0",
22-
"@deriv-com/api-hooks": "^1.4.9",
22+
"@deriv-com/api-hooks": "^1.7.1",
2323
"@deriv-com/auth-client": "1.0.27",
2424
"@deriv-com/translations": "^1.3.9",
2525
"@deriv-com/ui": "^1.35.6",
@@ -114,4 +114,4 @@
114114
"optionalDependencies": {
115115
"@rollup/rollup-linux-x64-gnu": "4.9.5"
116116
}
117-
}
117+
}

src/hooks/api/notification/useNotificationList.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const handleData = (incomingMessages: TNotification[], prevMessages: TNotificati
4343
* @example const { data: notifications } = useNotificationList();
4444
*/
4545
const useNotificationList = () => {
46-
// @ts-expect-error Type undefined. This endpoint will be added to api-hooks.
4746
const { data, ...rest } = useSubscribe('notifications_list');
4847
const [messages, setMessages] = useState<TNotification[]>([]);
4948

@@ -59,10 +58,8 @@ const useNotificationList = () => {
5958
}, [messages]);
6059

6160
useEffect(() => {
62-
// @ts-expect-error Type undefined.
6361
if (data?.notifications_list) {
6462
setMessages(prevMessages => {
65-
// @ts-expect-error Type undefined.
6663
return handleData(data.notifications_list.messages, prevMessages);
6764
});
6865
}

src/hooks/api/notification/useNotificationUpdate.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ import { useMutation } from '@deriv-com/api-hooks';
1111
*/
1212
const useNotificationUpdate = () => {
1313
const { data, ...rest } = useMutation({
14-
// @ts-expect-error Type undefined. This endpoint will be added to api-hooks.
1514
name: 'notifications_update_status',
1615
});
1716

1817
return {
19-
// @ts-expect-error Type undefined.
2018
data: data?.notifications_update_status,
2119
...rest,
2220
};

src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import './main.scss';
88
ReactDOM.createRoot(document.getElementById('root')!).render(
99
<React.StrictMode>
1010
<QueryClientProvider client={new QueryClient()}>
11-
<AppDataProvider>
11+
<AppDataProvider accountType='CR' currency='USD'>
1212
<App />
1313
</AppDataProvider>
1414
</QueryClientProvider>

0 commit comments

Comments
 (0)