1
0
forked from boos/BoosAPI

fix(proxy): apply account proxy to balance refresh and income fallback calls

This commit is contained in:
Hureru
2026-03-19 01:45:15 +08:00
parent 471879abbf
commit 028a767639
+4 -4
View File
@@ -429,12 +429,12 @@ export async function refreshBalance(accountId: number) {
if (canTryManagedSub2ApiRefresh) {
try {
const refreshed = await refreshSub2ApiManagedSession({
const refreshed = await withAccountProxyOverride(accountProxyUrl, () => refreshSub2ApiManagedSession({
account,
site,
currentAccessToken: activeAccessToken,
currentExtraConfig: activeExtraConfig,
});
}));
activeAccessToken = refreshed.accessToken;
activeExtraConfig = refreshed.extraConfig;
balanceInfo = await readBalance(activeAccessToken);
@@ -467,12 +467,12 @@ export async function refreshBalance(accountId: number) {
supportsTodayIncomeLogFallback(site.platform)
) {
try {
const fallbackIncome = await fetchTodayIncomeFromLogs({
const fallbackIncome = await withAccountProxyOverride(accountProxyUrl, () => fetchTodayIncomeFromLogs({
baseUrl: site.url,
accessToken: activeAccessToken,
platform: site.platform,
platformUserId,
});
}));
if (typeof fallbackIncome === 'number' && Number.isFinite(fallbackIncome)) {
balanceInfo.todayIncome = fallbackIncome;
}