Browse Source

make Sets and Map into consts

Christopher Mael 1 year ago
parent
commit
b168a6060c
1 changed files with 4 additions and 4 deletions
  1. 4 4
      buy.ts

+ 4 - 4
buy.ts

@@ -53,16 +53,16 @@ const solanaConnection = new Connection(RPC_ENDPOINT, {
   wsEndpoint: RPC_WEBSOCKET_ENDPOINT,
   wsEndpoint: RPC_WEBSOCKET_ENDPOINT,
 });
 });
 
 
-export type MinimalTokenAccountData = {
+export interface MinimalTokenAccountData {
   mint: PublicKey;
   mint: PublicKey;
   address: PublicKey;
   address: PublicKey;
   poolKeys?: LiquidityPoolKeys;
   poolKeys?: LiquidityPoolKeys;
   market?: MinimalMarketLayoutV3;
   market?: MinimalMarketLayoutV3;
 };
 };
 
 
-let existingLiquidityPools: Set<string> = new Set<string>();
-let existingOpenBookMarkets: Set<string> = new Set<string>();
-let existingTokenAccounts: Map<string, MinimalTokenAccountData> = new Map<string, MinimalTokenAccountData>();
+const existingLiquidityPools: Set<string> = new Set<string>();
+const existingOpenBookMarkets: Set<string> = new Set<string>();
+const existingTokenAccounts: Map<string, MinimalTokenAccountData> = new Map<string, MinimalTokenAccountData>();
 
 
 let wallet: Keypair;
 let wallet: Keypair;
 let quoteToken: Token;
 let quoteToken: Token;