@rango-dev/widget-embedded 0.27.2-next.0 → 0.27.3-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.27.2-next.0",
3
+ "version": "0.27.3-next.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -31,7 +31,7 @@
31
31
  "@rango-dev/queue-manager-react": "^0.26.0",
32
32
  "@rango-dev/ui": "^0.33.1-next.0",
33
33
  "@rango-dev/wallets-react": "^0.18.1-next.0",
34
- "@rango-dev/wallets-shared": "^0.32.0",
34
+ "@rango-dev/wallets-shared": "^0.32.1-next.0",
35
35
  "bignumber.js": "^9.1.1",
36
36
  "copy-to-clipboard": "^3.3.3",
37
37
  "dayjs": "^1.11.7",
@@ -52,4 +52,4 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  }
55
- }
55
+ }
@@ -63,7 +63,25 @@ export const stepsDetailsStyles = css({
63
63
  });
64
64
  export const AllRoutesButton = styled(Button, {
65
65
  backgroundColor: 'transparent',
66
- border: '1px solid $secondary',
66
+ border: '1px solid $secondary600',
67
+ [`.${darkTheme} &`]: {
68
+ border: '1px solid $secondary',
69
+ },
70
+ transition: 'background-color 0.3s ease',
71
+ '&:hover': {
72
+ backgroundColor: '$secondary600',
73
+ [`.${darkTheme} &`]: {
74
+ backgroundColor: '$secondary',
75
+ },
76
+ '.allRoutesLabel': {
77
+ $$color: '$colors$background',
78
+ [`.${darkTheme} &`]: {
79
+ $$color: '$colors$foreground',
80
+ },
81
+ color: '$$color',
82
+ transition: 'color 0.3s ease',
83
+ },
84
+ },
67
85
  });
68
86
  export const SummaryContainer = styled('div', {
69
87
  borderRadius: '$xm',
@@ -381,8 +381,18 @@ export function Quote(props: QuoteProps) {
381
381
  }}
382
382
  size="xxsmall"
383
383
  type="secondary"
384
- variant="default">
385
- <Typography color="secondary" variant="label" size="medium">
384
+ variant="default"
385
+ css={{
386
+ paddingLeft: '$10',
387
+ paddingRight: '$10',
388
+ paddingTop: '$5',
389
+ paddingBottom: '$5',
390
+ }}>
391
+ <Typography
392
+ color="secondary"
393
+ variant="body"
394
+ size="xsmall"
395
+ className="allRoutesLabel">
386
396
  {i18n.t('See All Routes')}
387
397
  </Typography>
388
398
  </AllRoutesButton>
@@ -89,14 +89,6 @@ export function useConfirmSwap(): ConfirmSwap {
89
89
  slippage: userSlippage.toString(),
90
90
  disabledSwappersGroups: disabledLiquiditySources,
91
91
  };
92
- const swap = calculatePendingSwap(
93
- inputAmount.toString(),
94
- result,
95
- getWalletsForNewSwap(selectedWallets),
96
- swapSettings,
97
- false,
98
- { blockchains, tokens }
99
- );
100
92
 
101
93
  const confirmSwapWarnings = generateWarnings(
102
94
  initialQuote ?? undefined,
@@ -114,6 +106,17 @@ export function useConfirmSwap(): ConfirmSwap {
114
106
  }
115
107
  resetAlerts();
116
108
 
109
+ const proceedAnyway = !!confirmSwapWarnings.balance;
110
+
111
+ const swap = calculatePendingSwap(
112
+ inputAmount.toString(),
113
+ result,
114
+ getWalletsForNewSwap(selectedWallets),
115
+ swapSettings,
116
+ proceedAnyway ? false : true,
117
+ { blockchains, tokens }
118
+ );
119
+
117
120
  return {
118
121
  quote: currentQuote,
119
122
  swap,
@@ -271,7 +271,7 @@ describe('usePrepareBlockchainList', () => {
271
271
  ]);
272
272
  });
273
273
 
274
- it.only('Last item of the main list should be moved to front if it selected again.', () => {
274
+ it('Last item of the main list should be moved to front if it selected again.', () => {
275
275
  const listLimit = 10;
276
276
  const preferredBlockchains = ['AVAX_CCHAIN', 'BTC'];
277
277
  const expected = [