@rango-dev/widget-embedded 0.36.1-next.2 → 0.36.1-next.3
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/dist/components/Quote/Quote.d.ts.map +1 -1
- package/dist/components/Quote/Quote.types.d.ts +1 -0
- package/dist/components/Quote/Quote.types.d.ts.map +1 -1
- package/dist/components/Quote/QuoteCostDetails.d.ts.map +1 -1
- package/dist/components/Quote/QuoteCostDetails.styles.d.ts.map +1 -1
- package/dist/containers/ExpandedQuotes/ExpandedQuotes.styles.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/widget-embedded.build.json +1 -1
- package/package.json +3 -3
- package/src/components/Quote/Quote.tsx +11 -1
- package/src/components/Quote/Quote.types.ts +1 -0
- package/src/components/Quote/QuoteCostDetails.styles.ts +0 -1
- package/src/components/Quote/QuoteCostDetails.tsx +21 -4
- package/src/containers/ExpandedQuotes/ExpandedQuotes.styles.ts +1 -0
- package/src/containers/ExpandedQuotes/ExpandedQuotes.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.36.1-next.
|
|
3
|
+
"version": "0.36.1-next.3",
|
|
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.40.1-next.1",
|
|
31
31
|
"@rango-dev/queue-manager-react": "^0.27.0",
|
|
32
32
|
"@rango-dev/signer-solana": "^0.35.0",
|
|
33
|
-
"@rango-dev/ui": "^0.42.1-next.
|
|
33
|
+
"@rango-dev/ui": "^0.42.1-next.2",
|
|
34
34
|
"@rango-dev/wallets-core": "^0.40.1-next.1",
|
|
35
35
|
"@rango-dev/wallets-react": "^0.26.1-next.1",
|
|
36
36
|
"@rango-dev/wallets-shared": "^0.40.1-next.1",
|
|
@@ -54,4 +54,4 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
}
|
|
57
|
-
}
|
|
57
|
+
}
|
|
@@ -329,7 +329,17 @@ export function Quote(props: QuoteProps) {
|
|
|
329
329
|
tooltipContainer={getExpanded()}
|
|
330
330
|
steps={steps}
|
|
331
331
|
tags={sortedQuoteTags}
|
|
332
|
-
|
|
332
|
+
quoteCost={
|
|
333
|
+
<QuoteCostDetails
|
|
334
|
+
quote={quote}
|
|
335
|
+
fullExpandedMode
|
|
336
|
+
time={totalTime}
|
|
337
|
+
fee={fee}
|
|
338
|
+
feeWarning={feeWarning}
|
|
339
|
+
showModalFee={showModalFee}
|
|
340
|
+
steps={numberOfSteps}
|
|
341
|
+
/>
|
|
342
|
+
}
|
|
333
343
|
percentageChange={percentageChange}
|
|
334
344
|
warningLevel={priceImpactWarningLevel}
|
|
335
345
|
outputPrice={{
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
USD_VALUE_MAX_DECIMALS,
|
|
22
22
|
USD_VALUE_MIN_DECIMALS,
|
|
23
23
|
} from '../../constants/routing';
|
|
24
|
-
import { getContainer } from '../../utils/common';
|
|
24
|
+
import { getContainer, getExpanded } from '../../utils/common';
|
|
25
25
|
import { numberToString } from '../../utils/numbers';
|
|
26
26
|
import { getFeesGroup, getTotalFeesInUsd, getUsdFee } from '../../utils/swap';
|
|
27
27
|
import { WatermarkedModal } from '../common/WatermarkedModal';
|
|
@@ -57,9 +57,17 @@ const NonPayableFee = (props: { fee: BigNumber; label: string }) => {
|
|
|
57
57
|
export function QuoteCostDetails(props: QuoteCostDetailsProps) {
|
|
58
58
|
const [open, setOpen] = useState<boolean>(false);
|
|
59
59
|
const [openCollapse, setOpenCollapse] = useState<boolean>(false);
|
|
60
|
-
const {
|
|
60
|
+
const {
|
|
61
|
+
steps,
|
|
62
|
+
quote,
|
|
63
|
+
fee,
|
|
64
|
+
time,
|
|
65
|
+
feeWarning,
|
|
66
|
+
showModalFee,
|
|
67
|
+
fullExpandedMode = false,
|
|
68
|
+
} = props;
|
|
61
69
|
const swaps = quote?.swaps ?? [];
|
|
62
|
-
const container = getContainer();
|
|
70
|
+
const container = fullExpandedMode ? getExpanded() : getContainer();
|
|
63
71
|
|
|
64
72
|
const feesGroup = getFeesGroup(swaps);
|
|
65
73
|
|
|
@@ -85,8 +93,17 @@ export function QuoteCostDetails(props: QuoteCostDetailsProps) {
|
|
|
85
93
|
<WatermarkedModal
|
|
86
94
|
container={container}
|
|
87
95
|
open={open}
|
|
96
|
+
anchor={fullExpandedMode ? 'center' : 'bottom'}
|
|
97
|
+
styles={{
|
|
98
|
+
container: {
|
|
99
|
+
maxWidth: fullExpandedMode ? '484px' : 'unset',
|
|
100
|
+
},
|
|
101
|
+
}}
|
|
88
102
|
header={
|
|
89
|
-
<ModalHeader
|
|
103
|
+
<ModalHeader
|
|
104
|
+
style={{
|
|
105
|
+
textAlign: fullExpandedMode ? 'left' : 'center',
|
|
106
|
+
}}>
|
|
90
107
|
<Typography variant="title" size="medium">
|
|
91
108
|
{i18n.t('Gas & Fee Explanation')}
|
|
92
109
|
</Typography>
|