From 78538eb100addd135d29e60c9fa4fed3946278fa Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Thu, 27 Jul 2023 20:51:07 -0400 Subject: [PATCH] Fixed FallbackProvider priority sorting (#4150). --- src.ts/providers/provider-fallback.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src.ts/providers/provider-fallback.ts b/src.ts/providers/provider-fallback.ts index aa99714777..d9bea451b8 100644 --- a/src.ts/providers/provider-fallback.ts +++ b/src.ts/providers/provider-fallback.ts @@ -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; }