fix: 修复当前 USDT 余额计算,确保在余额不存在时返回 0
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user