small cleanup
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
de481a4008
commit
4a257cd694
|
@ -37,10 +37,12 @@ export class Group {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async reload(client: MangoClient) {
|
public async reload(client: MangoClient) {
|
||||||
await this.reloadBanks(client);
|
await Promise.all([
|
||||||
await this.reloadMintInfos(client);
|
this.reloadBanks(client),
|
||||||
await this.reloadSerum3Markets(client);
|
this.reloadMintInfos(client),
|
||||||
await this.reloadPerpMarkets(client);
|
this.reloadSerum3Markets(client),
|
||||||
|
this.reloadPerpMarkets(client),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async reloadBanks(client: MangoClient) {
|
public async reloadBanks(client: MangoClient) {
|
||||||
|
@ -52,11 +54,6 @@ export class Group {
|
||||||
const mintInfos = await client.getMintInfosForGroup(this);
|
const mintInfos = await client.getMintInfosForGroup(this);
|
||||||
this.mintInfosMap = new Map(
|
this.mintInfosMap = new Map(
|
||||||
mintInfos.map((mintInfo) => {
|
mintInfos.map((mintInfo) => {
|
||||||
// console.log(
|
|
||||||
// Array.from(this.banksMap.values()).find(
|
|
||||||
// (bank) => bank.mint.toBase58() === mintInfo.mint.toBase58(),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
return [
|
return [
|
||||||
Array.from(this.banksMap.values()).find(
|
Array.from(this.banksMap.values()).find(
|
||||||
(bank) => bank.mint.toBase58() === mintInfo.mint.toBase58(),
|
(bank) => bank.mint.toBase58() === mintInfo.mint.toBase58(),
|
||||||
|
@ -65,9 +62,6 @@ export class Group {
|
||||||
];
|
];
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
// console.log(this.banksMap);
|
|
||||||
// console.log(this.mintInfosMap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async reloadSerum3Markets(client: MangoClient) {
|
public async reloadSerum3Markets(client: MangoClient) {
|
||||||
|
|
Loading…
Reference in New Issue