add reduce only field on ts classes
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
86c9331647
commit
3ab8c6072a
|
@ -113,6 +113,7 @@ export class Bank implements BankForHealth {
|
|||
netBorrowsInWindow: BN;
|
||||
borrowWeightScaleStartQuote: number;
|
||||
depositWeightScaleStartQuote: number;
|
||||
reduceOnly: number;
|
||||
},
|
||||
): Bank {
|
||||
return new Bank(
|
||||
|
@ -158,6 +159,7 @@ export class Bank implements BankForHealth {
|
|||
obj.netBorrowsInWindow,
|
||||
obj.borrowWeightScaleStartQuote,
|
||||
obj.depositWeightScaleStartQuote,
|
||||
obj.reduceOnly == 1,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -204,6 +206,7 @@ export class Bank implements BankForHealth {
|
|||
public netBorrowsInWindow: BN,
|
||||
public borrowWeightScaleStartQuote: number,
|
||||
public depositWeightScaleStartQuote: number,
|
||||
public reduceOnly: boolean,
|
||||
) {
|
||||
this.name = utf8.decode(new Uint8Array(name)).split('\x00')[0];
|
||||
this.oracleConfig = {
|
||||
|
|
|
@ -94,6 +94,7 @@ export class PerpMarket {
|
|||
settleFeeFractionLowHealth: number;
|
||||
settlePnlLimitFactor: number;
|
||||
settlePnlLimitWindowSizeTs: BN;
|
||||
reduceOnly: number;
|
||||
},
|
||||
): PerpMarket {
|
||||
return new PerpMarket(
|
||||
|
@ -137,6 +138,7 @@ export class PerpMarket {
|
|||
obj.settleFeeFractionLowHealth,
|
||||
obj.settlePnlLimitFactor,
|
||||
obj.settlePnlLimitWindowSizeTs,
|
||||
obj.reduceOnly == 1,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -181,6 +183,7 @@ export class PerpMarket {
|
|||
public settleFeeFractionLowHealth: number,
|
||||
settlePnlLimitFactor: number,
|
||||
settlePnlLimitWindowSizeTs: BN,
|
||||
public reduceOnly: boolean,
|
||||
) {
|
||||
this.name = utf8.decode(new Uint8Array(name)).split('\x00')[0];
|
||||
this.oracleConfig = {
|
||||
|
|
|
@ -24,6 +24,7 @@ export class Serum3Market {
|
|||
serumMarketExternal: PublicKey;
|
||||
marketIndex: number;
|
||||
registrationTime: BN;
|
||||
reduceOnly: number;
|
||||
},
|
||||
): Serum3Market {
|
||||
return new Serum3Market(
|
||||
|
@ -36,6 +37,7 @@ export class Serum3Market {
|
|||
obj.serumMarketExternal,
|
||||
obj.marketIndex as MarketIndex,
|
||||
obj.registrationTime,
|
||||
obj.reduceOnly == 1,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -49,6 +51,7 @@ export class Serum3Market {
|
|||
public serumMarketExternal: PublicKey,
|
||||
public marketIndex: MarketIndex,
|
||||
public registrationTime: BN,
|
||||
public reduceOnly: boolean,
|
||||
) {
|
||||
this.name = utf8.decode(new Uint8Array(name)).split('\x00')[0];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue