This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,16 @@
// Metro module 8762 (f8763).
import { useMemo } from "react";
import { getProductOrbPrice } from "../../utils/CollectiblesProductUtils";
import { useFetchVirtualCurrencyBalance } from "../../../virtual_currency/hooks/index";
export function useVirtualCurrencyData(a0, a1) {
const productOrbPrice = getProductOrbPrice({
product: a0,
hasShopDiscount: a1
});
const balance = useFetchVirtualCurrencyBalance().balance;
return {
price: productOrbPrice,
balance,
canAfford: useMemo(() => productOrbPrice == null ? null : balance == null ? null : productOrbPrice.amount <= balance, [productOrbPrice, balance])
};
}