diff --git a/src/components/AccountBalance.vue b/src/components/AccountBalance.vue index ae64caa69..a1a40670f 100644 --- a/src/components/AccountBalance.vue +++ b/src/components/AccountBalance.vue @@ -41,7 +41,10 @@ export default defineComponent({ setup(props, context) { const { accountBalance } = useAddressStore(); const { accountBalance: btcAccountBalance } = useBtcAddressStore(); - const { accountBalance: usdcAccountBalance } = useUsdcAddressStore(); + const { + accountBalance: usdcAccountBalance, + nativeAccountBalance: nativeUsdcAccountBalance, + } = useUsdcAddressStore(); const { currency: fiatCurrency, exchangeRates } = useFiatStore(); const { config } = useConfig(); @@ -67,7 +70,7 @@ export default defineComponent({ if (config.usdc.enabled) { const usdcFiatAmount = usdcExchangeRate.value !== undefined - ? (usdcAccountBalance.value / 1e6) * usdcExchangeRate.value + ? ((usdcAccountBalance.value + nativeUsdcAccountBalance.value) / 1e6) * usdcExchangeRate.value : undefined; if (usdcFiatAmount === undefined) return undefined; amount += usdcFiatAmount; diff --git a/src/components/AccountMenuItem.vue b/src/components/AccountMenuItem.vue index c6975de21..cc1a8c262 100644 --- a/src/components/AccountMenuItem.vue +++ b/src/components/AccountMenuItem.vue @@ -109,6 +109,10 @@ export default defineComponent({ ? usdcAddressState.addressInfos[polygonAddress.value]?.balance || 0 : 0, ); + const nativeUsdcAccountBalance = computed(() => polygonAddress.value + ? usdcAddressState.addressInfos[polygonAddress.value]?.nativeBalance || 0 + : 0, + ); // TODO: Dedupe double code with AccountBalance const { currency: fiatCurrency, exchangeRates } = useFiatStore(); @@ -131,7 +135,7 @@ export default defineComponent({ } if (config.usdc.enabled) { const usdcFiatAmount = usdcExchangeRate.value !== undefined - ? (usdcAccountBalance.value / 1e6) * usdcExchangeRate.value + ? ((usdcAccountBalance.value + nativeUsdcAccountBalance.value) / 1e6) * usdcExchangeRate.value : undefined; if (usdcFiatAmount === undefined) return undefined; amount += usdcFiatAmount; diff --git a/src/components/layouts/AddressOverview.vue b/src/components/layouts/AddressOverview.vue index 984d75e48..cd39c92cf 100644 --- a/src/components/layouts/AddressOverview.vue +++ b/src/components/layouts/AddressOverview.vue @@ -82,7 +82,7 @@ + :amount="usdcAccountBalance + nativeUsdcAccountBalance" currency="usdc" value-mask/>