Skip to content

Commit 773444d

Browse files
committed
fix: remove connected
1 parent be188f6 commit 773444d

File tree

1 file changed

+2
-5
lines changed
  • governance/xc_admin/packages/xc_admin_frontend/components/tabs

1 file changed

+2
-5
lines changed

governance/xc_admin/packages/xc_admin_frontend/components/tabs/General.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { AnchorProvider, Idl, Program } from '@coral-xyz/anchor'
22
import { AccountType, getPythProgramKeyForCluster } from '@pythnetwork/client'
33
import { PythOracle, pythOracleProgram } from '@pythnetwork/client/lib/anchor'
4-
import { useWallet } from '@solana/wallet-adapter-react'
54
import { PublicKey, TransactionInstruction } from '@solana/web3.js'
65
import messageBuffer from 'message_buffer/idl/message_buffer.json'
76
import { MessageBuffer } from 'message_buffer/idl/message_buffer'
@@ -48,7 +47,6 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
4847
const isRemote: boolean = isRemoteCluster(cluster) // Move to multisig context
4948
const { isLoading: isMultisigLoading, readOnlySquads } = useMultisigContext()
5049
const { rawConfig, dataIsLoading, connection } = usePythContext()
51-
const { connected } = useWallet()
5250
const [pythProgramClient, setPythProgramClient] =
5351
useState<Program<PythOracle>>()
5452

@@ -860,9 +858,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
860858
)
861859
}
862860

863-
// create anchor wallet when connected
864861
useEffect(() => {
865-
if (connected && readOnlySquads && connection) {
862+
if (readOnlySquads && connection) {
866863
const provider = new AnchorProvider(
867864
connection,
868865
readOnlySquads.wallet as Wallet,
@@ -882,7 +879,7 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
882879
)
883880
}
884881
}
885-
}, [connection, connected, cluster, readOnlySquads])
882+
}, [connection, cluster, readOnlySquads])
886883

887884
return (
888885
<div className="relative">

0 commit comments

Comments
 (0)