Fix hasBorrows memcmp
This commit is contained in:
parent
5b36c32f3d
commit
1aae8a4178
|
@ -186,6 +186,7 @@ export class MarginAccount {
|
||||||
deposits!: number[];
|
deposits!: number[];
|
||||||
borrows!: number[];
|
borrows!: number[];
|
||||||
beingLiquidated!: boolean;
|
beingLiquidated!: boolean;
|
||||||
|
hasBorrows!: boolean;
|
||||||
|
|
||||||
openOrders!: PublicKey[];
|
openOrders!: PublicKey[];
|
||||||
openOrdersAccounts: (OpenOrders | undefined)[] // undefined if an openOrdersAccount not yet initialized and has zeroKey
|
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, [{
|
return await this.getAllMarginAccounts(connection, programId, mangoGroup, [{
|
||||||
memcmp: {
|
memcmp: {
|
||||||
offset: MarginAccountLayout.offsetOf('hasBorrows'),
|
offset: MarginAccountLayout.offsetOf('hasBorrows'),
|
||||||
bytes: 1
|
bytes: "2" // [1] base58 encoded
|
||||||
}
|
}
|
||||||
}])
|
}])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue