Skip to content

Commit 3c6ed95

Browse files
authored
[HUMAN App] fix: wallet connection control (#3266)
1 parent b13faf3 commit 3c6ed95

File tree

5 files changed

+385
-185
lines changed

5 files changed

+385
-185
lines changed

packages/apps/human-app/frontend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"@mui/icons-material": "^7.0.1",
2424
"@mui/material": "^5.16.7",
2525
"@mui/x-date-pickers": "^7.23.6",
26-
"@reown/appkit": "1.3.2",
27-
"@reown/appkit-adapter-wagmi": "1.3.2",
26+
"@reown/appkit": "^1.7.2",
27+
"@reown/appkit-adapter-wagmi": "^1.7.2",
2828
"@synaps-io/verify-sdk": "^4.0.45",
2929
"@tanstack/react-query": "^5.67.2",
3030
"date-fns": "^4.1.0",

packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connection-control.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { useTranslation } from 'react-i18next';
22
import { Grid } from '@mui/material';
33
import { Button } from '@/shared/components/ui/button';
44
import { useAuthenticatedUser } from '@/modules/auth/hooks/use-authenticated-user';
5-
import { useWorkerKycStatus, useWorkerWalletRegistration } from '../hooks';
5+
import { useWalletConnect } from '@/shared/contexts/wallet-connect';
6+
import { useWorkerKycStatus } from '../hooks';
67
import { DoneLabel } from './status-labels';
78
import { WalletConnectDone } from './wallet-connect-done';
89
import { RegisterAddressBtn } from './buttons';
@@ -11,8 +12,7 @@ export function WalletConnectionControl() {
1112
const { t } = useTranslation();
1213
const { user } = useAuthenticatedUser();
1314
const { kycApproved } = useWorkerKycStatus();
14-
const { isConnected, isRegisterAddressPending, handleConnectWallet } =
15-
useWorkerWalletRegistration();
15+
const { isConnected, openModal } = useWalletConnect();
1616

1717
const { wallet_address: walletAddress } = user;
1818
const hasWalletAddress = Boolean(walletAddress);
@@ -38,8 +38,7 @@ export function WalletConnectionControl() {
3838
<Button
3939
disabled={!kycApproved}
4040
fullWidth
41-
loading={isRegisterAddressPending}
42-
onClick={handleConnectWallet}
41+
onClick={() => void openModal()}
4342
variant="contained"
4443
>
4544
{t('components.wallet.connectBtn.connect')}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
export * from './use-worker-wallet-registration';
21
export * from './use-worker-profile-status';
32
export * from './use-start-kyc';

packages/apps/human-app/frontend/src/modules/worker/profile/hooks/use-worker-wallet-registration.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)