Skip to content

Commit

Permalink
Fixed FallbackProvider priority sorting (ethers-io#4150).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent 5d301a6 commit 6c97deb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src.ts/providers/provider-fallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export class FallbackProvider extends AbstractProvider {
// Shuffle the states, sorted by priority
const allConfigs = this.#configs.slice();
shuffle(allConfigs);
allConfigs.sort((a, b) => (b.priority - a.priority));
allConfigs.sort((a, b) => (a.priority - b.priority));

for (const config of allConfigs) {
if (config._lastFatalError) { continue; }
Expand Down

0 comments on commit 6c97deb

Please sign in to comment.