ts: Add group.findPerpMarket()
This commit is contained in:
parent
4090cf407e
commit
39bdf20813
|
@ -381,6 +381,12 @@ export class Group {
|
|||
return I80F48.fromNumber(totalAmount);
|
||||
}
|
||||
|
||||
public findPerpMarket(marketIndex: number): PerpMarket | undefined {
|
||||
return Array.from(this.perpMarketsMap.values()).find(
|
||||
(perpMarket) => perpMarket.perpMarketIndex === marketIndex,
|
||||
);
|
||||
}
|
||||
|
||||
public findSerum3Market(marketIndex: number): Serum3Market | undefined {
|
||||
return Array.from(this.serum3MarketsMapByExternal.values()).find(
|
||||
(serum3Market) => serum3Market.marketIndex === marketIndex,
|
||||
|
|
Loading…
Reference in New Issue