From 1aae8a4178da8ae1235ab2e8bfaaa8c39f878e88 Mon Sep 17 00:00:00 2001 From: Riordan Panayides Date: Tue, 15 Jun 2021 22:44:33 +0100 Subject: [PATCH] Fix hasBorrows memcmp --- src/client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index b88f04c..e3e7fe7 100644 --- a/src/client.ts +++ b/src/client.ts @@ -186,6 +186,7 @@ export class MarginAccount { deposits!: number[]; borrows!: number[]; beingLiquidated!: boolean; + hasBorrows!: boolean; openOrders!: PublicKey[]; openOrdersAccounts: (OpenOrders | undefined)[] // undefined if an openOrdersAccount not yet initialized and has zeroKey @@ -1436,7 +1437,7 @@ export class MangoClient { return await this.getAllMarginAccounts(connection, programId, mangoGroup, [{ memcmp: { offset: MarginAccountLayout.offsetOf('hasBorrows'), - bytes: 1 + bytes: "2" // [1] base58 encoded } }]) }