@rango-dev/widget-embedded 0.12.0 → 0.12.1-next.0

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +0 -4
  2. package/dist/Wallets.d.ts +1 -1
  3. package/dist/Wallets.d.ts.map +1 -1
  4. package/dist/components/Layout.d.ts.map +1 -1
  5. package/dist/components/SwitchFromAndTo.d.ts +2 -3
  6. package/dist/components/SwitchFromAndTo.d.ts.map +1 -1
  7. package/dist/hooks/useWalletProviders.d.ts +1 -1
  8. package/dist/hooks/useWalletProviders.d.ts.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/index.js.map +4 -4
  13. package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
  14. package/dist/pages/Home.d.ts.map +1 -1
  15. package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
  16. package/dist/types/config.d.ts +1 -1
  17. package/dist/types/config.d.ts.map +1 -1
  18. package/dist/utils/numbers.d.ts.map +1 -1
  19. package/dist/utils/providers.d.ts +1 -1
  20. package/dist/utils/providers.d.ts.map +1 -1
  21. package/package.json +6 -6
  22. package/src/QueueManager.tsx +1 -1
  23. package/src/Wallets.tsx +2 -2
  24. package/src/components/AppRouter.tsx +1 -1
  25. package/src/components/Layout.tsx +13 -66
  26. package/src/components/SwitchFromAndTo.tsx +34 -4
  27. package/src/hooks/useWalletProviders.ts +1 -1
  28. package/src/index.ts +1 -1
  29. package/src/pages/ConfirmSwapPage.tsx +21 -10
  30. package/src/pages/Home.tsx +101 -144
  31. package/src/pages/SwapDetailsPage.tsx +6 -3
  32. package/src/pages/WalletsPage.tsx +1 -1
  33. package/src/types/config.ts +1 -1
  34. package/src/utils/numbers.ts +2 -0
  35. package/src/utils/providers.ts +1 -1
  36. package/src/utils/wallets.ts +1 -1
  37. package/dist/components/PercentageChange.d.ts +0 -9
  38. package/dist/components/PercentageChange.d.ts.map +0 -1
  39. package/dist/components/RoutesOverview.d.ts +0 -120
  40. package/dist/components/RoutesOverview.d.ts.map +0 -1
  41. package/dist/components/SwapDetailsPlaceholder.d.ts +0 -120
  42. package/dist/components/SwapDetailsPlaceholder.d.ts.map +0 -1
  43. package/dist/components/TokenInfo.d.ts +0 -18
  44. package/dist/components/TokenInfo.d.ts.map +0 -1
  45. package/dist/components/TokenPreview.d.ts +0 -21
  46. package/dist/components/TokenPreview.d.ts.map +0 -1
  47. package/src/components/PercentageChange.tsx +0 -33
  48. package/src/components/RoutesOverview.tsx +0 -57
  49. package/src/components/SwapDetailsPlaceholder.tsx +0 -47
  50. package/src/components/TokenInfo.tsx +0 -329
  51. package/src/components/TokenPreview.tsx +0 -187
  52. package/src/languages/en.json +0 -14
  53. package/src/languages/tr.json +0 -11
@@ -1,20 +1,8 @@
1
- import {
2
- Alert,
3
- BestRoute,
4
- BottomLogo,
5
- Button,
6
- styled,
7
- Typography,
8
- VerticalSwapIcon,
9
- Header,
10
- HeaderButtons,
11
- } from '@rango-dev/ui';
12
- import React, { useEffect, useState } from 'react';
13
- import { i18n } from '@lingui/core';
14
- import { useInRouterContext, useNavigate } from 'react-router-dom';
15
- import { TokenInfo } from '../components/TokenInfo';
1
+ import React, { useEffect } from 'react';
2
+ import { useNavigate } from 'react-router-dom';
3
+ import { HomePanel } from '@rango-dev/ui';
16
4
  import { fetchBestRoute, useBestRouteStore } from '../store/bestRoute';
