From fa49a150376549da5dab149d668325378b1c8ba8 Mon Sep 17 00:00:00 2001 From: Giorgio <20621396+giorgi-o@users.noreply.github.com> Date: Sat, 25 May 2024 11:43:46 +0100 Subject: [PATCH] Fix riotClientHeaders not imported --- valorant/battlepass.js | 2 +- valorant/cache.js | 2 +- valorant/shop.js | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/valorant/battlepass.js b/valorant/battlepass.js index 96fe0c93..386af029 100644 --- a/valorant/battlepass.js +++ b/valorant/battlepass.js @@ -129,7 +129,7 @@ export const getBattlepassProgress = async (interaction, maxlevel, id=interactio "Authorization": "Bearer " + user.auth.rso, "X-Riot-Entitlements-JWT": user.auth.ent, "X-Riot-ClientVersion": (await getValorantVersion()).riotClientVersion, - ...RIOT_CLIENT_HEADERS, + ...riotClientHeaders(), } }); diff --git a/valorant/cache.js b/valorant/cache.js index 2e20e1c6..bf3eadcb 100644 --- a/valorant/cache.js +++ b/valorant/cache.js @@ -166,7 +166,7 @@ const getPrices = async (gameVersion, id = null) => { headers: { "Authorization": "Bearer " + user.auth.rso, "X-Riot-Entitlements-JWT": user.auth.ent, - ...RIOT_CLIENT_HEADERS, + ...riotClientHeaders(), } }); console.assert(req.statusCode === 200, `Valorant skins prices code is ${req.statusCode}!`, req); diff --git a/valorant/shop.js b/valorant/shop.js index 6fc556c7..30ebc9e2 100644 --- a/valorant/shop.js +++ b/valorant/shop.js @@ -7,7 +7,8 @@ import { formatNightMarket, getPuuid, isMaintenance, isSameDay, - userRegion + userRegion, + riotClientHeaders, } from "../misc/util.js"; import { addBundleData, getSkin, getSkinFromSkinUuid } from "./cache.js"; import { addStore } from "../misc/stats.js";