diff options
| author | Adam Soltys <[email protected]> | 2024-10-23 10:32:57 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-10-23 10:32:57 -0700 |
| commit | 5bf504653211300547fb925311ccf416a1963547 (patch) | |
| tree | 05dfd147b48d6a95f00beb01a128e187eb05cc18 /src/routes/+layout.server.ts | |
| parent | 8f5783b3b11316a15ed715ae8186b6149e8a2a28 (diff) | |
| download | coinos-ui-5bf504653211300547fb925311ccf416a1963547.tar.gz coinos-ui-5bf504653211300547fb925311ccf416a1963547.zip | |
no more slow fee rate
Diffstat (limited to 'src/routes/+layout.server.ts')
| -rw-r--r-- | src/routes/+layout.server.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts index a18ba506..b4022e69 100644 --- a/src/routes/+layout.server.ts +++ b/src/routes/+layout.server.ts @@ -3,7 +3,7 @@ import { loadTranslations, locales, } from "$lib/translations/index"; -import { auth, get } from "$lib/utils"; +import { auth, get, sleep } from "$lib/utils"; export const load = async ({ cookies, request, url }) => { const { host, pathname } = url; @@ -12,7 +12,10 @@ export const load = async ({ cookies, request, url }) => { if (token) { try { user = await get("/me", auth(cookies)); - } catch (e) {} + } catch (e) { + if (e.message.startsWith("Rate")) await sleep(3000); + user = await get("/me", auth(cookies)); + } } // Try to get the locale from cookie |
