@layerswap/widget 0.1.18 → 0.1.20

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.
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import Image from "next/image";
3
2
  import { Fuel } from "lucide-react";
4
3
  import { truncateDecimals } from "../../../../utils/RoundDecimals";
5
4
  import LayerSwapApiClient from "../../../../../lib/layerSwapApiClient";
@@ -24,9 +23,9 @@ const Summary = ({ sourceAccountAddress, sourceCurrency, destinationCurrency, so
24
23
  const refuelAmountInUsd = nativeCurrency && ((nativeCurrency?.price_in_usd || 1) * (Number(truncatedRefuelAmount) || 0)).toFixed(2);
25
24
  const destAddress = (hideAddress && hideTo && account) ? account : destinationAddress;
26
25
  return (_jsx("div", { children: _jsxs("div", { className: "font-normal flex flex-col w-full relative z-10 space-y-4", children: [_jsxs("div", { className: "flex items-center justify-between w-full", children: [_jsxs("div", { className: "flex items-center gap-3", children: [sourceExchange ?
27
- _jsx(Image, { src: sourceExchange.logo, alt: sourceExchange.display_name, width: 32, height: 32, className: "rounded-lg" })
26
+ _jsx("img", { src: sourceExchange.logo, alt: sourceExchange.display_name, width: 32, height: 32, className: "rounded-lg" })
28
27
  : source ?
29
- _jsx(Image, { src: source.logo, alt: source.display_name, width: 32, height: 32, className: "rounded-lg" })
28
+ _jsx("img", { src: source.logo, alt: source.display_name, width: 32, height: 32, className: "rounded-lg" })
30
29
  :
31
30
  null, _jsxs("div", { children: [_jsx("p", { className: "text-primary-text text-sm leading-5", children: sourceExchange ? sourceExchange?.display_name : source?.display_name }), sourceExchange ?
32
31
  _jsx("p", { className: "text-sm text-secondary-text", children: "Exchange" })
@@ -38,9 +37,9 @@ const Summary = ({ sourceAccountAddress, sourceCurrency, destinationCurrency, so
38
37
  :
39
38
  null] })] }), _jsxs("div", { className: "flex flex-col items-end", children: [requestedAmount &&
40
39
  _jsxs("p", { className: "text-primary-text text-sm", children: [truncateDecimals(requestedAmount, sourceCurrency.precision), " ", sourceCurrency.symbol] }), _jsxs("p", { className: "text-secondary-text text-sm flex justify-end", children: ["$", requestedAmountInUsd] })] })] }), _jsxs("div", { className: "flex items-center justify-between w-full ", children: [_jsxs("div", { className: "flex items-center gap-3", children: [destExchange ?
41
- _jsx(Image, { src: destExchange.logo, alt: destExchange.display_name, width: 32, height: 32, className: "rounded-lg" })
40
+ _jsx("img", { src: destExchange.logo, alt: destExchange.display_name, width: 32, height: 32, className: "rounded-lg" })
42
41
  : destination ?
43
- _jsx(Image, { src: destination.logo, alt: destination.display_name, width: 32, height: 32, className: "rounded-lg" })
42
+ _jsx("img", { src: destination.logo, alt: destination.display_name, width: 32, height: 32, className: "rounded-lg" })
44
43
  :
45
44
  null, _jsxs("div", { className: "group/addressItem text-sm text-secondary-text", children: [_jsx("p", { className: "text-primary-text leading-5", children: destExchange ? destExchange?.display_name : destination?.display_name }), _jsx(ExtendedAddress, { address: addressFormat(destAddress, to), network: to })] })] }), receiveAmount != undefined ?
46
45
  _jsxs("div", { className: "flex flex-col justify-end", children: [_jsxs("p", { className: "text-primary-text text-sm", children: [truncateDecimals(receiveAmount, destinationCurrency.precision), " ", destinationCurrency.symbol] }), _jsxs("p", { className: "text-secondary-text text-sm flex justify-end", children: ["$", receiveAmountInUsd] })] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerswap/widget",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "Streamline your asset transaction experience with Layerswap Widget across 50+ blockchains and 15+ exchanges.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",