reset script

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2022-08-26 10:09:36 +02:00
parent b9a69bf59c
commit ab4c0e3de5
1 changed files with 15 additions and 12 deletions

View File

@ -1,5 +1,5 @@
import { AnchorProvider, Wallet } from '@project-serum/anchor'; 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 fs from 'fs';
import { Group } from '../accounts/group'; import { Group } from '../accounts/group';
import { HealthType, MangoAccount } from '../accounts/mangoAccount'; import { HealthType, MangoAccount } from '../accounts/mangoAccount';
@ -156,17 +156,20 @@ async function main() {
); );
const userWallet = new Wallet(user); const userWallet = new Wallet(user);
console.log(`User ${userWallet.publicKey.toBase58()}`); console.log(`User ${userWallet.publicKey.toBase58()}`);
// const mangoAccounts = await client.getMangoAccountsForOwner(
// group, const mangoAccounts = await client.getMangoAccountsForOwner(
// user.publicKey, group,
// ); user.publicKey,
const mangoAccounts = await Promise.all([ );
await client.getMangoAccount({
publicKey: new PublicKey( // const mangoAccounts = await Promise.all([
'6mqHfpJqnXcu6RgDYZSVW9CQXQPFyRYhgvdzvWXN9mPW', // await client.getMangoAccount({
), // publicKey: new PublicKey(
} as any), // '6mqHfpJqnXcu6RgDYZSVW9CQXQPFyRYhgvdzvWXN9mPW',
]); // ),
// } as any),
// ]);
for (const mangoAccount of mangoAccounts) { for (const mangoAccount of mangoAccounts) {
console.log(`MangoAccount ${mangoAccount.publicKey}`); console.log(`MangoAccount ${mangoAccount.publicKey}`);
// if ( // if (