@deframe-sdk/components 0.1.40 → 0.1.42

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.
package/dist/index.d.mts CHANGED
@@ -1498,7 +1498,7 @@ interface ChooseAnAssetSwapViewProps {
1498
1498
  isFetching: boolean;
1499
1499
  onAssetClick: (token: TokenData) => void;
1500
1500
  labels: ChooseAnAssetSwapLabels;
1501
- formatTokenAmount: (amountUI: string, priceUSD: number, decimals: number) => string;
1501
+ formatTokenAmount: (amountUI: string, priceUSD: number) => string;
1502
1502
  formatCurrencyValue: (value: number) => string;
1503
1503
  }
1504
1504
  declare const ChooseAnAssetSwapView: React__default.FC<ChooseAnAssetSwapViewProps>;
@@ -1739,7 +1739,7 @@ interface ChooseNetworkAndAssetViewSimpleProps {
1739
1739
  onNetworkSelect: (network: NetworkOption) => void;
1740
1740
  displayedTokens: TokenData[];
1741
1741
  findBalance: (token: TokenData) => BalanceDomain | undefined;
1742
- formatTokenAmount: (amountUI: string, priceUSD: number, decimals: number) => string;
1742
+ formatTokenAmount: (amountUI: string, priceUSD: number) => string;
1743
1743
  formatCurrencyValue: (value: number) => string;
1744
1744
  onAssetClick: (token: TokenData) => void;
1745
1745
  onSearch: (value: string) => void;
package/dist/index.d.ts CHANGED
@@ -1498,7 +1498,7 @@ interface ChooseAnAssetSwapViewProps {
1498
1498
  isFetching: boolean;
1499
1499
  onAssetClick: (token: TokenData) => void;
1500
1500
  labels: ChooseAnAssetSwapLabels;
1501
- formatTokenAmount: (amountUI: string, priceUSD: number, decimals: number) => string;
1501
+ formatTokenAmount: (amountUI: string, priceUSD: number) => string;
1502
1502
  formatCurrencyValue: (value: number) => string;
1503
1503
  }
1504
1504
  declare const ChooseAnAssetSwapView: React__default.FC<ChooseAnAssetSwapViewProps>;
@@ -1739,7 +1739,7 @@ interface ChooseNetworkAndAssetViewSimpleProps {
1739
1739
  onNetworkSelect: (network: NetworkOption) => void;
1740
1740
  displayedTokens: TokenData[];
1741
1741
  findBalance: (token: TokenData) => BalanceDomain | undefined;
1742
- formatTokenAmount: (amountUI: string, priceUSD: number, decimals: number) => string;
1742
+ formatTokenAmount: (amountUI: string, priceUSD: number) => string;
1743
1743
  formatCurrencyValue: (value: number) => string;
1744
1744
  onAssetClick: (token: TokenData) => void;
1745
1745
  onSearch: (value: string) => void;
package/dist/index.js CHANGED
@@ -5753,7 +5753,7 @@ var ChooseAnAssetSwapView = ({
5753
5753
  displayedTokens.map((token, index) => {
5754
5754
  const balance = findBalance == null ? void 0 : findBalance(token);
5755
5755
  const priceUSD = Number(balance == null ? void 0 : balance.priceUSD) || token.priceInUSD || 0;
5756
- const formattedBalance = (balance == null ? void 0 : balance.amountUI) ? formatTokenAmount(balance.amountUI, priceUSD, token.decimals) : "0";
5756
+ const formattedBalance = (balance == null ? void 0 : balance.amountUI) ? formatTokenAmount(balance.amountUI, priceUSD) : "0";
5757
5757
  return /* @__PURE__ */ jsxRuntime.jsxs(
5758
5758
  ListItem,
5759
5759
  {
@@ -8083,9 +8083,9 @@ function AssetRowInline({
8083
8083
  onKeyDown,
8084
8084
  index
8085
8085
  }) {
8086
- var _a;
8087
8086
  const hasBalance = !!balance && parseFloat(balance.amountInUSD) >= 0.01;
8088
- const formattedAmount = balance ? formatTokenAmount(balance.amountUI, (_a = token.priceInUSD) != null ? _a : 0, token.decimals) : void 0;
8087
+ const priceUSD = Number(balance == null ? void 0 : balance.priceUSD) || token.priceInUSD || 0;
8088
+ const formattedAmount = balance ? formatTokenAmount(balance.amountUI, priceUSD) : void 0;
8089
8089
  const formattedUsd = balance ? formatCurrencyValue(parseFloat(balance.amountInUSD)) : void 0;
8090
8090
  const baseClasses = [
8091
8091
  "group",
@@ -11977,7 +11977,7 @@ var EarnDepositFormViewSimple = ({
11977
11977
  ].join(" "),
11978
11978
  onClick: onBack,
11979
11979
  "aria-label": "Cancel deposit",
11980
- children: "Cancel"
11980
+ children: "Cancelar"
11981
11981
  }
11982
11982
  ),
11983
11983
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -12455,7 +12455,7 @@ var EarnWithdrawFormViewSimple = ({
12455
12455
  ].join(" "),
12456
12456
  onClick: onBack,
12457
12457
  "aria-label": "Cancel withdrawal",
12458
- children: "Cancel"
12458
+ children: "Cancelar"
12459
12459
  }
12460
12460
  ),
12461
12461
  /* @__PURE__ */ jsxRuntime.jsx(