@axos-web-dev/shared-components 1.0.100-dev.82 → 1.0.100-dev.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,8 +31,9 @@ const AxosOneCalculator = ({
|
|
|
31
31
|
}) => {
|
|
32
32
|
const { domains } = useGlobalContext();
|
|
33
33
|
const calc_variant = getVariant(variant);
|
|
34
|
-
const AXOS_ONE_APY = Number(domains.
|
|
35
|
-
const AXOS_ONE_APY_TIERED = Number(domains.
|
|
34
|
+
const AXOS_ONE_APY = Number(domains.AXOS_ONE_APY);
|
|
35
|
+
const AXOS_ONE_APY_TIERED = Number(domains.AXOS1_APY_TIER);
|
|
36
|
+
const TIER_THRESHOLD = Number(domains.AXOS_ONE_THRESHOLD);
|
|
36
37
|
const startingBalance = Number.isFinite(Number(initialBalance)) && Number(initialBalance) >= 0 ? Number(initialBalance) : 1e4;
|
|
37
38
|
const [balance, setBalance] = useState(startingBalance);
|
|
38
39
|
const [calculatedBalance, setCalculatedBalance] = useState(startingBalance);
|
|
@@ -54,7 +55,6 @@ const AxosOneCalculator = ({
|
|
|
54
55
|
};
|
|
55
56
|
const calculateBalance = (amount) => {
|
|
56
57
|
setCalculatedBalance(amount);
|
|
57
|
-
const TIER_THRESHOLD = 249999.99;
|
|
58
58
|
if (amount > TIER_THRESHOLD) {
|
|
59
59
|
const tier1Amount = TIER_THRESHOLD;
|
|
60
60
|
const tier2Amount = amount - TIER_THRESHOLD;
|
|
@@ -191,7 +191,7 @@ const AxosOneCalculator = ({
|
|
|
191
191
|
/* @__PURE__ */ jsxs(TableRow, { className: clsx(tieredRowAnimation), children: [
|
|
192
192
|
/* @__PURE__ */ jsxs(TableCell, { variant: "primary", children: [
|
|
193
193
|
"$",
|
|
194
|
-
formatUSD(
|
|
194
|
+
formatUSD(TIER_THRESHOLD)
|
|
195
195
|
] }),
|
|
196
196
|
/* @__PURE__ */ jsxs(TableCell, { variant: "primary", children: [
|
|
197
197
|
AXOS_ONE_APY.toFixed(2),
|
|
@@ -205,7 +205,7 @@ const AxosOneCalculator = ({
|
|
|
205
205
|
/* @__PURE__ */ jsxs(TableRow, { className: clsx(tieredRowAnimationDelayed), children: [
|
|
206
206
|
/* @__PURE__ */ jsxs(TableCell, { variant: "primary", children: [
|
|
207
207
|
"$",
|
|
208
|
-
formatUSD(calculatedBalance -
|
|
208
|
+
formatUSD(calculatedBalance - TIER_THRESHOLD)
|
|
209
209
|
] }),
|
|
210
210
|
/* @__PURE__ */ jsxs(TableCell, { variant: "primary", children: [
|
|
211
211
|
AXOS_ONE_APY_TIERED.toFixed(2),
|
package/package.json
CHANGED