@axos-web-dev/shared-components 1.0.100-dev.38 → 1.0.100-dev.39

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.
@@ -27,15 +27,24 @@ const SummitApyCalculator = ({
27
27
  variant
28
28
  }) => {
29
29
  const calc_variant = getVariant(variant);
30
+ const SUMMIT_APY = +process.env.NEXT_PUBLIC_SUMMIT_SAVINGS_APY;
30
31
  const [balance, setBalance] = useState(1e4);
31
- const [axbAPY, _setAxbAPY] = useState(4);
32
- const [axbEarning, setAxbEarning] = useState(400);
33
- const [capitalOneAPY, _setcapitalOneAPY] = useState(3.7);
34
- const [capitalOneEarning, setcapitalOneEarning] = useState(370);
32
+ const [axbAPY, _setAxbAPY] = useState(SUMMIT_APY);
33
+ const [axbEarning, setAxbEarning] = useState(
34
+ SUMMIT_APY / 100 * balance
35
+ );
36
+ const [capitalOneAPY, _setcapitalOneAPY] = useState(3.4);
37
+ const [capitalOneEarning, setcapitalOneEarning] = useState(
38
+ capitalOneAPY / 100 * balance
39
+ );
35
40
  const [bofaAPY, _setBofaAPY] = useState(0.04);
36
- const [bofaEarning, setBofaEarning] = useState(4);
41
+ const [bofaEarning, setBofaEarning] = useState(
42
+ bofaAPY / 100 * balance
43
+ );
37
44
  const [chaseAPY, _setchaseAPY] = useState(0.01);
38
- const [chaseEarning, setchaseEarning] = useState(1);
45
+ const [chaseEarning, setchaseEarning] = useState(
46
+ chaseAPY / 100 * balance
47
+ );
39
48
  const removeNonNumeric = (value) => {
40
49
  if (value === "") {
41
50
  value = "0";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@axos-web-dev/shared-components",
3
3
  "description": "Axos shared components library for web.",
4
- "version": "1.0.100-dev.38",
4
+ "version": "1.0.100-dev.39",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",