From a7010587809a0c9dd7b65f5bc4755034a441bcfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 5 Aug 2026 17:52:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D=E9=92=B1=E5=8C=85=E6=B8=85?= =?UTF-8?q?=E7=90=86=E4=BA=A7=E7=94=9F=E6=9C=AA=E5=A4=84=E7=90=86=E6=8B=92?= =?UTF-8?q?=E7=BB=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用同时处理成功与失败的 Promise 回调清理活动请求,避免 finally 派生拒绝无人观察。 --- packages/shared/src/stores/createProfileWalletStore.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/shared/src/stores/createProfileWalletStore.ts b/packages/shared/src/stores/createProfileWalletStore.ts index db1c703b9..02497b042 100644 --- a/packages/shared/src/stores/createProfileWalletStore.ts +++ b/packages/shared/src/stores/createProfileWalletStore.ts @@ -133,14 +133,15 @@ export function createProfileWalletStore( })(); activeRefresh = refresh; activeAbortController = abortController; - void refresh.finally(() => { + const clearActiveRefresh = () => { if (activeRefresh === refresh) { activeRefresh = null; } if (activeAbortController === abortController) { activeAbortController = null; } - }); + }; + void refresh.then(clearActiveRefresh, clearActiveRefresh); return refresh; }, resetWalletBalance: () => {