17
- import { SwithFromAndTo } from '../components/SwitchFromAndTo';
5
+ import { SwithFromAndToButton } from '../components/SwitchFromAndTo';
18
6
  import { navigationRoutes } from '../constants/navigationRoutes';
19
7
  import { useMetaStore } from '../store/meta';
20
8
  import { useWalletsStore } from '../store/wallets';
@@ -28,54 +16,20 @@ import {
28
16
  LimitErrorMessage,
29
17
  getTotalFeeInUsd,
30
18
  hasHighFee,
19
+ getPercentageChange,
31
20
  } from '../utils/swap';
21
+ import { useUiStore } from '../store/ui';
32
22
  import {
33
23
  numberToString,
34
24
  secondsToString,
35
25
  totalArrivalTime,
36
26
  } from '../utils/numbers';
37
- import BigNumber from 'bignumber.js';
38
- import { useUiStore } from '../store/ui';
27
+ import { getBalanceFromWallet } from '../utils/wallets';
39
28
  import { getFormatedBestRoute } from '../utils/routing';
40
-
41
- const Container = styled('div', {
42
- display: 'flex',
43
- flexDirection: 'column',
44
- });
45
-
46
- const FromContainer = styled('div', {
47
- position: 'relative',
48
- paddingBottom: '$12',
49
- });
50
-
51
- const SwitchButtonContainer = styled('div', {
52
- position: 'absolute',
53
- bottom: '-12px',
54
- left: '50%',
55
- transform: 'translate(-50%, 10%)',
56
- });
57
-
58
- const BestRouteContainer = styled('div', {
59
- width: '100%',
60
- paddingTop: '$16',
61
- });
62
-
63
- const Alerts = styled('div', {
64
- width: '100%',
65
- paddingTop: '$16',
66
- });
67
-
68
- const Footer = styled('div', {
69
- display: 'flex',
70
- flexDirection: 'column',
71
- width: '100%',
72
- paddingTop: '$16',
73
- });
29
+ import BigNumber from 'bignumber.js';
74
30
 
