ts: tcs hasData was renamed to isConfigured (#796)
This commit is contained in:
parent
0483faef1e
commit
feeb63dab2
|
@ -44,7 +44,7 @@ async function main(): Promise<void> {
|
|||
|
||||
await Promise.all(
|
||||
account.tokenConditionalSwaps.map((tcs, i) => {
|
||||
if (!tcs.hasData) {
|
||||
if (!tcs.isConfigured) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
client.tokenConditionalSwapCancel(group, account, tcs.id);
|
||||
|
|
|
@ -202,7 +202,7 @@ export class MangoAccount {
|
|||
}
|
||||
|
||||
public tokenConditionalSwapsActive(): TokenConditionalSwap[] {
|
||||
return this.tokenConditionalSwaps.filter((tcs) => tcs.hasData);
|
||||
return this.tokenConditionalSwaps.filter((tcs) => tcs.isConfigured);
|
||||
}
|
||||
|
||||
public perpPositionExistsForMarket(perpMarket: PerpMarket): boolean {
|
||||
|
@ -1894,7 +1894,7 @@ export class TokenConditionalSwap {
|
|||
dto.makerFeeRate,
|
||||
dto.buyTokenIndex as TokenIndex,
|
||||
dto.sellTokenIndex as TokenIndex,
|
||||
dto.hasData == 1,
|
||||
dto.isConfigured == 1,
|
||||
dto.allowCreatingDeposits == 1,
|
||||
dto.allowCreatingBorrows == 1,
|
||||
dto.displayPriceStyle == 0
|
||||
|
@ -1918,7 +1918,7 @@ export class TokenConditionalSwap {
|
|||
public makerFeeRate: number,
|
||||
public buyTokenIndex: TokenIndex,
|
||||
public sellTokenIndex: TokenIndex,
|
||||
public hasData: boolean,
|
||||
public isConfigured: boolean,
|
||||
public allowCreatingDeposits: boolean,
|
||||
public allowCreatingBorrows: boolean,
|
||||
public priceDisplayStyle: TokenConditionalSwapDisplayPriceStyle,
|
||||
|
@ -2141,7 +2141,7 @@ export class TokenConditionalSwapDto {
|
|||
public makerFeeRate: number,
|
||||
public buyTokenIndex: number,
|
||||
public sellTokenIndex: number,
|
||||
public hasData: number,
|
||||
public isConfigured: number,
|
||||
public allowCreatingDeposits: number,
|
||||
public allowCreatingBorrows: number,
|
||||
public displayPriceStyle: number,
|
||||
|
|
|
@ -4101,7 +4101,7 @@ export class MangoClient {
|
|||
): Promise<MangoSignatureStatus> {
|
||||
const ixs = await Promise.all(
|
||||
account.tokenConditionalSwaps
|
||||
.filter((tcs) => tcs.hasData)
|
||||
.filter((tcs) => tcs.isConfigured)
|
||||
.map(async (tcs, i) => {
|
||||
const buyBank = group.banksMapByTokenIndex.get(tcs.buyTokenIndex)![0];
|
||||
const sellBank = group.banksMapByTokenIndex.get(
|
||||
|
|
Loading…
Reference in New Issue