@rango-dev/widget-embedded 0.32.1 → 0.32.2-next.1
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/CHANGELOG.md +4 -0
- package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
- package/dist/components/Slippage/Slippage.d.ts.map +1 -1
- package/dist/components/StatefulConnectModal/StatefulConnectModal.d.ts +11 -0
- package/dist/components/StatefulConnectModal/StatefulConnectModal.d.ts.map +1 -0
- package/dist/components/StatefulConnectModal/helpers.d.ts +10 -0
- package/dist/components/StatefulConnectModal/helpers.d.ts.map +1 -0
- package/dist/components/StatefulConnectModal/index.d.ts +2 -0
- package/dist/components/StatefulConnectModal/index.d.ts.map +1 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/ConnectStatus.d.ts +4 -0
- package/dist/components/WalletStatefulConnect/ConnectStatus.d.ts.map +1 -0
- package/dist/components/{WalletModal/WalletModalContent.styles.d.ts → WalletStatefulConnect/ConnectStatus.styles.d.ts} +1 -1
- package/dist/components/{WalletModal/WalletModalContent.styles.d.ts.map → WalletStatefulConnect/ConnectStatus.styles.d.ts.map} +1 -1
- package/dist/components/WalletStatefulConnect/ConnectStatus.types.d.ts +8 -0
- package/dist/components/WalletStatefulConnect/ConnectStatus.types.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/DerivationPath.d.ts +4 -0
- package/dist/components/WalletStatefulConnect/DerivationPath.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/DerivationPath.helpers.d.ts +4 -0
- package/dist/components/WalletStatefulConnect/DerivationPath.helpers.d.ts.map +1 -0
- package/dist/components/{WalletDerivationPathModal/WalletDerivationPathModal.styles.d.ts → WalletStatefulConnect/DerivationPath.styles.d.ts} +1 -1
- package/dist/components/WalletStatefulConnect/DerivationPath.styles.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/DerivationPath.types.d.ts +6 -0
- package/dist/components/WalletStatefulConnect/DerivationPath.types.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/ExperimentalChain.d.ts +8 -0
- package/dist/components/WalletStatefulConnect/ExperimentalChain.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/ExperimentalChainStatus.d.ts +4 -0
- package/dist/components/WalletStatefulConnect/ExperimentalChainStatus.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/ExperimentalChainStatus.helpers.d.ts +8 -0
- package/dist/components/WalletStatefulConnect/ExperimentalChainStatus.helpers.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/ExperimentalChainStatus.types.d.ts +6 -0
- package/dist/components/WalletStatefulConnect/ExperimentalChainStatus.types.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/Namespaces.d.ts +4 -0
- package/dist/components/WalletStatefulConnect/Namespaces.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/Namespaces.helpers.d.ts +3 -0
- package/dist/components/WalletStatefulConnect/Namespaces.helpers.d.ts.map +1 -0
- package/dist/components/{WalletNamespacesModal/WalletNamespacesModal.styles.d.ts → WalletStatefulConnect/Namespaces.styles.d.ts} +1 -1
- package/dist/components/WalletStatefulConnect/Namespaces.styles.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/Namespaces.types.d.ts +7 -0
- package/dist/components/WalletStatefulConnect/Namespaces.types.d.ts.map +1 -0
- package/dist/components/WalletStatefulConnect/index.d.ts +5 -0
- package/dist/components/WalletStatefulConnect/index.d.ts.map +1 -0
- package/dist/containers/Wallets/Wallets.types.d.ts +1 -1
- package/dist/containers/Wallets/Wallets.types.d.ts.map +1 -1
- package/dist/containers/WidgetProvider/WidgetProvider.types.d.ts +1 -1
- package/dist/containers/WidgetProvider/WidgetProvider.types.d.ts.map +1 -1
- package/dist/hooks/useStatefulConnect/index.d.ts +5 -0
- package/dist/hooks/useStatefulConnect/index.d.ts.map +1 -0
- package/dist/hooks/useStatefulConnect/useStatefulConnect.d.ts +25 -0
- package/dist/hooks/useStatefulConnect/useStatefulConnect.d.ts.map +1 -0
- package/dist/hooks/useStatefulConnect/useStatefulConnect.helpers.d.ts +8 -0
- package/dist/hooks/useStatefulConnect/useStatefulConnect.helpers.d.ts.map +1 -0
- package/dist/hooks/useStatefulConnect/useStatefulConnect.state.d.ts +9 -0
- package/dist/hooks/useStatefulConnect/useStatefulConnect.state.d.ts.map +1 -0
- package/dist/hooks/useStatefulConnect/useStatefulConnect.types.d.ts +43 -0
- package/dist/hooks/useStatefulConnect/useStatefulConnect.types.d.ts.map +1 -0
- package/dist/hooks/useWalletList.d.ts +11 -14
- package/dist/hooks/useWalletList.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/dist/pages/WalletsPage.d.ts +0 -2
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/widget-embedded.build.json +1 -1
- package/package.json +8 -7
- package/src/components/ConfirmWalletsModal/WalletList.tsx +52 -243
- package/src/components/HeaderButtons/WalletButton.tsx +1 -1
- package/src/components/Slippage/Slippage.tsx +3 -0
- package/src/components/StatefulConnectModal/StatefulConnectModal.tsx +176 -0
- package/src/components/StatefulConnectModal/helpers.ts +23 -0
- package/src/components/StatefulConnectModal/index.ts +1 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +23 -113
- package/src/components/{WalletModal/WalletModalContent.tsx → WalletStatefulConnect/ConnectStatus.tsx} +13 -5
- package/src/components/WalletStatefulConnect/ConnectStatus.types.ts +11 -0
- package/src/components/WalletStatefulConnect/DerivationPath.helpers.ts +23 -0
- package/src/components/{WalletDerivationPathModal/WalletDerivationPathModal.tsx → WalletStatefulConnect/DerivationPath.tsx} +34 -36
- package/src/components/WalletStatefulConnect/DerivationPath.types.ts +6 -0
- package/src/components/WalletStatefulConnect/ExperimentalChain.tsx +36 -0
- package/src/components/WalletStatefulConnect/ExperimentalChainStatus.helpers.ts +53 -0
- package/src/components/WalletStatefulConnect/ExperimentalChainStatus.tsx +35 -0
- package/src/components/WalletStatefulConnect/ExperimentalChainStatus.types.ts +5 -0
- package/src/components/WalletStatefulConnect/Namespaces.helpers.ts +9 -0
- package/src/components/{WalletNamespacesModal/WalletNamespacesModal.tsx → WalletStatefulConnect/Namespaces.tsx} +9 -27
- package/src/components/{WalletNamespacesModal/WalletNamespacesModal.types.tsx → WalletStatefulConnect/Namespaces.types.tsx} +2 -5
- package/src/components/WalletStatefulConnect/index.ts +4 -0
- package/src/containers/Wallets/Wallets.tsx +1 -1
- package/src/containers/Wallets/Wallets.types.ts +1 -1
- package/src/containers/WidgetProvider/WidgetProvider.types.ts +1 -1
- package/src/hooks/useStatefulConnect/index.ts +9 -0
- package/src/hooks/useStatefulConnect/useStatefulConnect.helpers.ts +13 -0
- package/src/hooks/useStatefulConnect/useStatefulConnect.state.ts +45 -0
- package/src/hooks/useStatefulConnect/useStatefulConnect.ts +232 -0
- package/src/hooks/useStatefulConnect/useStatefulConnect.types.ts +56 -0
- package/src/hooks/useWalletList.ts +22 -53
- package/src/index.ts +7 -8
- package/src/pages/WalletsPage.tsx +10 -162
- package/src/store/wallets.ts +1 -1
- package/src/utils/wallets.ts +1 -1
- package/dist/components/WalletDerivationPathModal/WalletDerivationPathModal.d.ts +0 -4
- package/dist/components/WalletDerivationPathModal/WalletDerivationPathModal.d.ts.map +0 -1
- package/dist/components/WalletDerivationPathModal/WalletDerivationPathModal.styles.d.ts.map +0 -1
- package/dist/components/WalletDerivationPathModal/WalletDerivationPathModal.types.d.ts +0 -10
- package/dist/components/WalletDerivationPathModal/WalletDerivationPathModal.types.d.ts.map +0 -1
- package/dist/components/WalletDerivationPathModal/index.d.ts +0 -2
- package/dist/components/WalletDerivationPathModal/index.d.ts.map +0 -1
- package/dist/components/WalletModal/WalletModal.d.ts +0 -4
- package/dist/components/WalletModal/WalletModal.d.ts.map +0 -1
- package/dist/components/WalletModal/WalletModal.types.d.ts +0 -10
- package/dist/components/WalletModal/WalletModal.types.d.ts.map +0 -1
- package/dist/components/WalletModal/WalletModalContent.d.ts +0 -4
- package/dist/components/WalletModal/WalletModalContent.d.ts.map +0 -1
- package/dist/components/WalletModal/index.d.ts +0 -2
- package/dist/components/WalletModal/index.d.ts.map +0 -1
- package/dist/components/WalletNamespacesModal/WalletNamespacesModal.d.ts +0 -4
- package/dist/components/WalletNamespacesModal/WalletNamespacesModal.d.ts.map +0 -1
- package/dist/components/WalletNamespacesModal/WalletNamespacesModal.styles.d.ts.map +0 -1
- package/dist/components/WalletNamespacesModal/WalletNamespacesModal.types.d.ts +0 -10
- package/dist/components/WalletNamespacesModal/WalletNamespacesModal.types.d.ts.map +0 -1
- package/dist/components/WalletNamespacesModal/index.d.ts +0 -2
- package/dist/components/WalletNamespacesModal/index.d.ts.map +0 -1
- package/src/components/WalletDerivationPathModal/WalletDerivationPathModal.types.tsx +0 -10
- package/src/components/WalletDerivationPathModal/index.ts +0 -1
- package/src/components/WalletModal/WalletModal.tsx +0 -25
- package/src/components/WalletModal/WalletModal.types.ts +0 -11
- package/src/components/WalletModal/index.ts +0 -1
- package/src/components/WalletNamespacesModal/index.ts +0 -1
- /package/src/components/{WalletModal/WalletModalContent.styles.ts → WalletStatefulConnect/ConnectStatus.styles.ts} +0 -0
- /package/src/components/{WalletDerivationPathModal/WalletDerivationPathModal.styles.ts → WalletStatefulConnect/DerivationPath.styles.ts} +0 -0
- /package/src/components/{WalletNamespacesModal/WalletNamespacesModal.styles.ts → WalletStatefulConnect/Namespaces.styles.ts} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { WalletInfoWithExtra } from '../types';
|
|
2
|
-
import type { Namespace, WalletType } from '@rango-dev/wallets-shared';
|
|
3
2
|
|
|
4
3
|
import { i18n } from '@lingui/core';
|
|
5
4
|
import {
|
|
@@ -9,14 +8,11 @@ import {
|
|
|
9
8
|
styled,
|
|
10
9
|
Typography,
|
|
11
10
|
Wallet,
|
|
12
|
-
WalletState,
|
|
13
11
|
} from '@rango-dev/ui';
|
|
14
12
|
import React, { useState } from 'react';
|
|
15
13
|
|
|
16
14
|
import { Layout, PageContainer } from '../components/Layout';
|
|
17
|
-
import {
|
|
18
|
-
import { WalletModal } from '../components/WalletModal';
|
|
19
|
-
import { WalletNamespacesModal } from '../components/WalletNamespacesModal';
|
|
15
|
+
import { StatefulConnectModal } from '../components/StatefulConnectModal';
|
|
20
16
|
import { useWalletList } from '../hooks/useWalletList';
|
|
21
17
|
import { useAppStore } from '../store/AppStore';
|
|
22
18
|
import { useUiStore } from '../store/ui';
|
|
@@ -26,21 +22,6 @@ import {
|
|
|
26
22
|
filterWalletsByCategory,
|
|
27
23
|
} from '../utils/wallets';
|
|
28
24
|
|
|
29
|
-
interface NamespacesModalState {
|
|
30
|
-
open: boolean;
|
|
31
|
-
providerType: string;
|
|
32
|
-
providerImage: string;
|
|
33
|
-
availableNamespaces?: Namespace[];
|
|
34
|
-
singleNamespace?: boolean;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
interface DerivationPathModalState {
|
|
38
|
-
open: boolean;
|
|
39
|
-
providerType: string;
|
|
40
|
-
providerImage: string;
|
|
41
|
-
namespace: Namespace;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
25
|
const ListContainer = styled('div', {
|
|
45
26
|
display: 'flex',
|
|
46
27
|
justifyContent: 'center',
|
|
@@ -54,73 +35,17 @@ const Container = styled(PageContainer, {
|
|
|
54
35
|
textAlign: 'center',
|
|
55
36
|
});
|
|
56
37
|
|
|
57
|
-
export const TIME_TO_CLOSE_MODAL = 3_000;
|
|
58
|
-
export const TIME_TO_IGNORE_MODAL = 300;
|
|
59
|
-
|
|
60
38
|
export function WalletsPage() {
|
|
61
39
|
const { fetchStatus: fetchMetaStatus } = useAppStore();
|
|
62
40
|
const [blockchainCategory, setBlockchainCategory] = useState<string>('ALL');
|
|
63
41
|
const blockchains = useAppStore().blockchains();
|
|
64
42
|
const { config } = useAppStore();
|
|
65
43
|
|
|
66
|
-
const [
|
|
67
|
-
|
|
68
|
-
useState<NamespacesModalState | null>(null);
|
|
69
|
-
const [derivationPathModalState, setDerivationPathModalState] =
|
|
70
|
-
useState<DerivationPathModalState | null>(null);
|
|
71
|
-
const [selectedWalletType, setSelectedWalletType] = useState<WalletType>('');
|
|
72
|
-
let modalTimerId: ReturnType<typeof setTimeout> | null = null;
|
|
44
|
+
const [selectedWalletToConnect, setSelectedWalletToConnect] =
|
|
45
|
+
useState<WalletInfoWithExtra>();
|
|
73
46
|
const isActiveTab = useUiStore.use.isActiveTab();
|
|
74
47
|
|
|
75
|
-
const { list
|
|
76
|
-
useWalletList({
|
|
77
|
-
onBeforeConnect: (type) => {
|
|
78
|
-
modalTimerId = setTimeout(() => {
|
|
79
|
-
setOpenModal(true);
|
|
80
|
-
setSelectedWalletType(type);
|
|
81
|
-
}, TIME_TO_IGNORE_MODAL);
|
|
82
|
-
},
|
|
83
|
-
onConnect: (type) => {
|
|
84
|
-
if (modalTimerId) {
|
|
85
|
-
clearTimeout(modalTimerId);
|
|
86
|
-
}
|
|
87
|
-
setTimeout(() => {
|
|
88
|
-
if (selectedWalletType === type) {
|
|
89
|
-
setOpenModal(false);
|
|
90
|
-
}
|
|
91
|
-
}, TIME_TO_CLOSE_MODAL);
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
const handleCloseWalletModal = () => {
|
|
96
|
-
disconnectConnectingWallets();
|
|
97
|
-
setOpenModal(false);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const handleCloseNamespaceModal = () => {
|
|
101
|
-
if (namespacesModalState) {
|
|
102
|
-
setNamespacesModalState({
|
|
103
|
-
...namespacesModalState,
|
|
104
|
-
open: false,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
const handleCloseDerivationPathModal = () => {
|
|
110
|
-
if (derivationPathModalState) {
|
|
111
|
-
setDerivationPathModalState({
|
|
112
|
-
...derivationPathModalState,
|
|
113
|
-
open: false,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
const selectedWallet = list.find(
|
|
119
|
-
(wallet) => wallet.type === selectedWalletType
|
|
120
|
-
);
|
|
121
|
-
const selectedWalletImage = selectedWallet?.image || '';
|
|
122
|
-
const selectedWalletState =
|
|
123
|
-
selectedWallet?.state || WalletState.NOT_INSTALLED;
|
|
48
|
+
const { list } = useWalletList();
|
|
124
49
|
|
|
125
50
|
const filteredBlockchains = filterBlockchainsByWalletTypes(list, blockchains);
|
|
126
51
|
const activeCategoriesCount = getCategoriesCount(filteredBlockchains);
|
|
@@ -133,67 +58,7 @@ export function WalletsPage() {
|
|
|
133
58
|
return;
|
|
134
59
|
}
|
|
135
60
|
|
|
136
|
-
|
|
137
|
-
!!wallet.namespaces?.length &&
|
|
138
|
-
wallet.state === WalletState.DISCONNECTED
|
|
139
|
-
) {
|
|
140
|
-
if (wallet.namespaces.length > 1) {
|
|
141
|
-
setNamespacesModalState({
|
|
142
|
-
open: true,
|
|
143
|
-
providerType: wallet.type,
|
|
144
|
-
providerImage: wallet.image,
|
|
145
|
-
availableNamespaces: wallet.namespaces,
|
|
146
|
-
singleNamespace: wallet.singleNamespace,
|
|
147
|
-
});
|
|
148
|
-
} else if (wallet.needsDerivationPath) {
|
|
149
|
-
setDerivationPathModalState({
|
|
150
|
-
open: true,
|
|
151
|
-
providerType: wallet.type,
|
|
152
|
-
providerImage: wallet.image,
|
|
153
|
-
namespace: wallet.namespaces[0],
|
|
154
|
-
});
|
|
155
|
-
} else {
|
|
156
|
-
void handleClick(wallet.type);
|
|
157
|
-
}
|
|
158
|
-
} else {
|
|
159
|
-
void handleClick(wallet.type);
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
const handleConfirmNamespaces = (selectedNamespaces: Namespace[]) => {
|
|
164
|
-
const wallet = filteredWallets.find(
|
|
165
|
-
(wallet) => wallet.type === namespacesModalState?.providerType
|
|
166
|
-
);
|
|
167
|
-
if (
|
|
168
|
-
wallet?.singleNamespace && // Currently we support derivation path only for single namespace wallets
|
|
169
|
-
wallet?.needsDerivationPath &&
|
|
170
|
-
selectedNamespaces[0]
|
|
171
|
-
) {
|
|
172
|
-
setDerivationPathModalState({
|
|
173
|
-
open: true,
|
|
174
|
-
providerType: wallet.type,
|
|
175
|
-
providerImage: wallet.image,
|
|
176
|
-
namespace: selectedNamespaces[0],
|
|
177
|
-
});
|
|
178
|
-
} else {
|
|
179
|
-
void handleClick(
|
|
180
|
-
namespacesModalState?.providerType as string,
|
|
181
|
-
selectedNamespaces.map((namespace) => ({
|
|
182
|
-
namespace,
|
|
183
|
-
}))
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
handleCloseNamespaceModal();
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
const handleDerivationPathConfirm = (derivationPath: string) => {
|
|
190
|
-
if (derivationPath && derivationPathModalState?.namespace) {
|
|
191
|
-
void handleClick(derivationPathModalState.providerType, [
|
|
192
|
-
{ namespace: derivationPathModalState.namespace, derivationPath },
|
|
193
|
-
]);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
handleCloseDerivationPathModal();
|
|
61
|
+
setSelectedWalletToConnect(wallet);
|
|
197
62
|
};
|
|
198
63
|
|
|
199
64
|
return (
|
|
@@ -230,28 +95,11 @@ export function WalletsPage() {
|
|
|
230
95
|
/>
|
|
231
96
|
);
|
|
232
97
|
})}
|
|
233
|
-
<
|
|
234
|
-
|
|
235
|
-
onClose={
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
error={error}
|
|
239
|
-
/>
|
|
240
|
-
<WalletNamespacesModal
|
|
241
|
-
open={!!namespacesModalState?.open}
|
|
242
|
-
onClose={handleCloseNamespaceModal}
|
|
243
|
-
onConfirm={handleConfirmNamespaces}
|
|
244
|
-
image={namespacesModalState?.providerImage}
|
|
245
|
-
availableNamespaces={namespacesModalState?.availableNamespaces}
|
|
246
|
-
singleNamespace={namespacesModalState?.singleNamespace}
|
|
247
|
-
/>
|
|
248
|
-
<WalletDerivationPathModal
|
|
249
|
-
open={!!derivationPathModalState?.open}
|
|
250
|
-
selectedNamespace={derivationPathModalState?.namespace}
|
|
251
|
-
type={derivationPathModalState?.providerType}
|
|
252
|
-
image={derivationPathModalState?.providerImage}
|
|
253
|
-
onClose={handleCloseDerivationPathModal}
|
|
254
|
-
onConfirm={handleDerivationPathConfirm}
|
|
98
|
+
<StatefulConnectModal
|
|
99
|
+
wallet={selectedWalletToConnect}
|
|
100
|
+
onClose={() => {
|
|
101
|
+
setSelectedWalletToConnect(undefined);
|
|
102
|
+
}}
|
|
255
103
|
/>
|
|
256
104
|
</ListContainer>
|
|
257
105
|
</Container>
|
package/src/store/wallets.ts
CHANGED
|
@@ -220,13 +220,13 @@ export const useWalletsStore = createSelectors(
|
|
|
220
220
|
findToken
|
|
221
221
|
),
|
|
222
222
|
loading: false,
|
|
223
|
+
error: false,
|
|
223
224
|
}
|
|
224
225
|
: connectedWallet;
|
|
225
226
|
}
|
|
226
227
|
);
|
|
227
228
|
|
|
228
229
|
const balances = makeTokensBalance(connectedWallets);
|
|
229
|
-
|
|
230
230
|
return {
|
|
231
231
|
loading: false,
|
|
232
232
|
balances,
|
package/src/utils/wallets.ts
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
BlockchainCategories,
|
|
27
27
|
WalletState as WalletStatus,
|
|
28
28
|
} from '@rango-dev/ui';
|
|
29
|
-
import { readAccountAddress } from '@rango-dev/wallets-
|
|
29
|
+
import { legacyReadAccountAddress as readAccountAddress } from '@rango-dev/wallets-core/legacy';
|
|
30
30
|
import {
|
|
31
31
|
detectInstallLink,
|
|
32
32
|
getCosmosExperimentalChainInfo,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletDerivationPathModal.d.ts","sourceRoot":"","sources":["../../../src/components/WalletDerivationPathModal/WalletDerivationPathModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAanE,OAAO,KAA8B,MAAM,OAAO,CAAC;AAkCnD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,qBA0GzD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletDerivationPathModal.styles.d.ts","sourceRoot":"","sources":["../../../src/components/WalletDerivationPathModal/WalletDerivationPathModal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,UAAU,EAAE,MAAM,eAAe,CAAC;AAEnD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAI1B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAErB,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Namespace } from '@rango-dev/wallets-shared';
|
|
2
|
-
export interface PropTypes {
|
|
3
|
-
open: boolean;
|
|
4
|
-
selectedNamespace?: Namespace;
|
|
5
|
-
type?: string;
|
|
6
|
-
image?: string;
|
|
7
|
-
onClose: () => void;
|
|
8
|
-
onConfirm: (path: string) => void;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=WalletDerivationPathModal.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletDerivationPathModal.types.d.ts","sourceRoot":"","sources":["../../../src/components/WalletDerivationPathModal/WalletDerivationPathModal.types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/WalletDerivationPathModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletModal.d.ts","sourceRoot":"","sources":["../../../src/components/WalletModal/WalletModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,qBAc3C"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { WalletState } from '@rango-dev/ui';
|
|
2
|
-
export interface PropTypes {
|
|
3
|
-
open: boolean;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
image: string;
|
|
6
|
-
state: WalletState;
|
|
7
|
-
error?: string;
|
|
8
|
-
}
|
|
9
|
-
export type ModalContentProps = Pick<PropTypes, 'state' | 'error' | 'image'>;
|
|
10
|
-
//# sourceMappingURL=WalletModal.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletModal.types.d.ts","sourceRoot":"","sources":["../../../src/components/WalletModal/WalletModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletModalContent.d.ts","sourceRoot":"","sources":["../../../src/components/WalletModal/WalletModalContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAI7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAyCpD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/WalletModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletNamespacesModal.d.ts","sourceRoot":"","sources":["../../../src/components/WalletNamespacesModal/WalletNamespacesModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAgB/D,OAAO,KAA4B,MAAM,OAAO,CAAC;AAqBjD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,qBAmGrD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletNamespacesModal.styles.d.ts","sourceRoot":"","sources":["../../../src/components/WalletNamespacesModal/WalletNamespacesModal.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAIxB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Namespace } from '@rango-dev/wallets-shared';
|
|
2
|
-
export interface PropTypes {
|
|
3
|
-
open: boolean;
|
|
4
|
-
image?: string;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
onConfirm: (namespaces: Namespace[]) => void;
|
|
7
|
-
availableNamespaces?: Namespace[];
|
|
8
|
-
singleNamespace?: boolean;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=WalletNamespacesModal.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletNamespacesModal.types.d.ts","sourceRoot":"","sources":["../../../src/components/WalletNamespacesModal/WalletNamespacesModal.types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IAC7C,mBAAmB,CAAC,EAAE,SAAS,EAAE,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/WalletNamespacesModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { WalletDerivationPathModal } from './WalletDerivationPathModal';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { PropTypes } from './WalletModal.types';
|
|
2
|
-
|
|
3
|
-
import { Divider } from '@rango-dev/ui';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
6
|
-
import { WIDGET_UI_ID } from '../../constants';
|
|
7
|
-
import { WatermarkedModal } from '../common/WatermarkedModal';
|
|
8
|
-
|
|
9
|
-
import { ModalContent } from './WalletModalContent';
|
|
10
|
-
|
|
11
|
-
export function WalletModal(props: PropTypes) {
|
|
12
|
-
const { open, onClose, ...otherProps } = props;
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<WatermarkedModal
|
|
16
|
-
open={open}
|
|
17
|
-
onClose={onClose}
|
|
18
|
-
container={
|
|
19
|
-
document.getElementById(WIDGET_UI_ID.SWAP_BOX_ID) || document.body
|
|
20
|
-
}>
|
|
21
|
-
<ModalContent {...otherProps} />
|
|
22
|
-
<Divider direction="vertical" size={32} />
|
|
23
|
-
</WatermarkedModal>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { WalletState } from '@rango-dev/ui';
|
|
2
|
-
|
|
3
|
-
export interface PropTypes {
|
|
4
|
-
open: boolean;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
image: string;
|
|
7
|
-
state: WalletState;
|
|
8
|
-
error?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type ModalContentProps = Pick<PropTypes, 'state' | 'error' | 'image'>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { WalletModal } from './WalletModal';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { WalletNamespacesModal } from './WalletNamespacesModal';
|
|
File without changes
|
|
File without changes
|