ts: tcs hasData was renamed to isConfigured

This commit is contained in:
Christian Kamm 2023-11-24 10:51:00 +01:00 committed by microwavedcola1
parent c52cf59dc9
commit 2829bef48e
3 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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 {
@ -1898,7 +1898,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
@ -1922,7 +1922,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,
@ -2145,7 +2145,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,

View File

@ -4370,7 +4370,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(