@rango-dev/ui 0.22.1-next.16 → 0.22.1-next.17

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 (26) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.js.map +2 -2
  3. package/dist/widget/ui/src/components/SwapListItem/mock.d.ts +1 -1
  4. package/dist/widget/ui/src/components/SwapListItem/mock.d.ts.map +1 -1
  5. package/dist/widget/ui/src/components/TokenAmount/TokenAmount.d.ts.map +1 -1
  6. package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts +1 -1
  7. package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts.map +1 -1
  8. package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.stories.d.ts +2 -2
  9. package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.stories.d.ts.map +1 -1
  10. package/dist/widget/ui/src/containers/SwapHistory/mock.d.ts +1 -1
  11. package/dist/widget/ui/src/containers/SwapHistory/mock.d.ts.map +1 -1
  12. package/dist/widget/ui/src/types/index.d.ts +0 -1
  13. package/dist/widget/ui/src/types/index.d.ts.map +1 -1
  14. package/dist/widget/ui/src/types/swaps.d.ts +1 -27
  15. package/dist/widget/ui/src/types/swaps.d.ts.map +1 -1
  16. package/package.json +4 -4
  17. package/src/components/SwapListItem/mock.ts +21 -6
  18. package/src/components/TokenAmount/TokenAmount.tsx +17 -15
  19. package/src/containers/SwapHistory/SwapHistory.stories.tsx +5 -2
  20. package/src/containers/SwapHistory/SwapHistory.tsx +1 -1
  21. package/src/containers/SwapHistory/mock.ts +24 -8
  22. package/src/types/index.ts +0 -1
  23. package/src/types/swaps.ts +0 -38
  24. package/dist/widget/ui/src/containers/History/types.d.ts +0 -2
  25. package/dist/widget/ui/src/containers/History/types.d.ts.map +0 -1
  26. package/src/containers/History/types.tsx +0 -1
@@ -1,5 +1,5 @@
1
1
  import type { SwapTokenData } from './SwapListItem.types';
2
- import type { PendingSwap } from '../../containers/History/types';
2
+ import type { PendingSwap } from 'rango-types';
3
3
  export declare const swap: PendingSwap;
4
4
  export declare const swapTokenData: SwapTokenData;
5
5
  //# sourceMappingURL=mock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SwapListItem/mock.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAIlE,eAAO,MAAM,IAAI,EAAE,WA+QlB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,aAqB3B,CAAC"}
