changed cancelAllOrdersByMarket
This commit is contained in:
parent
fac8a952a4
commit
0ee0507f9e
|
@ -262,12 +262,11 @@ export class MarginAccount {
|
|||
asks: Orderbook,
|
||||
owner: Account
|
||||
): Promise<TransactionSignature[]> {
|
||||
const marketIndex = mangoGroup.getMarketIndex(market)
|
||||
|
||||
if (!this.openOrdersAccounts) {
|
||||
if (this.openOrdersAccounts == undefined) {
|
||||
throw new Error("Must load open orders accounts first")
|
||||
}
|
||||
|
||||
const marketIndex = mangoGroup.getMarketIndex(market)
|
||||
const openOrdersAccount = this.openOrdersAccounts[marketIndex]
|
||||
if (!openOrdersAccount) { // no open orders for this market
|
||||
return []
|
||||
|
|
Loading…
Reference in New Issue