remove hack

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2021-12-26 16:11:06 +01:00
parent ed0869e808
commit 05ed47fde4
1 changed files with 0 additions and 20 deletions

View File

@ -47,8 +47,6 @@ class MangoSimpleClient {
public owner: Account,
public mangoAccount: MangoAccount
) {
setInterval(this.roundRobinClusterUrl, 1_000);
// refresh things which might get stale over time
setInterval(
this.refresh,
@ -828,24 +826,6 @@ class MangoSimpleClient {
) {
mangoAccount.loadOpenOrders(connection, mangoGroupConfig.serumProgramId);
}
private roundRobinClusterUrl() {
if (process.env.CLUSTER_URL) {
return;
}
const possibleClustersUrls = [
"https://api.mainnet-beta.solana.com",
"https://lokidfxnwlabdq.main.genesysgo.net:8899/",
"https://solana-api.projectserum.com/",
];
const clusterUrl =
possibleClustersUrls[
Math.floor(Math.random() * possibleClustersUrls.length)
];
this.connection = new Connection(clusterUrl, "processed" as Commitment);
}
}
export default MangoSimpleClient;