1
+ {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SwapListItem/mock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAQ/C,eAAO,MAAM,IAAI,EAAE,WA6RlB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,aAqB3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TokenAmount.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TokenAmount/TokenAmount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,qBAkD3C"}
1
+ {"version":3,"file":"TokenAmount.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TokenAmount/TokenAmount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,qBAoD3C"}
@@ -1,5 +1,5 @@
1
1
  import type { PropTypes as SwapMessagesPropTypes } from './SwapMessages';
2
- import type { PendingSwap } from '../History/types';
2
+ import type { PendingSwap } from 'rango-types';
3
3
  import React from 'react';
4
4
  import { Typography } from '../../components';
5
5
  export declare const pulse: {
@@ -1 +1 @@
1
- {"version":3,"file":"SwapHistory.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/SwapHistory/SwapHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EASL,UAAU,EACX,MAAM,kBAAkB,CAAC;AAU1B,eAAO,MAAM,KAAK;;;CAUhB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAgB3B,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAKpB,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAEnB,CAAC;AAEH,eAAO,MAAM,YAAY;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CAAC;IACb,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC,GAAG,qBAAqB,CAAC;AAE1B,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,qBAyO3C"}
@@ -1,7 +1,7 @@
1
+ import type { PropTypes } from './SwapHistory';
1
2
  import React from 'react';
2
- import { PropTypes } from './SwapHistory';
3
3
  declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, {
4
- pendingSwap: import("@rango-dev/queue-manager-rango-preset").PendingSwap;
4
+ pendingSwap: import("rango-types/lib").PendingSwap;
5
5
  onCopy: (requestId: string) => void;
6
6
  onBack: () => void;
7
7
  isCopied: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"SwapHistory.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/SwapHistory/SwapHistory.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAe,MAAM,eAAe,CAAC;;;;;;;;;;;AAGvD,wBAG8B;AAE9B,eAAO,MAAM,IAAI,SAAU,SAAS,sBAEnC,CAAC"}
1
+ {"version":3,"file":"SwapHistory.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/SwapHistory/SwapHistory.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;AAK1B,wBAG8B;AAE9B,eAAO,MAAM,IAAI,SAAU,SAAS,sBAEnC,CAAC"}
@@ -1,3 +1,3 @@
1
- import { PendingSwap } from '../History/types';
1
+ import type { PendingSwap } from 'rango-types';
2
2
  export declare const pendingSwap: PendingSwap;
3
3
  //# sourceMappingURL=mock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/SwapHistory/mock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,eAAO,MAAM,WAAW,EAAE,WA+QzB,CAAC"}
1
+ {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/SwapHistory/mock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/C,eAAO,MAAM,WAAW,EAAE,WA6RzB,CAAC"}
@@ -1,3 +1,2 @@
1
- export type { BestRouteWithFee } from './swaps';
2
1
  export type { ConnectedWallet } from './wallet';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC"}
@@ -1,30 +1,4 @@
1
- import type { BestRouteResponse, BlockchainValidationStatus, SimulationResult, SwapResult, WalletRequiredAssets } from 'rango-sdk';
2
- export type SwapStatus = 'running' | 'failed' | 'success';
3
- export type MessageSeverity = 'error' | 'warning' | 'info' | 'success';
4
- export type StepStatus = 'created' | 'running' | 'failed' | 'success' | 'waitingForApproval' | 'approved';
5
- export declare enum PendingSwapNetworkStatus {
6
- WaitingForConnectingWallet = "waitingForConnectingWallet",
7
- WaitingForQueue = "waitingForQueue",
8
- WaitingForNetworkChange = "waitingForNetworkChange",
9
- NetworkChanged = "networkChanged"
10
- }
11
- export type WalletTypeAndAddress = {
12
- walletType: string;
13
- address: string;
14
- };
15
- export type SwapSavedSettings = {
16
- slippage: string;
17
- disabledSwappersIds: string[];
18
- disabledSwappersGroups: string[];
19
- };
1
+ import type { BlockchainValidationStatus, WalletRequiredAssets } from 'rango-sdk';
20
2
  export type SimulationAssetAndAmount = WalletRequiredAssets;
21
3
  export type SimulationValidationStatus = BlockchainValidationStatus;
22
- export type BestRouteType = BestRouteResponse;
23
- export type BestRouteWithFee = Omit<BestRouteResponse, 'result'> & {
24
- result: Omit<SimulationResult, 'swaps'> & {
25
- swaps: (SwapResult & {
26
- feeInUsd?: string;
27
- })[];
28
- };
29
- };
30
4
  //# sourceMappingURL=swaps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"swaps.d.ts","sourceRoot":"","sources":["../../../../../src/types/swaps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACrB,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAEvE,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,SAAS,GACT,QAAQ,GACR,SAAS,GACT,oBAAoB,GACpB,UAAU,CAAC;AAEf,oBAAY,wBAAwB;IAClC,0BAA0B,+BAA+B;IACzD,eAAe,oBAAoB;IACnC,uBAAuB,4BAA4B;IACnD,cAAc,mBAAmB;CAClC;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,sBAAsB,EAAE,MAAM,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAC5D,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,CAAC;AACpE,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,GAAG;IACjE,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,GAAG;QACxC,KAAK,EAAE,CAAC,UAAU,GAAG;YAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,EAAE,CAAC;KAC/C,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"swaps.d.ts","sourceRoot":"","sources":["../../../../../src/types/swaps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,oBAAoB,EACrB,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAC5D,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/ui",
3
- "version": "0.22.1-next.16",
3
+ "version": "0.22.1-next.17",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -26,7 +26,6 @@
26
26
  "peerDependencies": {
27
27
  "@lingui/core": "4.2.1",
28
28
  "@lingui/react": "4.2.1",
29
- "@rango-dev/queue-manager-rango-preset": "*",
30
29
  "react": ">=16"
31
30
  },
32
31
  "devDependencies": {
@@ -66,9 +65,10 @@
66
65
  "@radix-ui/react-radio-group": "^1.1.1",
67
66
  "@radix-ui/react-switch": "^1.0.1",
68
67
  "@radix-ui/react-tooltip": "^1.0.2",
69
- "@rango-dev/wallets-shared": "^0.21.1-next.5",
68
+ "@rango-dev/wallets-shared": "^0.21.1-next.6",
70
69
  "@stitches/react": "^1.2.8",
71
- "rango-sdk": "^0.1.35",
70
+ "rango-sdk": "^0.1.44",
71
+ "rango-types": "^0.1.57",
72
72
  "react-virtualized-auto-sizer": "^1.0.7",
73
73
  "react-window": "^1.8.8",
74
74
  "react-window-infinite-loader": "^1.0.8",
@@ -1,11 +1,12 @@
1
1
  /* eslint-disable @typescript-eslint/no-magic-numbers */
2
- // TODO: fix ts errors
3
- // eslint-disable-next-line
4
- // @ts-nocheck
5
2
  import type { SwapTokenData } from './SwapListItem.types';
6
- import type { PendingSwap } from '../../containers/History/types';
3
+ import type { PendingSwap } from 'rango-types';
7
4
 
8
- import { RoutingResultType, TransactionType } from 'rango-sdk';
5
+ import {
6
+ MessageSeverity,
7
+ RoutingResultType,
8
+ TransactionType,
9
+ } from 'rango-types';
9
10
 
10
11
  export const swap: PendingSwap = {
11
12
  creationTime: '1673164511955',
@@ -21,7 +22,7 @@ export const swap: PendingSwap = {
21
22
  status: 'running',
22
23
  isPaused: false,
23
24
  extraMessage: null,
24
- extraMessageSeverity: 'info',
25
+ extraMessageSeverity: MessageSeverity.info,
25
26
  extraMessageDetail: '',
26
27
  extraMessageErrorCode: null,
27
28
  networkStatusExtraMessage: null,
@@ -75,6 +76,7 @@ export const swap: PendingSwap = {
75
76
  expenseType: 'FROM_SOURCE_WALLET',
76
77
  name: 'Network Fee',
77
78
  amount: '0',
79
+ price: null,
78
80
  },
79
81
  ],
80
82
  estimatedTimeInSeconds: 45,
@@ -150,6 +152,7 @@ export const swap: PendingSwap = {
150
152
  includesDestinationTx: false,
151
153
  maxRequiredSign: 1,
152
154
  warnings: [],
155
+ internalSwaps: null,
153
156
  },
154
157
  ],
155
158
  },
@@ -164,16 +167,20 @@ export const swap: PendingSwap = {
164
167
  'ibc/46b44899322f3cd854d2d46deef881958467cdd4b3b10086da49296bbed94bed',
165
168
  fromDecimals: 6,
166
169
  fromAmountPrecision: null,
170
+ fromAmountRestrictionType: 'EXCLUSIVE',
171
+ estimatedTimeInSeconds: 5,
167
172
  fromAmountMinValue: null,
168
173
  fromAmountMaxValue: null,
169
174
  toBlockchainLogo: 'https://api.rango.exchange/swappers/osmosis.png',
170
175
  fromBlockchainLogo: 'https://api.rango.exchange/swappers/osmosis.png',
176
+ fromUsdPrice: null,
171
177
  toBlockchain: 'OSMOSIS',
172
178
  fromLogo: 'https://api.rango.exchange/tokens/COSMOS/JUNO.png',
173
179
  toSymbol: 'OSMO',
174
180
  toSymbolAddress: null,
175
181
  toDecimals: 6,
176
182
  toLogo: 'https://api.rango.exchange/i/mJQPS2',
183
+ toUsdPrice: null,
177
184
  startTransactionTime: 1673164519916,
178
185
  swapperId: 'Osmosis',
179
186
  swapperLogo: 'https://api.rango.exchange/swappers/osmosis.png',
@@ -189,6 +196,13 @@ export const swap: PendingSwap = {
189
196
  description: null,
190
197
  },
191
198
  ],
199
+ starknetApprovalTransaction: null,
200
+ starknetTransaction: null,
201
+ tronApprovalTransaction: null,
202
+ tonTransaction: null,
203
+ tronTransaction: null,
204
+ feeInUsd: null,
205
+ executedTransactionTime: null,
192
206
  cosmosTransaction: {
193
207
  type: TransactionType.COSMOS,
194
208
  fromWalletAddress: 'osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl',
@@ -276,6 +290,7 @@ export const swap: PendingSwap = {
276
290
  transferTransaction: null,
277
291
  diagnosisUrl: null,
278
292
  internalSteps: null,
293
+ internalSwaps: null,
279
294
  },
280
295
  ],
281
296
  };
@@ -41,21 +41,23 @@ export function TokenAmount(props: PropTypes) {
41
41
  </div>
42
42
  </div>
43
43
  </div>
44
- <div className="usd-value">
45
- {props.type === 'input' && (
46
- <Typography mr={4} size="small" variant="body" color="$neutral700">
47
- {`~$${props.price.usdValue}`}
48
- </Typography>
49
- )}
50
- {props.type === 'output' && (
51
- <PriceImpact
52
- size="small"
53
- outputUsdValue={props.price.usdValue}
54
- percentageChange={props.percentageChange}
55
- warningLevel={props.warningLevel}
56
- />
57
- )}
58
- </div>
44
+ {props.price.usdValue && props.price.usdValue !== '0' && (
45
+ <div className="usd-value">
46
+ {props.type === 'input' && (
47
+ <Typography mr={4} size="small" variant="body" color="$neutral700">
48
+ {`~$${props.price.usdValue}`}
49
+ </Typography>
50
+ )}
51
+ {props.type === 'output' && (
52
+ <PriceImpact
53
+ size="small"
54
+ outputUsdValue={props.price.usdValue}
55
+ percentageChange={props.percentageChange}
56
+ warningLevel={props.warningLevel}
57
+ />
58
+ )}
59
+ </div>
60
+ )}
59
61
  </Container>
60
62
  );
61
63
  }
@@ -1,7 +1,10 @@
1
+ import type { PropTypes } from './SwapHistory';
2
+ import type { Meta } from '@storybook/react';
3
+
1
4
  import React from 'react';
2
- import { Meta } from '@storybook/react';
3
- import { PropTypes, SwapHistory } from './SwapHistory';
5
+
4
6
  import { pendingSwap } from './mock';
7
+ import { SwapHistory } from './SwapHistory';
5
8
 
6
9
  export default {
7
10
  title: 'Containers/Swap History',
@@ -1,5 +1,5 @@
1
1
  import type { PropTypes as SwapMessagesPropTypes } from './SwapMessages';
2
- import type { PendingSwap } from '../History/types';
2
+ import type { PendingSwap } from 'rango-types';
3
3
 
4
4
  import React, { useState } from 'react';
5
5
 
@@ -1,6 +1,8 @@
1
- // @ts-nocheck
1
+ /* eslint-disable @typescript-eslint/no-magic-numbers */
2
+ import type { PendingSwap } from 'rango-types';
3
+
2
4
  import { RoutingResultType, TransactionType } from 'rango-sdk';
3
- import { PendingSwap } from '../History/types';
5
+ import { MessageSeverity } from 'rango-types';
4
6
 
5
7
  export const pendingSwap: PendingSwap = {
6
8
  creationTime: '1673164511955',
@@ -16,7 +18,7 @@ export const pendingSwap: PendingSwap = {
16
18
  status: 'running',
17
19
  isPaused: false,
18
20
  extraMessage: null,
19
- extraMessageSeverity: 'info',
21
+ extraMessageSeverity: MessageSeverity.info,
20
22
  extraMessageDetail: '',
21
23
  extraMessageErrorCode: null,
22
24
  networkStatusExtraMessage: null,
@@ -34,14 +36,14 @@ export const pendingSwap: PendingSwap = {
34
36
  {
35
37
  swapperId: 'Osmosis',
36
38
  swapperType: 'DEX',
37
- swapperLogo: 'https://api.rango.exchange/swappers/osmosis.png',
39
+ swapperLogo: '',
38
40
  from: {
39
41
  symbol: 'JUNO',
40
42
  logo: 'https://api.rango.exchange/tokens/COSMOS/JUNO.png',
41
43
  address:
42
44
  'ibc/46b44899322f3cd854d2d46deef881958467cdd4b3b10086da49296bbed94bed',
43
45
  blockchain: 'OSMOSIS',
44
- blockchainLogo: '',
46
+ blockchainLogo: 'https://api.rango.exchange/swappers/osmosis.png',
45
47
  decimals: 6,
46
48
  usdPrice: 1.1091996179668873,
47
49
  },
@@ -51,7 +53,7 @@ export const pendingSwap: PendingSwap = {
51
53
  address: null,
52
54
  blockchain: 'OSMOSIS',
53
55
  decimals: 6,
54
- blockchainLogo: '',
56
+ blockchainLogo: 'https://api.rango.exchange/swappers/osmosis.png',
55
57
  usdPrice: 0.7192435454440882,
56
58
  },
57
59
  fromAmount: '1.000000',
@@ -68,8 +70,9 @@ export const pendingSwap: PendingSwap = {
68
70
  address: null,
69
71
  },
70
72
  expenseType: 'FROM_SOURCE_WALLET',
71
- amount: '0',
72
73
  name: 'Network Fee',
74
+ amount: '0',
75
+ price: null,
73
76
  },
74
77
  ],
75
78
  estimatedTimeInSeconds: 45,
@@ -145,6 +148,7 @@ export const pendingSwap: PendingSwap = {
145
148
  includesDestinationTx: false,
146
149
  maxRequiredSign: 1,
147
150
  warnings: [],
151
+ internalSwaps: null,
148
152
  },
149
153
  ],
150
154
  },
@@ -154,21 +158,25 @@ export const pendingSwap: PendingSwap = {
154
158
  id: 1,
155
159
  fromBlockchain: 'OSMOSIS',
156
160
  fromSymbol: 'JUNO',
161
+ swapperType: 'test',
157
162
  fromSymbolAddress:
158
163
  'ibc/46b44899322f3cd854d2d46deef881958467cdd4b3b10086da49296bbed94bed',
159
164
  fromDecimals: 6,
160
165
  fromAmountPrecision: null,
166
+ fromAmountRestrictionType: 'EXCLUSIVE',
167
+ estimatedTimeInSeconds: 5,
161
168
  fromAmountMinValue: null,
162
169
  fromAmountMaxValue: null,
170
+ fromUsdPrice: null,
163
171
  toBlockchainLogo: 'https://api.rango.exchange/swappers/osmosis.png',
164
172
  fromBlockchainLogo: 'https://api.rango.exchange/swappers/osmosis.png',
165
173
  toBlockchain: 'OSMOSIS',
166
174
  fromLogo: 'https://api.rango.exchange/tokens/COSMOS/JUNO.png',
167
175
  toSymbol: 'OSMO',
168
176
  toSymbolAddress: null,
169
- swapperType: 'DEX',
170
177
  toDecimals: 6,
171
178
  toLogo: 'https://api.rango.exchange/i/mJQPS2',
179
+ toUsdPrice: null,
172
180
  startTransactionTime: 1673164519916,
173
181
  swapperId: 'Osmosis',
174
182
  swapperLogo: 'https://api.rango.exchange/swappers/osmosis.png',
@@ -184,6 +192,13 @@ export const pendingSwap: PendingSwap = {
184
192
  description: null,
185
193
  },
186
194
  ],
195
+ starknetApprovalTransaction: null,
196
+ starknetTransaction: null,
197
+ tronApprovalTransaction: null,
198
+ tonTransaction: null,
199
+ tronTransaction: null,
200
+ feeInUsd: null,
201
+ executedTransactionTime: null,
187
202
  cosmosTransaction: {
188
203
  type: TransactionType.COSMOS,
189
204
  fromWalletAddress: 'osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl',
@@ -271,6 +286,7 @@ export const pendingSwap: PendingSwap = {
271
286
  transferTransaction: null,
272
287
  diagnosisUrl: null,
273
288
  internalSteps: null,
289
+ internalSwaps: null,
274
290
  },
275
291
  ],
276
292
  };
@@ -1,2 +1 @@
1
- export type { BestRouteWithFee } from './swaps';
2
1
  export type { ConnectedWallet } from './wallet';
@@ -1,45 +1,7 @@
1
1
  import type {
2
- BestRouteResponse,
3
2
  BlockchainValidationStatus,
4
- SimulationResult,
5
- SwapResult,
6
3
  WalletRequiredAssets,
7
4
  } from 'rango-sdk';
8
5
 
9
- export type SwapStatus = 'running' | 'failed' | 'success';
10
- export type MessageSeverity = 'error' | 'warning' | 'info' | 'success';
11
-
12
- export type StepStatus =
13
- | 'created'
14
- | 'running'
15
- | 'failed'
16
- | 'success'
17
- | 'waitingForApproval'
18
- | 'approved';
19
-
20
- export enum PendingSwapNetworkStatus {
21
- WaitingForConnectingWallet = 'waitingForConnectingWallet',
22
- WaitingForQueue = 'waitingForQueue',
23
- WaitingForNetworkChange = 'waitingForNetworkChange',
24
- NetworkChanged = 'networkChanged',
25
- }
26
-
27
- export type WalletTypeAndAddress = {
28
- walletType: string;
29
- address: string;
30
- };
31
- export type SwapSavedSettings = {
32
- slippage: string;
33
- disabledSwappersIds: string[];
34
- disabledSwappersGroups: string[];
35
- };
36
-
37
6
  export type SimulationAssetAndAmount = WalletRequiredAssets;
38
7
  export type SimulationValidationStatus = BlockchainValidationStatus;
39
- export type BestRouteType = BestRouteResponse;
40
-
41
- export type BestRouteWithFee = Omit<BestRouteResponse, 'result'> & {
42
- result: Omit<SimulationResult, 'swaps'> & {
43
- swaps: (SwapResult & { feeInUsd?: string })[];
44
- };
45
- };
@@ -1,2 +0,0 @@
1
- export type { PendingSwap } from '@rango-dev/queue-manager-rango-preset';
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/History/types.tsx"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC"}
@@ -1 +0,0 @@
1
- export type { PendingSwap } from '@rango-dev/queue-manager-rango-preset';