fix: 修复当前 USDT 余额计算,确保在余额不存在时返回 0

This commit is contained in:
2026-01-07 12:56:05 +07:00
parent 96a83f92e9
commit 104f663439

View File

@@ -13,8 +13,9 @@ const emit = defineEmits<{
const { t } = useI18n(); const { t } = useI18n();
const walletStore = useWalletStore(); const walletStore = useWalletStore();
await walletStore.syncFundingBalances();
const { fundingBalances } = storeToRefs(walletStore); const { fundingBalances } = storeToRefs(walletStore);
const currentUSDTBalance = computed(() => fundingBalances.value[0].available); const currentUSDTBalance = computed(() => fundingBalances.value[0]?.available || 0);
const num = ref<number | null>(null); const num = ref<number | null>(null);