extend debug script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
a0b1b10627
commit
17cd3c74c3
|
@ -1830,6 +1830,7 @@ export class MangoClient {
|
|||
const allTokenIndices = mangoAccount.tokens.map(
|
||||
(token) => token.tokenIndex,
|
||||
);
|
||||
|
||||
if (banks) {
|
||||
for (const bank of banks) {
|
||||
if (allTokenIndices.indexOf(bank.tokenIndex) < 0) {
|
||||
|
|
|
@ -138,12 +138,14 @@ async function main() {
|
|||
);
|
||||
const userWallet = new Wallet(user);
|
||||
console.log(`User ${userWallet.publicKey.toBase58()}`);
|
||||
const mangoAccount = (
|
||||
await client.getMangoAccountsForOwner(group, user.publicKey)
|
||||
)[0];
|
||||
console.log(`MangoAccount ${mangoAccount.publicKey}`);
|
||||
|
||||
await debugUser(client, group, mangoAccount);
|
||||
const mangoAccounts = await client.getMangoAccountsForOwner(
|
||||
group,
|
||||
user.publicKey,
|
||||
);
|
||||
for (const mangoAccount of mangoAccounts) {
|
||||
console.log(`MangoAccount ${mangoAccount.publicKey}`);
|
||||
await debugUser(client, group, mangoAccount);
|
||||
}
|
||||
}
|
||||
|
||||
process.exit();
|
||||
|
|
Loading…
Reference in New Issue