@rango-dev/widget-embedded 0.1.11-next.17 → 0.1.11-next.19
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/components/SwapDetailsPlaceholder.d.ts +1 -0
- package/dist/components/SwapDetailsPlaceholder.d.ts.map +1 -1
- package/dist/components/TokenInfo.d.ts.map +1 -1
- package/dist/pages/HistoryPage.d.ts.map +1 -1
- package/dist/pages/Home.d.ts.map +1 -1
- package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
- package/dist/pages/WalletsPage.d.ts +0 -1
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/widget-embedded.cjs.development.js +13 -8
- package/dist/widget-embedded.cjs.development.js.map +1 -1
- package/dist/widget-embedded.cjs.production.min.js +13 -8
- package/dist/widget-embedded.cjs.production.min.js.map +1 -1
- package/dist/widget-embedded.esm.js +13 -8
- package/dist/widget-embedded.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/app.css +0 -9
- package/src/components/SwapDetailsPlaceholder.tsx +8 -1
- package/src/components/TokenInfo.tsx +1 -0
- package/src/pages/HistoryPage.tsx +4 -1
- package/src/pages/Home.tsx +3 -2
- package/src/pages/SwapDetailsPage.tsx +2 -9
- package/src/pages/WalletsPage.tsx +2 -2
|
@@ -1535,6 +1535,7 @@ function TokenInfo(props) {
|
|
|
1535
1535
|
color: "neutrals800"
|
|
1536
1536
|
}, `$${numberToString(inputUsdValue)}`)),
|
|
1537
1537
|
value: props.inputAmount || '',
|
|
1538
|
+
min: 0,
|
|
1538
1539
|
onChange: props.type === 'From' ? event => {
|
|
1539
1540
|
props.onAmountChange(event.target.value);
|
|
1540
1541
|
} : undefined
|
|
@@ -1772,7 +1773,7 @@ function Home() {
|
|
|
1772
1773
|
title: `${swap?.swapperId} Limit`
|
|
1773
1774
|
}, React.createElement(React.Fragment, null, React.createElement(Typography, {
|
|
1774
1775
|
variant: "body3"
|
|
1775
|
-
}, fromAmountRangeError,
|
|
1776
|
+
}, `${fromAmountRangeError}, Yours: ${numberToString(swap?.fromAmount || null)} ${swap?.from.symbol}`), React.createElement(Typography, {
|
|
1776
1777
|
variant: "body3"
|
|
1777
1778
|
}, recommendation)))), React.createElement(Footer, null, React.createElement(Button, {
|
|
1778
1779
|
type: "primary",
|
|
@@ -2477,9 +2478,11 @@ function HistoryPage() {
|
|
|
2477
2478
|
} = _ref;
|
|
2478
2479
|
return swap;
|
|
2479
2480
|
});
|
|
2481
|
+
const loading = !manager?.isLoaded();
|
|
2480
2482
|
return React.createElement(History, {
|
|
2481
2483
|
list: pendingSwaps,
|
|
2482
2484
|
groupBy: groupSwapsByDate,
|
|
2485
|
+
loading: loading,
|
|
2483
2486
|
onSwapClick: requestId => {
|
|
2484
2487
|
setSelectedSwap(requestId);
|
|
2485
2488
|
navigate(navigationRoutes.swaps + `/${requestId}`, {
|
|
@@ -2790,6 +2793,13 @@ function getSwapDate(pendingSwap) {
|
|
|
2790
2793
|
const PlaceholderContainer = /*#__PURE__*/styled('div', {
|
|
2791
2794
|
height: '450px'
|
|
2792
2795
|
});
|
|
2796
|
+
const LoaderContainer$1 = /*#__PURE__*/styled('div', {
|
|
2797
|
+
display: 'flex',
|
|
2798
|
+
justifyContent: 'center',
|
|
2799
|
+
width: '100%',
|
|
2800
|
+
paddingTop: '33%',
|
|
2801
|
+
flex: 1
|
|
2802
|
+
});
|
|
2793
2803
|
function SwapDetailsPlaceholder(props) {
|
|
2794
2804
|
const {
|
|
2795
2805
|
requestId,
|
|
@@ -2800,7 +2810,7 @@ function SwapDetailsPlaceholder(props) {
|
|
|
2800
2810
|
title: "Swap Details",
|
|
2801
2811
|
textField: false,
|
|
2802
2812
|
onBack: onBack
|
|
2803
|
-
}, React.createElement(PlaceholderContainer, null, loading ? React.createElement(LoaderContainer, null, React.createElement(Spinner, {
|
|
2813
|
+
}, React.createElement(PlaceholderContainer, null, loading ? React.createElement(LoaderContainer$1, null, React.createElement(Spinner, {
|
|
2804
2814
|
size: 24
|
|
2805
2815
|
})) : React.createElement(Alert, {
|
|
2806
2816
|
type: "secondary",
|
|
@@ -2823,12 +2833,6 @@ function SwapDetailsPage() {
|
|
|
2823
2833
|
const {
|
|
2824
2834
|
manager
|
|
2825
2835
|
} = useManager();
|
|
2826
|
-
const [loading, setLoading] = useState(true);
|
|
2827
|
-
useEffect(() => {
|
|
2828
|
-
setTimeout(() => {
|
|
2829
|
-
setLoading(false);
|
|
2830
|
-
}, 5000);
|
|
2831
|
-
}, []);
|
|
2832
2836
|
const pendingSwaps = getPendingSwaps(manager);
|
|
2833
2837
|
const selectedSwap = pendingSwaps.find(_ref => {
|
|
2834
2838
|
let {
|
|
@@ -2841,6 +2845,7 @@ function SwapDetailsPage() {
|
|
|
2841
2845
|
if (swap) cancelSwap(swap);
|
|
2842
2846
|
};
|
|
2843
2847
|
const swap = selectedSwap?.swap;
|
|
2848
|
+
const loading = !manager?.isLoaded();
|
|
2844
2849
|
if (!swap) return React.createElement(SwapDetailsPlaceholder, {
|
|
2845
2850
|
requestId: selectedSwapRequestId || '',
|
|
2846
2851
|
loading: loading,
|