From 75a81c605ac6b0c38c73d02ac1f5e9717510dedb Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 23 Feb 2021 13:21:19 -0330 Subject: [PATCH] Eliminate artificial delay in swaps loading screen after request loading is complete (#10496) --- .../swaps/loading-swaps-quotes/loading-swaps-quotes.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js b/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js index 0a2359bae..8835c372e 100644 --- a/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js +++ b/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js @@ -112,13 +112,9 @@ export default function LoadingSwapsQuotes({ // This is to give the user a sense of progress. The callback passed to `setTimeout` updates the quoteCount and therefore causes // a new logo to be shown, the fox to look at that logo, the logo bar and aggregator name to update. - // If loading is complete and all logos + aggregator names have been shown, give the user 1.2 seconds to read the - // "Finalizing message" and prepare for the screen change - if (quoteCount === numberOfQuotes && loadingComplete) { - timeoutLength = 1200; - } else if (loadingComplete) { - // If loading is complete, but the quoteCount is not, we quickly display the remaining logos/names/fox looks. 0.5s each - timeoutLength = 500; + if (loadingComplete) { + // If loading is complete, but the quoteCount is not, we quickly display the remaining logos/names/fox looks. 0.2s each + timeoutLength = 200; } else { // If loading is not complete, we display remaining logos/names/fox looks at random intervals between 0.5s and 2s, to simulate the // sort of loading a user would experience in most async scenarios