ts: fix client errors

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2024-03-04 13:21:42 +01:00
parent 27ecc14000
commit a006b25e39
7 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@blockworks-foundation/mango-v4",
"version": "0.21.31",
"version": "0.22.01",
"description": "Typescript Client for mango-v4 program.",
"repository": "https://github.com/blockworks-foundation/mango-v4",
"author": {

View File

@ -163,6 +163,7 @@ async function main(): Promise<void> {
group.getFirstBankByMint(insuranceMint),
0,
'SOL/USDC',
0,
);
await group.reloadAll(client);
const serum3Market = group.getSerum3MarketByExternalMarket(
@ -211,6 +212,7 @@ async function main(): Promise<void> {
1.0,
2 * 60 * 60,
0.025,
0,
);
await group.reloadAll(client);
const perpMarket = group.getPerpMarketByMarketIndex(

View File

@ -218,6 +218,7 @@ async function main() {
1.0,
2 * 60 * 60,
0.025,
0,
);
await group.reloadAll(client);
const perpMarket = group.getPerpMarketByMarketIndex(0 as PerpMarketIndex);

View File

@ -450,6 +450,7 @@ async function registerPerpMarkets() {
1.0,
2 * 60 * 60,
0.025,
0,
);
await client.perpCreateMarket(
@ -482,6 +483,7 @@ async function registerPerpMarkets() {
1.0,
2 * 60 * 60,
0.2, // 20% positive pnl liquidation fee?
0,
);
}

View File

@ -265,6 +265,7 @@ async function perpCreate(): Promise<void> {
1,
new BN(60 * 60),
percentageToDecimal(10),
0,
)
.accounts({
group: group.publicKey,
@ -358,6 +359,7 @@ async function perpEdit(): Promise<void> {
params.positivePnlLiquidationFee,
params.name,
params.forceClose,
params.platformLiquidationFee,
)
.accounts({
group: group.publicKey,

View File

@ -237,6 +237,7 @@ async function main(): Promise<void> {
-1.0,
2 * 60 * 60,
0.025,
0,
);
} catch (error) {
console.log(error);

View File

@ -371,6 +371,8 @@ async function updateTokenParams(): Promise<void> {
params.maintWeightShiftAbort ?? false,
false, // setFallbackOracle, unused
params.depositLimit,
params.zeroUtilRate,
params.platformLiquidationFee,
)
.accounts({
group: group.publicKey,