11import  {  AnchorProvider ,  Idl ,  Program  }  from  '@coral-xyz/anchor' 
22import  {  AccountType ,  getPythProgramKeyForCluster  }  from  '@pythnetwork/client' 
33import  {  PythOracle ,  pythOracleProgram  }  from  '@pythnetwork/client/lib/anchor' 
4- import  {  useWallet  }  from  '@solana/wallet-adapter-react' 
54import  {  PublicKey ,  TransactionInstruction  }  from  '@solana/web3.js' 
65import  messageBuffer  from  'message_buffer/idl/message_buffer.json' 
76import  {  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