diff --git a/ts/client/src/accounts/bank.ts b/ts/client/src/accounts/bank.ts index d4c8c4437..13da794e2 100644 --- a/ts/client/src/accounts/bank.ts +++ b/ts/client/src/accounts/bank.ts @@ -83,6 +83,7 @@ export class Bank implements BankForHealth { public platformLiquidationFee: I80F48; public collectedLiquidationFees: I80F48; public collectedCollateralFees: I80F48; + public tier: string; static from( publicKey: PublicKey, @@ -151,6 +152,7 @@ export class Bank implements BankForHealth { collectedLiquidationFees: I80F48Dto; collectedCollateralFees: I80F48Dto; collateralFeePerDay: number; + tier: number[]; }, ): Bank { return new Bank( @@ -218,6 +220,7 @@ export class Bank implements BankForHealth { obj.disableAssetLiquidation == 0, obj.collectedCollateralFees, obj.collateralFeePerDay, + obj.tier, obj.forceWithdraw == 1, ); } @@ -287,6 +290,7 @@ export class Bank implements BankForHealth { public allowAssetLiquidation: boolean, collectedCollateralFees: I80F48Dto, public collateralFeePerDay: number, + tier: number[], public forceWithdraw: boolean, ) { this.name = utf8.decode(new Uint8Array(name)).split('\x00')[0]; @@ -325,6 +329,7 @@ export class Bank implements BankForHealth { this._uiPrice = undefined; this._oracleLastUpdatedSlot = undefined; this._oracleProvider = undefined; + this.tier = utf8.decode(new Uint8Array(tier)).split('\x00')[0]; } toString(): string { diff --git a/ts/client/src/accounts/group.ts b/ts/client/src/accounts/group.ts index 7e9447118..3786de7c7 100644 --- a/ts/client/src/accounts/group.ts +++ b/ts/client/src/accounts/group.ts @@ -359,7 +359,7 @@ export class Group { Array.from(this.serum3MarketsMapByExternal.values()).map( (serum3Market) => Market.load( - client.program.provider.connection, + client.program.provider.connection as any, serum3Market.serumMarketExternal, { commitment: client.program.provider.connection.commitment }, OPENBOOK_PROGRAM_ID[client.cluster], diff --git a/ts/client/src/accounts/serum3.ts b/ts/client/src/accounts/serum3.ts index 0101fffc0..2ec24e681 100644 --- a/ts/client/src/accounts/serum3.ts +++ b/ts/client/src/accounts/serum3.ts @@ -133,7 +133,7 @@ export class Serum3Market { this.serumMarketExternal, ); return await serum3MarketExternal.loadBids( - client.program.provider.connection, + client.program.provider.connection as any, ); } @@ -142,7 +142,7 @@ export class Serum3Market { this.serumMarketExternal, ); return await serum3MarketExternal.loadAsks( - client.program.provider.connection, + client.program.provider.connection as any, ); } diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index 5ecc63c28..8008be51f 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -520,6 +520,7 @@ export class MangoClient { params.platformLiquidationFee, params.disableAssetLiquidation, params.collateralFeePerDay, + params.tier, ) .accounts({ group: group.publicKey, @@ -610,6 +611,7 @@ export class MangoClient { params.disableAssetLiquidation, params.collateralFeePerDay, params.forceWithdraw, + params.tier, ) .accounts({ group: group.publicKey, @@ -1447,7 +1449,6 @@ export class MangoClient { for (const pp of clonedMangoAccount.perpActive()) { const perpMarketIndex = pp.marketIndex; - const perpMarket = group.getPerpMarketByMarketIndex(perpMarketIndex); const deactivatingPositionIx = await this.perpDeactivatePositionIx( group, clonedMangoAccount, diff --git a/ts/client/src/clientIxParamBuilder.ts b/ts/client/src/clientIxParamBuilder.ts index 63fd28056..17c7aff05 100644 --- a/ts/client/src/clientIxParamBuilder.ts +++ b/ts/client/src/clientIxParamBuilder.ts @@ -32,6 +32,7 @@ export interface TokenRegisterParams { platformLiquidationFee: number; disableAssetLiquidation: boolean; collateralFeePerDay: number; + tier: string; } export const DefaultTokenRegisterParams: TokenRegisterParams = { @@ -74,6 +75,7 @@ export const DefaultTokenRegisterParams: TokenRegisterParams = { platformLiquidationFee: 0.0, disableAssetLiquidation: false, collateralFeePerDay: 0.0, + tier: '', }; export interface TokenEditParams { @@ -117,6 +119,7 @@ export interface TokenEditParams { platformLiquidationFee: number | null; disableAssetLiquidation: boolean | null; collateralFeePerDay: number | null; + tier: string | null; forceWithdraw: boolean | null; } @@ -161,6 +164,7 @@ export const NullTokenEditParams: TokenEditParams = { platformLiquidationFee: null, disableAssetLiquidation: null, collateralFeePerDay: null, + tier: null, forceWithdraw: null, };