mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
fix: 单个提供商更新时不再清空全部余额缓存
loadBalances 新增 fullReload 参数,单个提供商刷新时传入 false, 避免更新一个提供商的余额数据时清除其他提供商的已加载余额。
This commit is contained in:
@@ -57,9 +57,10 @@ export function useProviderBalance() {
|
||||
}
|
||||
|
||||
// 异步加载余额数据(使用批量接口)
|
||||
async function loadBalances(providers: ProviderWithEndpointsSummary[]) {
|
||||
// 清空旧的余额缓存,避免数据累积
|
||||
balanceCache.value = {}
|
||||
async function loadBalances(providers: ProviderWithEndpointsSummary[], fullReload = true) {
|
||||
if (fullReload) {
|
||||
balanceCache.value = {}
|
||||
}
|
||||
const currentVersion = ++balanceLoadVersion
|
||||
try {
|
||||
const opsProviderIds = providers.filter(p => p.ops_configured).map(p => p.id)
|
||||
|
||||
Reference in New Issue
Block a user