@rango-dev/widget-embedded 0.29.1-next.22 → 0.29.1-next.23
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
|
@@ -40,7 +40,6 @@ export function Inputs(props: PropTypes) {
|
|
|
40
40
|
} = useQuoteStore();
|
|
41
41
|
const { connectedWallets, getBalanceFor } = useWalletsStore();
|
|
42
42
|
const fromTokenBalance = fromToken ? getBalanceFor(fromToken) : null;
|
|
43
|
-
|
|
44
43
|
const fromTokenFormattedBalance =
|
|
45
44
|
formatBalance(fromTokenBalance)?.amount ?? '0';
|
|
46
45
|
|
|
@@ -69,6 +68,7 @@ export function Inputs(props: PropTypes) {
|
|
|
69
68
|
!inputUsdValue || !outputUsdValue || !outputUsdValue.gt(0)
|
|
70
69
|
? null
|
|
71
70
|
: getPriceImpact(inputUsdValue.toString(), outputUsdValue.toString());
|
|
71
|
+
|
|
72
72
|
return (
|
|
73
73
|
<Container>
|
|
74
74
|
<FromContainer>
|
package/src/store/quote.ts
CHANGED
|
@@ -168,11 +168,12 @@ export const useQuoteStore = createSelectors(
|
|
|
168
168
|
|
|
169
169
|
return {
|
|
170
170
|
fromBlockchain: chain,
|
|
171
|
+
inputUsdValue: new BigNumber(0),
|
|
171
172
|
...(state.fromToken && {
|
|
172
173
|
selectedQuote: null,
|
|
173
174
|
fromToken: null,
|
|
174
175
|
outputAmount: null,
|
|
175
|
-
outputUsdValue:
|
|
176
|
+
outputUsdValue: new BigNumber(0),
|
|
176
177
|
}),
|
|
177
178
|
};
|
|
178
179
|
});
|
|
@@ -203,7 +204,7 @@ export const useQuoteStore = createSelectors(
|
|
|
203
204
|
selectedQuote: null,
|
|
204
205
|
toToken: null,
|
|
205
206
|
outputAmount: null,
|
|
206
|
-
outputUsdValue:
|
|
207
|
+
outputUsdValue: new BigNumber(0),
|
|
207
208
|
}),
|
|
208
209
|
};
|
|
209
210
|
});
|
|
@@ -268,8 +269,10 @@ export const useQuoteStore = createSelectors(
|
|
|
268
269
|
set(() => ({
|
|
269
270
|
fromToken: null,
|
|
270
271
|
fromBlockchain: null,
|
|
272
|
+
outputUsdValue: new BigNumber(0),
|
|
273
|
+
inputUsdValue: new BigNumber(0),
|
|
274
|
+
inputAmount: '',
|
|
271
275
|
outputAmount: null,
|
|
272
|
-
outputUsdValue: null,
|
|
273
276
|
selectedQuote: null,
|
|
274
277
|
})),
|
|
275
278
|
resetToBlockchain: () =>
|
|
@@ -277,7 +280,7 @@ export const useQuoteStore = createSelectors(
|
|
|
277
280
|
toToken: null,
|
|
278
281
|
toBlockchain: null,
|
|
279
282
|
outputAmount: null,
|
|
280
|
-
outputUsdValue:
|
|
283
|
+
outputUsdValue: new BigNumber(0),
|
|
281
284
|
selectedQuote: null,
|
|
282
285
|
})),
|
|
283
286
|
setQuoteWalletConfirmed: (flag) =>
|