chore(deps): migrate from pkc-react-hooks to bitsocial-react-hooks

This commit is contained in:
plebeius
2026-03-05 17:14:23 +08:00
parent 67ab49cc9d
commit 4508f589dd
64 changed files with 219 additions and 492 deletions
@@ -15,7 +15,7 @@ vi.mock('react-i18next', () => ({
}),
}));
vi.mock('@bitsocialhq/pkc-react-hooks', () => ({
vi.mock('@bitsocialhq/bitsocial-react-hooks', () => ({
useAccount: () => ({ id: 'test-id', name: 'Account 1', author: { address: '0x123', shortAddress: '0x1...3' } }),
useAccounts: () => ({ accounts: [{ id: 'test-id', name: 'Account 1', author: { shortAddress: '0x1...3' } }] }),
deleteAccount: vi.fn(),
@@ -1,6 +1,6 @@
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { deleteAccount, exportAccount, importAccount, setActiveAccount, useAccount, useAccounts } from '@bitsocialhq/pkc-react-hooks';
import { deleteAccount, exportAccount, importAccount, setActiveAccount, useAccount, useAccounts } from '@bitsocialhq/bitsocial-react-hooks';
import styles from './account-settings.module.css';
import { Capacitor } from '@capacitor/core';
import { useLocation, useNavigate } from 'react-router-dom';
@@ -1,5 +1,5 @@
import { memo, RefObject, useRef, useState } from 'react';
import { setAccount, useAccount, usePlebbitRpcSettings } from '@bitsocialhq/pkc-react-hooks';
import { setAccount, useAccount, usePlebbitRpcSettings } from '@bitsocialhq/bitsocial-react-hooks';
import { useTranslation } from 'react-i18next';
import styles from './advanced-settings.module.css';
@@ -1,6 +1,6 @@
import { memo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useAccount, setAccount, useResolvedAuthorAddress } from '@bitsocialhq/pkc-react-hooks';
import { useAccount, setAccount, useResolvedAuthorAddress } from '@bitsocialhq/bitsocial-react-hooks';
import styles from './crypto-address-setting.module.css';
const withErrorHandling = async <T,>(fn: () => Promise<T>, onError: (e: unknown) => void): Promise<T | undefined> => {
@@ -1,5 +1,5 @@
import { memo, useState } from 'react';
import { Account, setAccount, useAccount } from '@bitsocialhq/pkc-react-hooks';
import { Account, setAccount, useAccount } from '@bitsocialhq/bitsocial-react-hooks';
import styles from './crypto-wallets-setting.module.css';
import { Trans, useTranslation } from 'react-i18next';
import capitalize from 'lodash/capitalize';
@@ -1,4 +1,4 @@
import { setAccount, useAccount, useSubscribe } from '@bitsocialhq/pkc-react-hooks';
import { setAccount, useAccount, useSubscribe } from '@bitsocialhq/bitsocial-react-hooks';
import getShortAddress from '../../../lib/get-short-address';
import styles from './subscriptions-setting.module.css';
import { useTranslation } from 'react-i18next';