Skip to content

Commit

Permalink
fix: review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
phchan9 committed Oct 27, 2022
1 parent ea5d7e7 commit 8ec3057
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"dependencies": {
"@perp/curie-deployments": "2022.10.5-1664940982527",
"cross-fetch": "3.1.5",
"exponential-backoff": "^3.1.0"
"exponential-backoff": "3.1.0"
},
"peerDependencies": {
"big.js": "6.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/network/RetryProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export class RetryProvider extends providers.BaseProvider {
private async _retryWithBackoff(func: (provider: providers.JsonRpcProvider) => Promise<any>, errors: any) {
const providerConnection = this._getCandidateProviderConnection(this.providerConnectionList)
try {
return backOff(() => func(providerConnection.provider), {
return await backOff(() => func(providerConnection.provider), {
numOfAttempts: 6, // retry 5 times
startingDelay: 1000, // 1 sec.
timeMultiple: 2,
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2978,7 +2978,7 @@ expect@^27.5.1:
jest-matcher-utils "^27.5.1"
jest-message-util "^27.5.1"

exponential-backoff@^3.1.0:
[email protected]:
version "3.1.0"
resolved "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.0.tgz#9409c7e579131f8bd4b32d7d8094a911040f2e68"
integrity sha512-oBuz5SYz5zzyuHINoe9ooePwSu0xApKWgeNzok4hZ5YKXFh9zrQBEM15CXqoZkJJPuI2ArvqjPQd8UKJA753XA==
Expand Down

0 comments on commit 8ec3057

Please sign in to comment.