75
31
  export function Home() {
76
- const isRouterInContext = useInRouterContext();
77
32
  const navigate = useNavigate();
78
- const [count, setCount] = useState(0);
79
33
  const fromChain = useBestRouteStore.use.fromChain();
80
34
  const fromToken = useBestRouteStore.use.fromToken();
81
35
  const toChain = useBestRouteStore.use.toChain();
@@ -92,7 +46,6 @@ export function Home() {
92
46
  const loadingMetaStatus = useMetaStore.use.loadingStatus();
93
47
  const connectedWallets = useWalletsStore.use.connectedWallets();
94
48
  const setCurrentPage = useUiStore.use.setCurrentPage();
95
- const switchFromAndTo = useBestRouteStore.use.switchFromAndTo();
96
49
 
97
50
  const errorMessage =
98
51
  loadingMetaStatus === 'failed'
@@ -102,7 +55,7 @@ export function Home() {
102
55
  const needsToWarnEthOnPath = false;
103
56
 
104
57
  const showBestRoute =
105
- inputAmount && (!!bestRoute || fetchingBestRoute || bestRouteError);
58
+ !!inputAmount && (!!bestRoute || fetchingBestRoute || !!bestRouteError);
106
59
 
107
60
  const outToInRatio = getOutputRatio(inputUsdValue, outputUsdValue);
108
61
 
@@ -134,101 +87,105 @@ export function Home() {
134
87
 
135
88
  const highFee = hasHighFee(totalFeeInUsd);
136
89
 
90
+ const tokenBalance =
91
+ !!fromChain && !!fromToken
92
+ ? numberToString(
93
+ getBalanceFromWallet(
94
+ connectedWallets,
95
+ fromChain?.name,
96
+ fromToken?.symbol,
97
+ fromToken?.address
98
+ )?.amount || '0',
99
+ 8
100
+ )
101
+ : '0';
102
+
103
+ const tokenBalanceReal =
104
+ !!fromChain && !!fromToken
105
+ ? numberToString(
106
+ getBalanceFromWallet(
107
+ connectedWallets,
108
+ fromChain?.name,
109
+ fromToken?.symbol,
110
+ fromToken?.address
111
+ )?.amount || '0',
112
+ getBalanceFromWallet(
113
+ connectedWallets,
114
+ fromChain?.name,
115
+ fromToken?.symbol,
116
+ fromToken?.address
117
+ )?.decimal
118
+ )
119
+ : '0';
120
+
137
121
  useEffect(() => {
138
122
  setCurrentPage(navigationRoutes.home);
139
123
 
140
124
  return setCurrentPage.bind(null, '');
141
125
  }, []);
142
126
 
127
+ const percentageChange =
128
+ !inputUsdValue || !outputUsdValue || !outputUsdValue.gt(0)
129
+ ? null
130
+ : getPercentageChange(
131
+ inputUsdValue.toNumber(),
132
+ outputUsdValue.toNumber()
133
+ );
134
+
143
135
  return (
144
- <Container>
145
- <Header
146
- title={i18n.t('SWAP')}
147
- suffix={
148
- <HeaderButtons
149
- onClickRefresh={
150
- !!bestRoute || bestRouteError ? fetchBestRoute : undefined
151
- }
152
- onClickHistory={() => navigate(navigationRoutes.swaps)}
153
- onClickSettings={() => navigate(navigationRoutes.settings)}
154
- />
155
- }
156
- />
157
- <FromContainer>
158
- <TokenInfo
159
- type="From"
160
- chain={fromChain}
161
- token={fromToken}
162
- onAmountChange={setInputAmount}
163
- inputAmount={inputAmount}
164
- />
165
- <SwitchButtonContainer>
166
- <Button
167
- variant="ghost"
168
- onClick={() => {
169
- switchFromAndTo();
170
- setCount((prev) => prev + 1);
171
- }}>
172
- <VerticalSwapIcon size={32} />
173
- {isRouterInContext && <SwithFromAndTo count={count} />}
174
- </Button>
175
- </SwitchButtonContainer>
176
- </FromContainer>
177
- <TokenInfo
178
- type="To"
179
- chain={toChain}
180
- token={toToken}
181
- outputAmount={
182
- outputAmount ? new BigNumber(outputAmount) : new BigNumber(0)
136
+ <HomePanel
137
+ bestRoute={bestRoute}
138
+ bestRouteError={bestRouteError}
139
+ fetchBestRoute={fetchBestRoute}
140
+ onClickHistory={() => navigate(navigationRoutes.swaps)}
141
+ onClickSettings={() => navigate(navigationRoutes.settings)}
142
+ setInputAmount={setInputAmount}
143
+ fromChain={fromChain}
144
+ toChain={toChain}
145
+ fromToken={fromToken}
146
+ toToken={toToken}
147
+ outputAmount={
148
+ outputAmount
149
+ ? numberToString(new BigNumber(outputAmount))
150
+ : numberToString(new BigNumber(0))
151
+ }
152
+ inputAmount={inputAmount}
153
+ loadingStatus={loadingMetaStatus}
154
+ showBestRoute={showBestRoute}
155
+ fetchingBestRoute={fetchingBestRoute}
156
+ outputUsdValue={numberToString(outputUsdValue)}
157
+ inputUsdValue={numberToString(inputUsdValue)}
158
+ swapButtonTitle={swapButtonState.title}
159
+ swapButtonDisabled={swapButtonState.disabled}
160
+ swapButtonClick={() => {
161
+ if (swapButtonState.title === 'Connect Wallet')
162
+ navigate(navigationRoutes.wallets);
163
+ else {
164
+ navigate(navigationRoutes.confirmSwap, { replace: true });
183
165
  }
184
- outputUsdValue={outputUsdValue}
185
- />
186
- {showBestRoute && (
187
- <BestRouteContainer>
188
- <BestRoute
189
- error={bestRouteError}
190
- loading={fetchingBestRoute}
191
- data={getFormatedBestRoute(bestRoute)}
192
- totalFee={numberToString(totalFeeInUsd, 0, 2)}
193
- feeWarning={highFee}
194
- totalTime={secondsToString(totalArrivalTime(bestRoute))}
195
- />
196
- </BestRouteContainer>
197
- )}
198
- {(errorMessage || hasLimitError(bestRoute)) && (
199
- <Alerts>
200
- {errorMessage && <Alert type="error">{errorMessage}</Alert>}
201
- {hasLimitError(bestRoute) && (
202
- <Alert type="error" title={`${swap?.swapperId} Limit`}>
203
- <>
204
- <Typography variant="body2">
205
- {`${fromAmountRangeError}, Yours: ${numberToString(
206
- swap?.fromAmount || null
207
- )} ${swap?.from.symbol}`}
208
- </Typography>
209
- <Typography variant="body2">{recommendation}</Typography>
210
- </>
211
- </Alert>
212
- )}
213
- </Alerts>
214
- )}
215
- <Footer>
216
- <Button
217
- type="primary"
218
- align="grow"
219
- size="large"
220
- disabled={swapButtonState.disabled}
221
- onClick={() => {
222
- if (swapButtonState.title === 'Connect Wallet')
223
- navigate(navigationRoutes.wallets);
224
- else {
225
- navigate(navigationRoutes.confirmSwap, { replace: true });
226
- }
227
- }}>
228
- {swapButtonState.title}
229
- </Button>
230
- <BottomLogo />
231
- </Footer>
232
- </Container>
166
+ }}
167
+ onChainClick={(route) => {
168
+ navigate(route);
169
+ }}
170
+ onTokenClick={(route) => {
171
+ navigate(route);
172
+ }}
173
+ highFee={highFee}
174
+ errorMessage={errorMessage}
175
+ hasLimitError={hasLimitError}
176
+ swap={swap}
177
+ fromAmountRangeError={fromAmountRangeError}
178
+ recommendation={recommendation}
179
+ totalFeeInUsd={numberToString(totalFeeInUsd, 0, 2)}
180
+ swithFromAndToComponent={<SwithFromAndToButton />}
181
+ connectedWallets={connectedWallets}
182
+ percentageChange={numberToString(percentageChange, 0, 2)}
183
+ showPercentageChange={!!percentageChange?.lt(0)}
184
+ tokenBalanceReal={tokenBalanceReal}
185
+ tokenBalance={tokenBalance}
186
+ totalTime={secondsToString(totalArrivalTime(bestRoute))}
187
+ bestRouteData={getFormatedBestRoute(bestRoute)}
188
+ swapFromAmount={numberToString(swap?.fromAmount || null)}
189
+ />
233
190
  );
234
191
  }
@@ -3,13 +3,17 @@ import { navigationRoutes } from '../constants/navigationRoutes';
3
3
  import { useManager } from '@rango-dev/queue-manager-react';
4
4
  import { useNavigateBack } from '../hooks/useNavigateBack';
5
5
  import { getPendingSwaps } from '../utils/queue';
6
- import { SwapHistory, useCopyToClipboard } from '@rango-dev/ui';
6
+ import {
7
+ SwapHistory,
8
+ useCopyToClipboard,
9
+ SwapDetailsPlaceholder,
10
+ } from '@rango-dev/ui';
7
11
  import { useUiStore } from '../store/ui';
8
12
  import {
9
13
  cancelSwap,
10
14
  PendingSwapNetworkStatus,
11
15
  } from '@rango-dev/queue-manager-rango-preset';
12
- import { useWallets } from '@rango-dev/wallets-core';
16
+ import { useWallets } from '@rango-dev/wallets-react';
13
17
  import {
14
18
  getCurrentBlockchainOfOrNull,
15
19
  getCurrentStep,
@@ -24,7 +28,6 @@ import {
24
28
  isNetworkStatusInWarningState,
25
29
  shouldRetrySwap,
26
30
  } from '../utils/swap';
27
- import { SwapDetailsPlaceholder } from '../components/SwapDetailsPlaceholder';
28
31
  import { getFormatedPendingSwap } from '../utils/routing';
29
32
 
30
33
  export function SwapDetailsPage() {
@@ -13,7 +13,7 @@ import {
13
13
  WalletTypes,
14
14
  detectMobileScreens,
15
15
  } from '@rango-dev/wallets-shared';
16
- import { useWallets } from '@rango-dev/wallets-core';
16
+ import { useWallets } from '@rango-dev/wallets-react';
17
17
 
18
18
  import { useUiStore } from '../store/ui';
19
19
  import { useNavigateBack } from '../hooks/useNavigateBack';
@@ -1,6 +1,6 @@
1
1
  import { Asset } from 'rango-sdk';
2
2
  import { WalletType } from '@rango-dev/wallets-shared';
3
- import { ProviderInterface } from '@rango-dev/wallets-core';
3
+ import { ProviderInterface } from '@rango-dev/wallets-react';
4
4
  import { Language } from '@rango-dev/ui';
5
5
 
6
6
  /**
@@ -3,6 +3,7 @@ import { BestRouteResponse } from 'rango-sdk';
3
3
 
4
4
  export const percentToString = (p: number, fractions = 0): string =>
5
5
  (p * 100).toFixed(fractions);
6
+
6
7
  export const secondsToString = (s: number): string => {
7
8
  const seconds = (s % 60).toString().padStart(2, '0');
8
9
  const minutes = parseInt((s / 60).toString())
@@ -87,6 +88,7 @@ export const convertBigNumberToHex = (
87
88
 
88
89
  export const uint8ArrayToHex = (buffer: Uint8Array): string => {
89
90
  // buffer is an ArrayBuffer
91
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
90
92
  // @ts-ignore
91
93
  return [...buffer].map((x) => x.toString(16).padStart(2, '0')).join('');
92
94
  };
@@ -1,5 +1,5 @@
1
1
  import { allProviders } from '@rango-dev/provider-all';
2
- import { ProviderInterface } from '@rango-dev/wallets-core';
2
+ import { ProviderInterface } from '@rango-dev/wallets-react';
3
3
  import { WidgetConfig } from '../types';
4
4
 
5
5
  export interface ProvidersOptions {
@@ -23,7 +23,7 @@ import {
23
23
  WalletDetail,
24
24
  } from 'rango-sdk';
25
25
  import { isCosmosBlockchain } from 'rango-types';
26
- import { readAccountAddress } from '@rango-dev/wallets-core';
26
+ import { readAccountAddress } from '@rango-dev/wallets-react';
27
27
  import { ConnectedWallet, TokenBalance } from '../store/wallets';
28
28
  import { numberToString } from './numbers';
29
29
  import BigNumber from 'bignumber.js';
@@ -1,9 +0,0 @@
1
- import BigNumber from 'bignumber.js';
2
- import React from 'react';
3
- interface PropTypes {
4
- inputUsdValue: BigNumber | null;
5
- outputUsdValue: BigNumber | null;
6
- }
7
- export declare function PercentageChange(props: PropTypes): React.JSX.Element | null;
8
- export {};
9
- //# sourceMappingURL=PercentageChange.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PercentageChange.d.ts","sourceRoot":"","sources":["../../src/components/PercentageChange.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,SAAS;IACjB,aAAa,EAAE,SAAS,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC;CAClC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,4BAqBhD"}
@@ -1,120 +0,0 @@
1
- import React from 'react';
2
- import { BestRouteResponse } from 'rango-sdk';
3
- export declare const Container: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
4
- sm: string;
5
- md: string;
6
- lg: string;
7
- }, import("@stitches/react/types/css-util").CSS<{
8
- sm: string;
9
- md: string;
10
- lg: string;
11
- }, {
12
- colors: {
13
- primary: string;
14
- primary100: string;
15
- primary200: string;
16
- primary300: string;
17
- primary400: string;
18
- primary500: string;
19
- primary600: string;
20
- primary700: string;
21
- primary800: string;
22
- primary900: string;
23
- surface: string;
24
- neutral100: string;
25
- neutral200: string;
26
- neutral300: string;
27
- neutral400: string;
28
- neutral500: string;
29
- neutral600: string;
30
- neutral700: string;
31
- neutral800: string;
32
- neutral900: string;
33
- background: string;
34
- foreground: string;
35
- success: string;
36
- success100: string;
37
- success300: string;
38
- success500: string;
39
- success700: string;
40
- warning: string;
41
- warning100: string;
42
- warning300: string;
43
- warning500: string;
44
- warning700: string;
45
- error: string;
46
- error100: string;
47
- error300: string;
48
- error500: string;
49
- error700: string;
50
- white: string;
51
- };
52
- space: {
53
- 2: string;
54
- 4: string;
55
- 6: string;
56
- 8: string;
57
- 10: string;
58
- 12: string;
59
- 16: string;
60
- 20: string;
61
- 24: string;
62
- 28: string;
63
- 30: string;
64
- 32: string;
65
- };
66
- fontSizes: {
67
- 10: string;
68
- 12: string;
69
- 14: string;
70
- 16: string;
71
- 18: string;
72
- 20: string;
73
- 24: string;
74
- 32: string;
75
- 36: string;
76
- 40: string;
77
- 48: string;
78
- };
79
- fonts: {};
80
- fontWeights: {
81
- 400: string;
82
- 500: string;
83
- 600: string;
84
- 700: string;
85
- };
86
- lineHeights: {};
87
- letterSpacings: {};
88
- sizes: {
89
- 4: string;
90
- 6: string;
91
- 8: string;
92
- 12: string;
93
- 16: string;
94
- 20: string;
95
- 24: string;
96
- 28: string;
97
- 32: string;
98
- 36: string;
99
- 40: string;
100
- 48: string;
101
- };
102
- borderWidths: {};
103
- borderStyles: {};
104
- radii: {
105
- 5: string;
106
- 10: string;
107
- };
108
- shadows: {
109
- s: string;
110
- };
111
- zIndices: {};
112
- transitions: {};
113
- }, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
114
- interface PropTypes {
115
- routes: BestRouteResponse | null;
116
- totalFee?: string;
117
- }
118
- declare function RoutesOverview(props: PropTypes): React.JSX.Element | null;
119
- export default RoutesOverview;
120
- //# sourceMappingURL=RoutesOverview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RoutesOverview.d.ts","sourceRoot":"","sources":["../../src/components/RoutesOverview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAkBpB,CAAC;AAEH,UAAU,SAAS;IACjB,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,iBAAS,cAAc,CAAC,KAAK,EAAE,SAAS,4BA0BvC;AAED,eAAe,cAAc,CAAC"}
@@ -1,120 +0,0 @@
1
- import React from 'react';
2
- export declare const LoaderContainer: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
3
- sm: string;
4
- md: string;
5
- lg: string;
6
- }, import("@stitches/react/types/css-util").CSS<{
7
- sm: string;
8
- md: string;
9
- lg: string;
10
- }, {
11
- colors: {
12
- primary: string;
13
- primary100: string;
14
- primary200: string;
15
- primary300: string;
16
- primary400: string;
17
- primary500: string;
18
- primary600: string;
19
- primary700: string;
20
- primary800: string;
21
- primary900: string;
22
- surface: string;
23
- neutral100: string;
24
- neutral200: string;
25
- neutral300: string;
26
- neutral400: string;
27
- neutral500: string;
28
- neutral600: string;
29
- neutral700: string;
30
- neutral800: string;
31
- neutral900: string;
32
- background: string;
33
- foreground: string;
34
- success: string;
35
- success100: string;
36
- success300: string;
37
- success500: string;
38
- success700: string;
39
- warning: string;
40
- warning100: string;
41
- warning300: string;
42
- warning500: string;
43
- warning700: string;
44
- error: string;
45
- error100: string;
46
- error300: string;
47
- error500: string;
48
- error700: string;
49
- white: string;
50
- };
51
- space: {
52
- 2: string;
53
- 4: string;
54
- 6: string;
55
- 8: string;
56
- 10: string;
57
- 12: string;
58
- 16: string;
59
- 20: string;
60
- 24: string;
61
- 28: string;
62
- 30: string;
63
- 32: string;
64
- };
65
- fontSizes: {
66
- 10: string;
67
- 12: string;
68
- 14: string;
69
- 16: string;
70
- 18: string;
71
- 20: string;
72
- 24: string;
73
- 32: string;
74
- 36: string;
75
- 40: string;
76
- 48: string;
77
- };
78
- fonts: {};
79
- fontWeights: {
80
- 400: string;
81
- 500: string;
82
- 600: string;
83
- 700: string;
84
- };
85
- lineHeights: {};
86
- letterSpacings: {};
87
- sizes: {
88
- 4: string;
89
- 6: string;
90
- 8: string;
91
- 12: string;
92
- 16: string;
93
- 20: string;
94
- 24: string;
95
- 28: string;
96
- 32: string;
97
- 36: string;
98
- 40: string;
99
- 48: string;
100
- };
101
- borderWidths: {};
102
- borderStyles: {};
103
- radii: {
104
- 5: string;
105
- 10: string;
106
- };
107
- shadows: {
108
- s: string;
109
- };
110
- zIndices: {};
111
- transitions: {};
112
- }, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
113
- interface PropTypes {
114
- requestId: string;
115
- loading: boolean;
116
- onBack: () => void;
117
- }
118
- export declare function SwapDetailsPlaceholder(props: PropTypes): React.JSX.Element;
119
- export {};
120
- //# sourceMappingURL=SwapDetailsPlaceholder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SwapDetailsPlaceholder.d.ts","sourceRoot":"","sources":["../../src/components/SwapDetailsPlaceholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAM1B,CAAC;AAEH,UAAU,SAAS;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,qBA0BtD"}
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { BlockchainMeta, Token } from 'rango-sdk';
3
- import BigNumber from 'bignumber.js';
4
- type PropTypes = ({
5
- type: 'From';
6
- inputAmount: string;
7
- onAmountChange: (amount: string) => void;
8
- } | {
9
- type: 'To';
10
- outputAmount: BigNumber | null;
11
- outputUsdValue: BigNumber | null;
12
- }) & {
13
- chain: BlockchainMeta | null;
14
- token: Token | null;
15
- };
16
- export declare function TokenInfo(props: PropTypes): React.JSX.Element;
17
- export {};
18
- //# sourceMappingURL=TokenInfo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenInfo.d.ts","sourceRoot":"","sources":["../../src/components/TokenInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIlD,OAAO,SAAS,MAAM,cAAc,CAAC;AAOrC,KAAK,SAAS,GAAG,CACb;IACE,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C,GACD;IACE,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC;CAClC,CACJ,GAAG;IAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,CAAC;AA4F1D,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,qBA0MzC"}
@@ -1,21 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { LoadingStatus } from '../store/meta';
3
- import BigNumber from 'bignumber.js';
4
- interface PropTypes {
5
- label: string;
6
- amount: string;
7
- usdValue: BigNumber | null;
8
- loadingStatus: LoadingStatus;
9
- chain: {
10
- displayName: string;
11
- logo: string;
12
- };
13
- token: {
14
- symbol: string;
15
- image: string;
16
- };
17
- percentageChange?: ReactNode;
18
- }
19
- export declare function TokenPreview(props: PropTypes): React.JSX.Element;
20
- export {};
21
- //# sourceMappingURL=TokenPreview.d.ts.map