@rango-dev/widget-embedded 0.29.1-next.21 → 0.29.1-next.22

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.29.1-next.21",
3
+ "version": "0.29.1-next.22",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -30,7 +30,7 @@
30
30
  "@rango-dev/queue-manager-rango-preset": "^0.34.1-next.8",
31
31
  "@rango-dev/queue-manager-react": "^0.26.0",
32
32
  "@rango-dev/signer-solana": "^0.29.1-next.1",
33
- "@rango-dev/ui": "^0.35.1-next.11",
33
+ "@rango-dev/ui": "^0.35.1-next.12",
34
34
  "@rango-dev/wallets-react": "^0.20.1-next.6",
35
35
  "@rango-dev/wallets-shared": "^0.34.1-next.6",
36
36
  "bignumber.js": "^9.1.1",
@@ -155,16 +155,15 @@ export function Quote(props: QuoteProps) {
155
155
 
156
156
  return {
157
157
  swapper: {
158
- displayName: getSwapperDisplayName(swap.swapperId, swappers),
158
+ displayName: getSwapperDisplayName(swap.swapperId, swappers) ?? '',
159
159
  image: swap.swapperLogo,
160
160
  },
161
161
  from: {
162
162
  token: { displayName: swap.from.symbol, image: swap.from.logo },
163
163
  chain: {
164
- displayName: getBlockchainShortNameFor(
165
- swap.from.blockchain,
166
- blockchains
167
- ),
164
+ displayName:
165
+ getBlockchainShortNameFor(swap.from.blockchain, blockchains) ??
166
+ '',
168
167
  image: swap.from.blockchainLogo,
169
168
  },
170
169
  price: {
@@ -194,10 +193,8 @@ export function Quote(props: QuoteProps) {
194
193
  to: {
195
194
  token: { displayName: swap.to.symbol, image: swap.to.logo },
196
195
  chain: {
197
- displayName: getBlockchainShortNameFor(
198
- swap.to.blockchain,
199
- blockchains
200
- ),
196
+ displayName:
197
+ getBlockchainShortNameFor(swap.to.blockchain, blockchains) || '',
201
198
  image: swap.to.blockchainLogo,
202
199
  },
203
200
  price: {
@@ -1,6 +1,6 @@
1
1
  import type { GetStep } from '../SwapDetailsAlerts';
2
2
  import type { Step, StepDetailsProps } from '@rango-dev/ui';
3
- import type { PendingSwapStep } from 'rango-types';
3
+ import type { PendingSwapStep, SwapperType } from 'rango-types';
4
4
 
5
5
  import React from 'react';
6
6
 
@@ -46,7 +46,7 @@ export const getSteps = ({
46
46
  TOKEN_AMOUNT_MIN_DECIMALS,
47
47
  TOKEN_AMOUNT_MAX_DECIMALS
48
48
  ),
49
- realValue: amountToConvert,
49
+ realValue: amountToConvert ?? '',
50
50
  },
51
51
  },
52
52
  to: {
@@ -63,13 +63,13 @@ export const getSteps = ({
63
63
  TOKEN_AMOUNT_MAX_DECIMALS
64
64
  ),
65
65
  realValue:
66
- step.outputAmount || step.expectedOutputAmountHumanReadable,
66
+ step.outputAmount || step.expectedOutputAmountHumanReadable || '',
67
67
  },
68
68
  },
69
69
  swapper: {
70
- displayName: getSwapperDisplayName(step.swapperId, swappers),
70
+ displayName: getSwapperDisplayName(step.swapperId, swappers) ?? '',
71
71
  image: step.swapperLogo ?? '',
72
- type: step.swapperType,
72
+ type: step.swapperType as SwapperType,
73
73
  },
74
74
  internalSwaps: step.internalSwaps
75
75
  ? step.internalSwaps.map((internalSwap) => {
@@ -95,12 +95,10 @@ export const getSteps = ({
95
95
  },
96
96
  },
97
97
  swapper: {
98
- displayName: getSwapperDisplayName(
99
- internalSwap.swapperId,
100
- swappers
101
- ),
98
+ displayName:
99
+ getSwapperDisplayName(internalSwap.swapperId, swappers) ?? '',
102
100
  image: internalSwap.swapperLogo ?? '',
103
- type: internalSwap.swapperType,
101
+ type: internalSwap.swapperType as SwapperType,
104
102
  },
105
103
  };
106
104
  })
@@ -385,7 +385,7 @@ export function SwapDetails(props: SwapDetailsProps) {
385
385
  ),
386
386
  usdValue: outputUsdValue,
387
387
  realUsdValue: realOutputUsdValue,
388
- realValue: outputAmount,
388
+ realValue: outputAmount || '',
389
389
  },
390
390
  token: {
391
391
  displayName: steps[numberOfSteps - 1].to.token.displayName,