diff --git a/.eslintrc.js b/.eslintrc.js index d74f75c6e4..696b0f31f9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,10 +25,12 @@ module.exports = { 'out', 'generated', 'templates', - 'grow-rooch-v1', + 'infra', 'dist', + 'third_party', 'coverage', 'next-env.d.ts', + 'examples', ], rules: { 'no-case-declarations': 'off', diff --git a/.prettierignore b/.prettierignore index ea515489bd..c19973d659 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,7 +8,7 @@ !/*.js # ignore generated files -grow-rooch-v1 +infra .vscode .next node_modules @@ -21,3 +21,5 @@ dist generated generator templates +third_party +examples diff --git a/sdk/typescript/rooch-sdk-kit/package.json b/sdk/typescript/rooch-sdk-kit/package.json index 64904f058a..e8dff05598 100644 --- a/sdk/typescript/rooch-sdk-kit/package.json +++ b/sdk/typescript/rooch-sdk-kit/package.json @@ -1,7 +1,7 @@ { "name": "@roochnetwork/rooch-sdk-kit", "author": "Rooch.network ", - "version": "0.3.0", + "version": "0.3.1", "description": "Rooch SDK Kit", "license": "Apache-2.0", "engines": { diff --git a/sdk/typescript/rooch-sdk-kit/src/components/DropdownMenu.tsx b/sdk/typescript/rooch-sdk-kit/src/components/DropdownMenu.tsx index a30cf52d30..886435e20d 100644 --- a/sdk/typescript/rooch-sdk-kit/src/components/DropdownMenu.tsx +++ b/sdk/typescript/rooch-sdk-kit/src/components/DropdownMenu.tsx @@ -151,7 +151,13 @@ export function ActionDropdownMenu() { { - window.localStorage.clear() + const prefix = 'rooch-sdk-kit' + + Object.keys(localStorage).forEach((key) => { + if (key.startsWith(prefix)) { + localStorage.removeItem(key) + } + }) window.location.reload() }} > diff --git a/sdk/typescript/rooch-sdk-kit/src/components/WalletGuard.tsx b/sdk/typescript/rooch-sdk-kit/src/components/WalletGuard.tsx index a8c71d33c8..f59b0ba5cb 100644 --- a/sdk/typescript/rooch-sdk-kit/src/components/WalletGuard.tsx +++ b/sdk/typescript/rooch-sdk-kit/src/components/WalletGuard.tsx @@ -12,10 +12,10 @@ type ConnectButtonProps = { } & ButtonHTMLAttributes export function WalletGuard({ children, onClick }: ConnectButtonProps) { - const { wallet } = useCurrentWallet() + const { status } = useCurrentWallet() return ( <> - {wallet ? ( + {status === 'connected' ? (