Skip to content

Commit b53ff18

Browse files
Add small delay to avoid rate limiting
1 parent 6c2422a commit b53ff18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

projects/tapp-exchange/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { function_view } = require("../helper/chain/aptos");
2+
const { sleep } = require("../helper/utils");
23

34
const MODULE_VIEW = "0xf5840b576a3a6a42464814bc32ae1160c50456fb885c62be389b817e75b2a385";
45

@@ -72,7 +73,9 @@ module.exports = {
7273
const pairedCoin = await getPairedCoin(coin) || coin;
7374
if (pairedCoin) {
7475
api.add(pairedCoin, pool.reserves[i]);
75-
}
76+
}
77+
// Add small delay to avoid rate limiting
78+
await sleep(200);
7679
}
7780
}
7881
},

0 commit comments

Comments
 (0)