Explorar o código

Merge pull request #17 from fdundjer/feature/buy-only-when-market-is-open

feat: add filter for liquidity pool status - #1
Filip Dunđer hai 1 ano
pai
achega
e8c8147bae
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      buy.ts

+ 6 - 0
buy.ts

@@ -248,6 +248,12 @@ const runListener = async () => {
           bytes: OPENBOOK_PROGRAM_ID.toBase58(),
         },
       },
+      {
+        memcmp: {
+          offset: LIQUIDITY_STATE_LAYOUT_V4.offsetOf('status'),
+          bytes: '14421D35quxec7'
+        },
+      },
     ],
   );