@rango-dev/widget-embedded 0.1.19 → 0.1.20-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/dist/QueueManager.d.ts.map +1 -1
- package/dist/components/Footer.d.ts +111 -1
- package/dist/components/Footer.d.ts.map +1 -1
- package/dist/components/Layout.d.ts.map +1 -1
- package/dist/components/RoutesOverview.d.ts +111 -1
- package/dist/components/RoutesOverview.d.ts.map +1 -1
- package/dist/components/SwapDetailsPlaceholder.d.ts +111 -1
- package/dist/components/SwapDetailsPlaceholder.d.ts.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/utils/wallets.d.ts +2 -2
- package/dist/utils/wallets.d.ts.map +1 -1
- package/dist/widget-embedded.cjs.development.js +43 -40
- package/dist/widget-embedded.cjs.development.js.map +1 -1
- package/dist/widget-embedded.cjs.production.min.js +43 -40
- package/dist/widget-embedded.cjs.production.min.js.map +1 -1
- package/dist/widget-embedded.esm.js +45 -37
- package/dist/widget-embedded.esm.js.map +1 -1
- package/package.json +12 -10
- package/src/QueueManager.tsx +4 -0
- package/src/components/Layout.tsx +23 -17
- package/src/components/RoutesOverview.tsx +2 -2
- package/src/components/TokenInfo.tsx +4 -4
- package/src/components/TokenPreview.tsx +3 -3
- package/src/components/warnings/BalanceErrors.tsx +2 -2
- package/src/components/warnings/MinRequiredSlippage.tsx +2 -2
- package/src/index.tsx +1 -7
- package/src/pages/ConfirmSwapPage.tsx +14 -12
- package/src/pages/SwapDetailsPage.tsx +1 -1
- package/src/pages/WalletsPage.tsx +6 -2
- package/src/utils/wallets.ts +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueueManager.d.ts","sourceRoot":"","sources":["src/QueueManager.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAoB1D,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"QueueManager.d.ts","sourceRoot":"","sources":["src/QueueManager.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAoB1D,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,CAAC,EAAE,CAAC,eA2GjD;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,2 +1,112 @@
|
|
|
1
|
-
export declare const Footer: any
|
|
1
|
+
export declare const Footer: import("@stitches/react/types/styled-component").StyledComponent<string, any, {
|
|
2
|
+
sm: string;
|
|
3
|
+
md: string;
|
|
4
|
+
lg: string;
|
|
5
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
6
|
+
sm: string;
|
|
7
|
+
md: string;
|
|
8
|
+
lg: string;
|
|
9
|
+
}, {
|
|
10
|
+
colors: {
|
|
11
|
+
primary: string;
|
|
12
|
+
primary100: string;
|
|
13
|
+
primary200: string;
|
|
14
|
+
primary300: string;
|
|
15
|
+
primary400: string;
|
|
16
|
+
primary500: string;
|
|
17
|
+
primary600: string;
|
|
18
|
+
primary700: string;
|
|
19
|
+
primary800: string;
|
|
20
|
+
primary900: string;
|
|
21
|
+
surface: string;
|
|
22
|
+
neutral100: string;
|
|
23
|
+
neutral200: string;
|
|
24
|
+
neutral300: string;
|
|
25
|
+
neutral400: string;
|
|
26
|
+
neutral500: string;
|
|
27
|
+
neutral600: string;
|
|
28
|
+
neutral700: string;
|
|
29
|
+
neutral800: string;
|
|
30
|
+
neutral900: string;
|
|
31
|
+
background: string;
|
|
32
|
+
foreground: string;
|
|
33
|
+
success: string;
|
|
34
|
+
success100: string;
|
|
35
|
+
success300: string;
|
|
36
|
+
success500: string;
|
|
37
|
+
success700: string;
|
|
38
|
+
warning: string;
|
|
39
|
+
warning100: string;
|
|
40
|
+
warning300: string;
|
|
41
|
+
warning500: string;
|
|
42
|
+
warning700: string;
|
|
43
|
+
error: string;
|
|
44
|
+
error100: string;
|
|
45
|
+
error300: string;
|
|
46
|
+
error500: string;
|
|
47
|
+
error700: string;
|
|
48
|
+
white: string;
|
|
49
|
+
};
|
|
50
|
+
space: {
|
|
51
|
+
2: string;
|
|
52
|
+
4: string;
|
|
53
|
+
6: string;
|
|
54
|
+
8: string;
|
|
55
|
+
10: string;
|
|
56
|
+
12: string;
|
|
57
|
+
16: string;
|
|
58
|
+
20: string;
|
|
59
|
+
24: string;
|
|
60
|
+
28: string;
|
|
61
|
+
30: string;
|
|
62
|
+
32: string;
|
|
63
|
+
};
|
|
64
|
+
fontSizes: {
|
|
65
|
+
10: string;
|
|
66
|
+
12: string;
|
|
67
|
+
14: string;
|
|
68
|
+
16: string;
|
|
69
|
+
18: string;
|
|
70
|
+
20: string;
|
|
71
|
+
24: string;
|
|
72
|
+
32: string;
|
|
73
|
+
36: string;
|
|
74
|
+
40: string;
|
|
75
|
+
48: string;
|
|
76
|
+
};
|
|
77
|
+
fonts: {};
|
|
78
|
+
fontWeights: {
|
|
79
|
+
400: string;
|
|
80
|
+
500: string;
|
|
81
|
+
600: string;
|
|
82
|
+
700: string;
|
|
83
|
+
};
|
|
84
|
+
lineHeights: {};
|
|
85
|
+
letterSpacings: {};
|
|
86
|
+
sizes: {
|
|
87
|
+
4: string;
|
|
88
|
+
6: string;
|
|
89
|
+
8: string;
|
|
90
|
+
12: string;
|
|
91
|
+
16: string;
|
|
92
|
+
20: string;
|
|
93
|
+
24: string;
|
|
94
|
+
28: string;
|
|
95
|
+
32: string;
|
|
96
|
+
36: string;
|
|
97
|
+
40: string;
|
|
98
|
+
48: string;
|
|
99
|
+
};
|
|
100
|
+
borderWidths: {};
|
|
101
|
+
borderStyles: {};
|
|
102
|
+
radii: {
|
|
103
|
+
5: string;
|
|
104
|
+
10: string;
|
|
105
|
+
};
|
|
106
|
+
shadows: {
|
|
107
|
+
s: string;
|
|
108
|
+
};
|
|
109
|
+
zIndices: {};
|
|
110
|
+
transitions: {};
|
|
111
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
|
|
2
112
|
//# sourceMappingURL=Footer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../src/components/Footer.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../src/components/Footer.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAKjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../src/components/Layout.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../src/components/Layout.tsx"],"names":[],"mappings":";AAqBA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA4BxC,oBAAY,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,WAAW,eAgG7C"}
|
|
@@ -1,6 +1,116 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BestRouteResponse } from 'rango-sdk';
|
|
3
|
-
export declare const Container: any
|
|
3
|
+
export declare const Container: import("@stitches/react/types/styled-component").StyledComponent<string, any, {
|
|
4
|
+
sm: string;
|
|
5
|
+
md: string;
|
|
6
|
+
lg: string;
|
|
7
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
8
|
+
sm: string;
|
|
9
|
+
md: string;
|
|
10
|
+
lg: string;
|
|
11
|
+
}, {
|
|
12
|
+
colors: {
|
|
13
|
+
primary: string;
|
|
14
|
+
primary100: string;
|
|
15
|
+
primary200: string;
|
|
16
|
+
primary300: string;
|
|
17
|
+
primary400: string;
|
|
18
|
+
primary500: string;
|
|
19
|
+
primary600: string;
|
|
20
|
+
primary700: string;
|
|
21
|
+
primary800: string;
|
|
22
|
+
primary900: string;
|
|
23
|
+
surface: string;
|
|
24
|
+
neutral100: string;
|
|
25
|
+
neutral200: string;
|
|
26
|
+
neutral300: string;
|
|
27
|
+
neutral400: string;
|
|
28
|
+
neutral500: string;
|
|
29
|
+
neutral600: string;
|
|
30
|
+
neutral700: string;
|
|
31
|
+
neutral800: string;
|
|
32
|
+
neutral900: string;
|
|
33
|
+
background: string;
|
|
34
|
+
foreground: string;
|
|
35
|
+
success: string;
|
|
36
|
+
success100: string;
|
|
37
|
+
success300: string;
|
|
38
|
+
success500: string;
|
|
39
|
+
success700: string;
|
|
40
|
+
warning: string;
|
|
41
|
+
warning100: string;
|
|
42
|
+
warning300: string;
|
|
43
|
+
warning500: string;
|
|
44
|
+
warning700: string;
|
|
45
|
+
error: string;
|
|
46
|
+
error100: string;
|
|
47
|
+
error300: string;
|
|
48
|
+
error500: string;
|
|
49
|
+
error700: string;
|
|
50
|
+
white: string;
|
|
51
|
+
};
|
|
52
|
+
space: {
|
|
53
|
+
2: string;
|
|
54
|
+
4: string;
|
|
55
|
+
6: string;
|
|
56
|
+
8: string;
|
|
57
|
+
10: string;
|
|
58
|
+
12: string;
|
|
59
|
+
16: string;
|
|
60
|
+
20: string;
|
|
61
|
+
24: string;
|
|
62
|
+
28: string;
|
|
63
|
+
30: string;
|
|
64
|
+
32: string;
|
|
65
|
+
};
|
|
66
|
+
fontSizes: {
|
|
67
|
+
10: string;
|
|
68
|
+
12: string;
|
|
69
|
+
14: string;
|
|
70
|
+
16: string;
|
|
71
|
+
18: string;
|
|
72
|
+
20: string;
|
|
73
|
+
24: string;
|
|
74
|
+
32: string;
|
|
75
|
+
36: string;
|
|
76
|
+
40: string;
|
|
77
|
+
48: string;
|
|
78
|
+
};
|
|
79
|
+
fonts: {};
|
|
80
|
+
fontWeights: {
|
|
81
|
+
400: string;
|
|
82
|
+
500: string;
|
|
83
|
+
600: string;
|
|
84
|
+
700: string;
|
|
85
|
+
};
|
|
86
|
+
lineHeights: {};
|
|
87
|
+
letterSpacings: {};
|
|
88
|
+
sizes: {
|
|
89
|
+
4: string;
|
|
90
|
+
6: string;
|
|
91
|
+
8: string;
|
|
92
|
+
12: string;
|
|
93
|
+
16: string;
|
|
94
|
+
20: string;
|
|
95
|
+
24: string;
|
|
96
|
+
28: string;
|
|
97
|
+
32: string;
|
|
98
|
+
36: string;
|
|
99
|
+
40: string;
|
|
100
|
+
48: string;
|
|
101
|
+
};
|
|
102
|
+
borderWidths: {};
|
|
103
|
+
borderStyles: {};
|
|
104
|
+
radii: {
|
|
105
|
+
5: string;
|
|
106
|
+
10: string;
|
|
107
|
+
};
|
|
108
|
+
shadows: {
|
|
109
|
+
s: string;
|
|
110
|
+
};
|
|
111
|
+
zIndices: {};
|
|
112
|
+
transitions: {};
|
|
113
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
|
|
4
114
|
interface PropTypes {
|
|
5
115
|
routes: BestRouteResponse | null;
|
|
6
116
|
totalFee?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoutesOverview.d.ts","sourceRoot":"","sources":["../src/components/RoutesOverview.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"RoutesOverview.d.ts","sourceRoot":"","sources":["../src/components/RoutesOverview.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAkBpB,CAAC;AAEH,UAAU,SAAS;IACjB,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,iBAAS,cAAc,CAAC,KAAK,EAAE,SAAS,sBA0BvC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1,5 +1,115 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const LoaderContainer: any
|
|
2
|
+
export declare const LoaderContainer: import("@stitches/react/types/styled-component").StyledComponent<string, any, {
|
|
3
|
+
sm: string;
|
|
4
|
+
md: string;
|
|
5
|
+
lg: string;
|
|
6
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
7
|
+
sm: string;
|
|
8
|
+
md: string;
|
|
9
|
+
lg: string;
|
|
10
|
+
}, {
|
|
11
|
+
colors: {
|
|
12
|
+
primary: string;
|
|
13
|
+
primary100: string;
|
|
14
|
+
primary200: string;
|
|
15
|
+
primary300: string;
|
|
16
|
+
primary400: string;
|
|
17
|
+
primary500: string;
|
|
18
|
+
primary600: string;
|
|
19
|
+
primary700: string;
|
|
20
|
+
primary800: string;
|
|
21
|
+
primary900: string;
|
|
22
|
+
surface: string;
|
|
23
|
+
neutral100: string;
|
|
24
|
+
neutral200: string;
|
|
25
|
+
neutral300: string;
|
|
26
|
+
neutral400: string;
|
|
27
|
+
neutral500: string;
|
|
28
|
+
neutral600: string;
|
|
29
|
+
neutral700: string;
|
|
30
|
+
neutral800: string;
|
|
31
|
+
neutral900: string;
|
|
32
|
+
background: string;
|
|
33
|
+
foreground: string;
|
|
34
|
+
success: string;
|
|
35
|
+
success100: string;
|
|
36
|
+
success300: string;
|
|
37
|
+
success500: string;
|
|
38
|
+
success700: string;
|
|
39
|
+
warning: string;
|
|
40
|
+
warning100: string;
|
|
41
|
+
warning300: string;
|
|
42
|
+
warning500: string;
|
|
43
|
+
warning700: string;
|
|
44
|
+
error: string;
|
|
45
|
+
error100: string;
|
|
46
|
+
error300: string;
|
|
47
|
+
error500: string;
|
|
48
|
+
error700: string;
|
|
49
|
+
white: string;
|
|
50
|
+
};
|
|
51
|
+
space: {
|
|
52
|
+
2: string;
|
|
53
|
+
4: string;
|
|
54
|
+
6: string;
|
|
55
|
+
8: string;
|
|
56
|
+
10: string;
|
|
57
|
+
12: string;
|
|
58
|
+
16: string;
|
|
59
|
+
20: string;
|
|
60
|
+
24: string;
|
|
61
|
+
28: string;
|
|
62
|
+
30: string;
|
|
63
|
+
32: string;
|
|
64
|
+
};
|
|
65
|
+
fontSizes: {
|
|
66
|
+
10: string;
|
|
67
|
+
12: string;
|
|
68
|
+
14: string;
|
|
69
|
+
16: string;
|
|
70
|
+
18: string;
|
|
71
|
+
20: string;
|
|
72
|
+
24: string;
|
|
73
|
+
32: string;
|
|
74
|
+
36: string;
|
|
75
|
+
40: string;
|
|
76
|
+
48: string;
|
|
77
|
+
};
|
|
78
|
+
fonts: {};
|
|
79
|
+
fontWeights: {
|
|
80
|
+
400: string;
|
|
81
|
+
500: string;
|
|
82
|
+
600: string;
|
|
83
|
+
700: string;
|
|
84
|
+
};
|
|
85
|
+
lineHeights: {};
|
|
86
|
+
letterSpacings: {};
|
|
87
|
+
sizes: {
|
|
88
|
+
4: string;
|
|
89
|
+
6: string;
|
|
90
|
+
8: string;
|
|
91
|
+
12: string;
|
|
92
|
+
16: string;
|
|
93
|
+
20: string;
|
|
94
|
+
24: string;
|
|
95
|
+
28: string;
|
|
96
|
+
32: string;
|
|
97
|
+
36: string;
|
|
98
|
+
40: string;
|
|
99
|
+
48: string;
|
|
100
|
+
};
|
|
101
|
+
borderWidths: {};
|
|
102
|
+
borderStyles: {};
|
|
103
|
+
radii: {
|
|
104
|
+
5: string;
|
|
105
|
+
10: string;
|
|
106
|
+
};
|
|
107
|
+
shadows: {
|
|
108
|
+
s: string;
|
|
109
|
+
};
|
|
110
|
+
zIndices: {};
|
|
111
|
+
transitions: {};
|
|
112
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
|
|
3
113
|
interface PropTypes {
|
|
4
114
|
requestId: string;
|
|
5
115
|
loading: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapDetailsPlaceholder.d.ts","sourceRoot":"","sources":["../src/components/SwapDetailsPlaceholder.tsx"],"names":[],"mappings":";AAKA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"SwapDetailsPlaceholder.d.ts","sourceRoot":"","sources":["../src/components/SwapDetailsPlaceholder.tsx"],"names":[],"mappings":";AAKA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAM1B,CAAC;AAEH,UAAU,SAAS;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,eAmBtD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WalletType } from '@rango-dev/wallets-shared';
|
|
3
2
|
import { WidgetTheme, WidgetConfig, WidgetColors, BlockchainAndTokenConfig } from './types';
|
|
4
3
|
import './i18n';
|
|
5
|
-
export { WidgetConfig,
|
|
4
|
+
export { WidgetConfig, WidgetTheme, WidgetColors, BlockchainAndTokenConfig };
|
|
6
5
|
export declare type WidgetProps = {
|
|
7
6
|
config?: WidgetConfig;
|
|
8
7
|
};
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAgB5D,OAAO,EACL,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,OAAO,QAAQ,CAAC;AAMhB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,wBAAwB,EAAE,CAAC;AAE7E,oBAAY,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAqGxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":";AAiCA,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":";AAiCA,wBAAgB,eAAe,gBAyL9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../src/pages/WalletsPage.tsx"],"names":[],"mappings":";AAUA,OAAO,
|
|
1
|
+
{"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../src/pages/WalletsPage.tsx"],"names":[],"mappings":";AAUA,OAAO,EACL,UAAU,EAGX,MAAM,2BAA2B,CAAC;AAWnC,UAAU,SAAS;IACjB,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC;CACvB;AAsBD,wBAAgB,WAAW,CAAC,EAAE,gBAAgB,EAAE,YAAY,EAAE,EAAE,SAAS,eA2FxE"}
|
package/dist/utils/wallets.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Network, WalletState, WalletType, WalletInfo } from '@rango-dev/wallets-shared';
|
|
1
|
+
import { Network, WalletState, WalletType, WalletInfo, WalletTypes } from '@rango-dev/wallets-shared';
|
|
2
2
|
import { WalletInfo as ModalWalletInfo, WalletState as WalletStatus, SelectableWallet } from '@rango-dev/ui';
|
|
3
3
|
import { BestRouteResponse, BlockchainMeta, Token, WalletDetail } from 'rango-sdk';
|
|
4
4
|
import { ConnectedWallet, TokenBalance } from '../store/wallets';
|
|
5
5
|
import { TokenWithBalance } from '../pages/SelectTokenPage';
|
|
6
6
|
import { Wallet } from '../types';
|
|
7
7
|
export declare function getStateWallet(state: WalletState): WalletStatus;
|
|
8
|
-
export declare const excludedWallets:
|
|
8
|
+
export declare const excludedWallets: WalletTypes[];
|
|
9
9
|
export declare function getlistWallet(getState: (type: WalletType) => WalletState, getWalletInfo: (type: WalletType) => WalletInfo, list: WalletType[]): ModalWalletInfo[];
|
|
10
10
|
export declare function walletAndSupportedChainsNames(supportedChains: BlockchainMeta[]): Network[] | null;
|
|
11
11
|
export declare function prepareAccountsForWalletStore(wallet: WalletType, accounts: string[], evmBasedChains: string[], supportedChainNames: Network[] | null): Wallet[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../src/utils/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,WAAW,EACX,UAAU,EAEV,UAAU,
|
|
1
|
+
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../src/utils/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,WAAW,EACX,UAAU,EAEV,UAAU,EACV,WAAW,EACZ,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,UAAU,IAAI,eAAe,EAC7B,WAAW,IAAI,YAAY,EAC3B,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,KAAK,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,CACrC,OAAO,EAAE,eAAe,EAAE,GACzB,eAAe,EAAE,CAcnB"}
|
|
@@ -300,7 +300,7 @@ function getStateWallet(state) {
|
|
|
300
300
|
return ui.WalletState.DISCONNECTED;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
const excludedWallets = [walletsShared.
|
|
303
|
+
const excludedWallets = [walletsShared.WalletTypes.LEAP];
|
|
304
304
|
function getlistWallet(getState, getWalletInfo, list) {
|
|
305
305
|
return list.filter(wallet => !excludedWallets.includes(wallet)).map(type => {
|
|
306
306
|
const {
|
|
@@ -483,7 +483,9 @@ const isExperimentalChain = (blockchains, wallet) => {
|
|
|
483
483
|
return cosmosExperimentalChainInfo && !!cosmosExperimentalChainInfo[wallet];
|
|
484
484
|
};
|
|
485
485
|
const getKeplrCompatibleConnectedWallets = selectableWallets => {
|
|
486
|
-
const connectedWalletTypes = new Set(selectableWallets.map(
|
|
486
|
+
const connectedWalletTypes = new Set(selectableWallets.map(wallet => {
|
|
487
|
+
return wallet.walletType;
|
|
488
|
+
}));
|
|
487
489
|
return walletsShared.KEPLR_COMPATIBLE_WALLETS.filter(compatibleWallet => connectedWalletTypes.has(compatibleWallet));
|
|
488
490
|
};
|
|
489
491
|
function getTokensWithBalance(tokens, connectedWallets) {
|
|
@@ -1447,8 +1449,9 @@ function TokenPreview(props) {
|
|
|
1447
1449
|
suffix: ItemSuffix,
|
|
1448
1450
|
align: "start",
|
|
1449
1451
|
size: "large"
|
|
1450
|
-
}, loadingStatus === 'success' && chain ? chain.displayName : t('Chain')), React__default.createElement(ui.
|
|
1451
|
-
size: 12
|
|
1452
|
+
}, loadingStatus === 'success' && chain ? chain.displayName : t('Chain')), React__default.createElement(ui.Divider, {
|
|
1453
|
+
size: 12,
|
|
1454
|
+
direction: "horizontal"
|
|
1452
1455
|
}), React__default.createElement(ui.Button, {
|
|
1453
1456
|
className: "selectors",
|
|
1454
1457
|
variant: "outlined",
|
|
@@ -1460,8 +1463,9 @@ function TokenPreview(props) {
|
|
|
1460
1463
|
suffix: ItemSuffix,
|
|
1461
1464
|
size: "large",
|
|
1462
1465
|
align: "start"
|
|
1463
|
-
}, loadingStatus === 'success' && token ? token.symbol : t('Token')), React__default.createElement(ui.
|
|
1464
|
-
size: 12
|
|
1466
|
+
}, loadingStatus === 'success' && token ? token.symbol : t('Token')), React__default.createElement(ui.Divider, {
|
|
1467
|
+
size: 12,
|
|
1468
|
+
direction: "horizontal"
|
|
1465
1469
|
}), React__default.createElement("div", {
|
|
1466
1470
|
className: "amount"
|
|
1467
1471
|
}, React__default.createElement(OutputContainer, null, React__default.createElement(ui.Typography, {
|
|
@@ -1507,8 +1511,9 @@ function RoutesOverview(props) {
|
|
|
1507
1511
|
className: "fee"
|
|
1508
1512
|
}, React__default.createElement(ui.GasIcon, {
|
|
1509
1513
|
size: 12
|
|
1510
|
-
}), React__default.createElement(ui.
|
|
1511
|
-
size: 4
|
|
1514
|
+
}), React__default.createElement(ui.Divider, {
|
|
1515
|
+
size: 4,
|
|
1516
|
+
direction: "horizontal"
|
|
1512
1517
|
}), "$", props.totalFee) : null);
|
|
1513
1518
|
}
|
|
1514
1519
|
|
|
@@ -1679,9 +1684,8 @@ function MinRequiredSlippage(_ref) {
|
|
|
1679
1684
|
} = _ref;
|
|
1680
1685
|
return React__default.createElement(StyledMessage, {
|
|
1681
1686
|
variant: "body2"
|
|
1682
|
-
}, "We recommend you to increase slippage to at least \u00A0", minRequiredSlippage, "\u00A0 for this route.", React__default.createElement(ui.
|
|
1683
|
-
size: 8
|
|
1684
|
-
direction: "vertical"
|
|
1687
|
+
}, "We recommend you to increase slippage to at least \u00A0", minRequiredSlippage, "\u00A0 for this route.", React__default.createElement(ui.Divider, {
|
|
1688
|
+
size: 8
|
|
1685
1689
|
}), React__default.createElement(ChangeSlippageButton, null));
|
|
1686
1690
|
}
|
|
1687
1691
|
|
|
@@ -1718,9 +1722,8 @@ function BalanceErrors(_ref) {
|
|
|
1718
1722
|
className: "title",
|
|
1719
1723
|
variant: "title",
|
|
1720
1724
|
color: 'error'
|
|
1721
|
-
}, "Insufficent Balance:"), React__default.createElement(ui.
|
|
1722
|
-
size: 8
|
|
1723
|
-
direction: "vertical"
|
|
1725
|
+
}, "Insufficent Balance:"), React__default.createElement(ui.Divider, {
|
|
1726
|
+
size: 8
|
|
1724
1727
|
}), React__default.createElement(List, {
|
|
1725
1728
|
showListStyle: showListStyle
|
|
1726
1729
|
}, messages.map((warning, index) => React__default.createElement(ListItem, {
|
|
@@ -1902,9 +1905,8 @@ function ConfirmSwapPage() {
|
|
|
1902
1905
|
amount: fromAmount,
|
|
1903
1906
|
label: i18n.t('From'),
|
|
1904
1907
|
loadingStatus: loadingMetaStatus !== 'success' ? loadingMetaStatus : bestRouteloadingStatus
|
|
1905
|
-
}), React__default.createElement(ui.
|
|
1906
|
-
size: 12
|
|
1907
|
-
direction: "vertical"
|
|
1908
|
+
}), React__default.createElement(ui.Divider, {
|
|
1909
|
+
size: 12
|
|
1908
1910
|
}), React__default.createElement(TokenPreview, {
|
|
1909
1911
|
chain: {
|
|
1910
1912
|
displayName: lastStep?.to.blockchain || '',
|
|
@@ -1930,9 +1932,7 @@ function ConfirmSwapPage() {
|
|
|
1930
1932
|
loading: fetchingConfirmedRoute,
|
|
1931
1933
|
errors: dbErrorMessage ? [dbErrorMessage, ...ConfirmSwapErrors(errors)] : ConfirmSwapErrors(errors),
|
|
1932
1934
|
warnings: ConfirmSwapWarnings(warnings),
|
|
1933
|
-
extraMessages: React__default.createElement(React__default.Fragment, null, loadingMetaStatus === 'failed' && React__default.createElement(ui.LoadingFailedAlert, null), loadingMetaStatus === 'failed' && showHighSlippageWarning && React__default.createElement(ui.
|
|
1934
|
-
direction: "vertical"
|
|
1935
|
-
}), showHighSlippageWarning && React__default.createElement(ConfirmSwapExtraMessages, {
|
|
1935
|
+
extraMessages: React__default.createElement(React__default.Fragment, null, loadingMetaStatus === 'failed' && React__default.createElement(ui.LoadingFailedAlert, null), loadingMetaStatus === 'failed' && showHighSlippageWarning && React__default.createElement(ui.Divider, null), showHighSlippageWarning && React__default.createElement(ConfirmSwapExtraMessages, {
|
|
1936
1936
|
selectedSlippage: selectedSlippage
|
|
1937
1937
|
})),
|
|
1938
1938
|
confirmButtonTitle: warnings.length > 0 || errors.length > 0 ? 'Proceed anyway!' : 'Confirm swap!'
|
|
@@ -2136,7 +2136,7 @@ function TokenInfo(props) {
|
|
|
2136
2136
|
}, React__default.createElement(ui.Typography, {
|
|
2137
2137
|
variant: "body3",
|
|
2138
2138
|
color: "neutral600"
|
|
2139
|
-
}, `${t('Balance')}: ${tokenBalance} ${fromToken?.symbol || ''}`), React__default.createElement(ui.
|
|
2139
|
+
}, `${t('Balance')}: ${tokenBalance} ${fromToken?.symbol || ''}`), React__default.createElement(ui.Divider, {
|
|
2140
2140
|
size: 4
|
|
2141
2141
|
}), React__default.createElement(ui.Button, {
|
|
2142
2142
|
type: "primary",
|
|
@@ -2167,8 +2167,9 @@ function TokenInfo(props) {
|
|
|
2167
2167
|
suffix: ItemSuffix,
|
|
2168
2168
|
align: "start",
|
|
2169
2169
|
size: "large"
|
|
2170
|
-
}, loadingStatus === 'success' && chain ? chain.displayName : t('Chain')), React__default.createElement(ui.
|
|
2171
|
-
size: 12
|
|
2170
|
+
}, loadingStatus === 'success' && chain ? chain.displayName : t('Chain')), React__default.createElement(ui.Divider, {
|
|
2171
|
+
size: 12,
|
|
2172
|
+
direction: "horizontal"
|
|
2172
2173
|
}), React__default.createElement(ui.Button, {
|
|
2173
2174
|
className: "selectors",
|
|
2174
2175
|
onClick: () => {
|
|
@@ -2184,8 +2185,9 @@ function TokenInfo(props) {
|
|
|
2184
2185
|
suffix: ItemSuffix,
|
|
2185
2186
|
size: "large",
|
|
2186
2187
|
align: "start"
|
|
2187
|
-
}, loadingStatus === 'success' && token ? token.symbol : t('Token')), React__default.createElement(ui.
|
|
2188
|
-
size: 12
|
|
2188
|
+
}, loadingStatus === 'success' && token ? token.symbol : t('Token')), React__default.createElement(ui.Divider, {
|
|
2189
|
+
size: 12,
|
|
2190
|
+
direction: "horizontal"
|
|
2189
2191
|
}), React__default.createElement("div", {
|
|
2190
2192
|
className: "amount"
|
|
2191
2193
|
}, props.type === 'From' ? React__default.createElement(ui.TextField, {
|
|
@@ -2647,7 +2649,7 @@ function WalletsPage(_ref) {
|
|
|
2647
2649
|
getWalletInfo,
|
|
2648
2650
|
connect
|
|
2649
2651
|
} = walletsCore.useWallets();
|
|
2650
|
-
const wallets = getlistWallet(state, getWalletInfo, supportedWallets || Object.values(walletsShared.
|
|
2652
|
+
const wallets = getlistWallet(state, getWalletInfo, supportedWallets || Object.values(walletsShared.WalletTypes));
|
|
2651
2653
|
const walletsRef = React.useRef();
|
|
2652
2654
|
let sortedWallets = walletsShared.detectMobileScreens() ? wallets.filter(wallet => wallet.showOnMobile) : wallets;
|
|
2653
2655
|
sortedWallets = sortWalletsBasedOnState(sortedWallets);
|
|
@@ -2836,7 +2838,7 @@ function SwapDetailsPage() {
|
|
|
2836
2838
|
label={t('From')}
|
|
2837
2839
|
loadingStatus={'success'}
|
|
2838
2840
|
/>
|
|
2839
|
-
<
|
|
2841
|
+
<Divider size={12} />
|
|
2840
2842
|
<TokenPreview
|
|
2841
2843
|
chain={{
|
|
2842
2844
|
displayName: lastStep?.toBlockchain || '',
|
|
@@ -2948,6 +2950,10 @@ const Header = /*#__PURE__*/ui.styled('div', {
|
|
|
2948
2950
|
display: 'flex'
|
|
2949
2951
|
}
|
|
2950
2952
|
});
|
|
2953
|
+
const WalletImages = /*#__PURE__*/ui.styled('div', {
|
|
2954
|
+
display: 'flex',
|
|
2955
|
+
paddingLeft: '12px'
|
|
2956
|
+
});
|
|
2951
2957
|
const WalletImageContainer = /*#__PURE__*/ui.styled('div', {
|
|
2952
2958
|
marginLeft: -15,
|
|
2953
2959
|
marginRight: '$6',
|
|
@@ -3018,13 +3024,14 @@ function Layout(_ref) {
|
|
|
3018
3024
|
disabled: loadingMetaStatus === 'failed',
|
|
3019
3025
|
onClick: () => {
|
|
3020
3026
|
if (!connectWalletsButtonDisabled) navigate(navigationRoutes.wallets);
|
|
3021
|
-
}
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3027
|
+
},
|
|
3028
|
+
prefix: connectedWalletsImages?.length ? React__default.createElement(WalletImages, null, connectedWalletsImages.map((walletImage, index) => React__default.createElement(WalletImageContainer, {
|
|
3029
|
+
key: index
|
|
3030
|
+
}, React__default.createElement(ui.Image, {
|
|
3031
|
+
src: walletImage,
|
|
3032
|
+
size: 24
|
|
3033
|
+
})))) : null
|
|
3034
|
+
}, React__default.createElement("div", {
|
|
3028
3035
|
className: "balance"
|
|
3029
3036
|
}, React__default.createElement(ui.Typography, {
|
|
3030
3037
|
variant: "body2"
|
|
@@ -3257,6 +3264,7 @@ function QueueManager(props) {
|
|
|
3257
3264
|
}
|
|
3258
3265
|
return connect(wallet, network);
|
|
3259
3266
|
};
|
|
3267
|
+
const isMobileWallet = walletType => !!getWalletInfo(walletType).mobileWallet;
|
|
3260
3268
|
// TODO: this code copy & pasted from rango, should be refactored.
|
|
3261
3269
|
const allBlockchains = blockchains.filter(blockchain => blockchain.enabled).reduce((blockchainsObj, blockchain) => (blockchainsObj[blockchain.name] = blockchain, blockchainsObj), {});
|
|
3262
3270
|
const evmBasedChains = blockchains.filter(rangoSdk.isEvmBlockchain);
|
|
@@ -3293,6 +3301,7 @@ function QueueManager(props) {
|
|
|
3293
3301
|
switchNetwork,
|
|
3294
3302
|
connect,
|
|
3295
3303
|
state,
|
|
3304
|
+
isMobileWallet,
|
|
3296
3305
|
notifier
|
|
3297
3306
|
};
|
|
3298
3307
|
return React__default.createElement(queueManagerReact.Provider, {
|
|
@@ -3388,11 +3397,5 @@ const Widget = _ref => {
|
|
|
3388
3397
|
}))))));
|
|
3389
3398
|
};
|
|
3390
3399
|
|
|
3391
|
-
Object.defineProperty(exports, 'WalletType', {
|
|
3392
|
-
enumerable: true,
|
|
3393
|
-
get: function () {
|
|
3394
|
-
return walletsShared.WalletType;
|
|
3395
|
-
}
|
|
3396
|
-
});
|
|
3397
3400
|
exports.Widget = Widget;
|
|
3398
3401
|
//# sourceMappingURL=widget-embedded.cjs.development.js.map
|