From ab4c0e3de5576860d3f726fa6a17c5212e4173ca Mon Sep 17 00:00:00 2001 From: microwavedcola1 Date: Fri, 26 Aug 2022 10:09:36 +0200 Subject: [PATCH] reset script Signed-off-by: microwavedcola1 --- ts/client/src/debug-scripts/mb-debug-user.ts | 27 +++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/ts/client/src/debug-scripts/mb-debug-user.ts b/ts/client/src/debug-scripts/mb-debug-user.ts index 522db06b2..5817a4389 100644 --- a/ts/client/src/debug-scripts/mb-debug-user.ts +++ b/ts/client/src/debug-scripts/mb-debug-user.ts @@ -1,5 +1,5 @@ import { AnchorProvider, Wallet } from '@project-serum/anchor'; -import { Connection, Keypair, PublicKey } from '@solana/web3.js'; +import { Connection, Keypair } from '@solana/web3.js'; import fs from 'fs'; import { Group } from '../accounts/group'; import { HealthType, MangoAccount } from '../accounts/mangoAccount'; @@ -156,17 +156,20 @@ async function main() { ); const userWallet = new Wallet(user); console.log(`User ${userWallet.publicKey.toBase58()}`); - // const mangoAccounts = await client.getMangoAccountsForOwner( - // group, - // user.publicKey, - // ); - const mangoAccounts = await Promise.all([ - await client.getMangoAccount({ - publicKey: new PublicKey( - '6mqHfpJqnXcu6RgDYZSVW9CQXQPFyRYhgvdzvWXN9mPW', - ), - } as any), - ]); + + const mangoAccounts = await client.getMangoAccountsForOwner( + group, + user.publicKey, + ); + + // const mangoAccounts = await Promise.all([ + // await client.getMangoAccount({ + // publicKey: new PublicKey( + // '6mqHfpJqnXcu6RgDYZSVW9CQXQPFyRYhgvdzvWXN9mPW', + // ), + // } as any), + // ]); + for (const mangoAccount of mangoAccounts) { console.log(`MangoAccount ${mangoAccount.publicKey}`); // if (