@deframe-sdk/components 0.1.40 → 0.1.41
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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",
|