From 0183d13afc4ed82a47b1d4dd53e06730e0e859b2 Mon Sep 17 00:00:00 2001 From: Lim Jet <57783762+daoauth@users.noreply.github.com> Date: Wed, 9 Oct 2024 19:14:33 +0900 Subject: [PATCH] update bugfix --- src/extension.ts | 3 +-- src/webview/src/components/Account.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 9cec52d..ddac569 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,8 +1,7 @@ import * as vscode from 'vscode'; -import { ExtensionContext } from 'vscode'; import { WebviewViewProvider } from './webviewPovider'; -export function activate(context: ExtensionContext) { +export function activate(context: vscode.ExtensionContext) { const provider = new WebviewViewProvider(context); context.subscriptions.push( vscode.window.registerWebviewViewProvider( diff --git a/src/webview/src/components/Account.tsx b/src/webview/src/components/Account.tsx index 7cd2065..cbf3f78 100644 --- a/src/webview/src/components/Account.tsx +++ b/src/webview/src/components/Account.tsx @@ -80,6 +80,7 @@ export const Account = ({ client }: { client: SuiClient | undefined }) => { useEffect(() => { const updateBalance = async () => { + state.account && setNetwork(() => state.account!.nonce.network); const balance = await getBalance(client, state.account); setState((oldState) => ({ ...oldState, balance })); }; @@ -183,9 +184,9 @@ export const Account = ({ client }: { client: SuiClient | undefined }) => { setNetwork((e.target as HTMLInputElement).value as NETWORK); }} > - {NETWORKS.map((network, index) => ( - - {network} + {NETWORKS.map((item, index) => ( + + {item} ))}