@rango-dev/widget-embedded 0.1.18 → 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/CHANGELOG.md +1 -1
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20-next.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"trailingComma": "es5"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@rango-dev/provider-all": "^0.1.
|
|
28
|
-
"@rango-dev/queue-manager-core": "^0.1.
|
|
29
|
-
"@rango-dev/queue-manager-rango-preset": "^0.1.
|
|
30
|
-
"@rango-dev/queue-manager-react": "^0.1.
|
|
31
|
-
"@rango-dev/ui": "^0.1.
|
|
32
|
-
"@rango-dev/wallets-core": "^0.1.
|
|
33
|
-
"@rango-dev/wallets-shared": "^0.1.
|
|
27
|
+
"@rango-dev/provider-all": "^0.1.22-next.0",
|
|
28
|
+
"@rango-dev/queue-manager-core": "^0.1.14",
|
|
29
|
+
"@rango-dev/queue-manager-rango-preset": "^0.1.14",
|
|
30
|
+
"@rango-dev/queue-manager-react": "^0.1.13",
|
|
31
|
+
"@rango-dev/ui": "^0.1.16-next.0",
|
|
32
|
+
"@rango-dev/wallets-core": "^0.1.16-next.0",
|
|
33
|
+
"@rango-dev/wallets-shared": "^0.1.14",
|
|
34
34
|
"bignumber.js": "^9.1.1",
|
|
35
35
|
"copy-to-clipboard": "^3.3.3",
|
|
36
36
|
"dayjs": "^1.11.7",
|
|
@@ -42,13 +42,15 @@
|
|
|
42
42
|
"parcel": "^2.8.0",
|
|
43
43
|
"rango-sdk": "^0.1.27",
|
|
44
44
|
"rango-types": "^0.1.32",
|
|
45
|
-
"react": "^18.2.0",
|
|
46
|
-
"react-dom": "^18.2.0",
|
|
47
45
|
"react-i18next": "^12.2.0",
|
|
48
46
|
"react-router-dom": "^6.8.0",
|
|
49
47
|
"values.js": "2.1.1",
|
|
50
48
|
"zustand": "^4.3.2"
|
|
51
49
|
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"react": ">=16",
|
|
52
|
+
"react-dom": ">=16"
|
|
53
|
+
},
|
|
52
54
|
"publishConfig": {
|
|
53
55
|
"access": "public"
|
|
54
56
|
}
|
package/src/QueueManager.tsx
CHANGED
|
@@ -52,6 +52,9 @@ function QueueManager(props: PropsWithChildren<{}>) {
|
|
|
52
52
|
return connect(wallet, network);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
+
const isMobileWallet = (walletType: WalletType): boolean =>
|
|
56
|
+
!!getWalletInfo(walletType).mobileWallet;
|
|
57
|
+
|
|
55
58
|
// TODO: this code copy & pasted from rango, should be refactored.
|
|
56
59
|
const allBlockchains = blockchains
|
|
57
60
|
.filter((blockchain) => blockchain.enabled)
|
|
@@ -106,6 +109,7 @@ function QueueManager(props: PropsWithChildren<{}>) {
|
|
|
106
109
|
switchNetwork,
|
|
107
110
|
connect,
|
|
108
111
|
state,
|
|
112
|
+
isMobileWallet,
|
|
109
113
|
notifier,
|
|
110
114
|
};
|
|
111
115
|
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
Typography,
|
|
5
5
|
styled,
|
|
6
6
|
Spinner,
|
|
7
|
+
Image,
|
|
7
8
|
} from '@rango-dev/ui';
|
|
8
9
|
import React, { useEffect } from 'react';
|
|
9
10
|
import { useNavigate } from 'react-router-dom';
|
|
@@ -23,7 +24,6 @@ import { useTranslation } from 'react-i18next';
|
|
|
23
24
|
import { useBestRouteStore } from '../store/bestRoute';
|
|
24
25
|
import { useMetaStore } from '../store/meta';
|
|
25
26
|
import { useSettingsStore } from '../store/settings';
|
|
26
|
-
import { Image } from '@rango-dev/ui';
|
|
27
27
|
|
|
28
28
|
const Header = styled('div', {
|
|
29
29
|
display: 'flex',
|
|
@@ -34,6 +34,11 @@ const Header = styled('div', {
|
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
+
const WalletImages = styled('div', {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
paddingLeft: '12px',
|
|
40
|
+
});
|
|
41
|
+
|
|
37
42
|
const WalletImageContainer = styled('div', {
|
|
38
43
|
marginLeft: -15,
|
|
39
44
|
marginRight: '$6',
|
|
@@ -52,7 +57,7 @@ export function Layout({ config }: LayoutProps) {
|
|
|
52
57
|
const { getWalletInfo } = useWallets();
|
|
53
58
|
const connectedWalletsImages = removeDuplicateFrom(
|
|
54
59
|
getSelectableWallets(connectedWallets, selectedWallets, getWalletInfo).map(
|
|
55
|
-
|
|
60
|
+
w => w.image
|
|
56
61
|
)
|
|
57
62
|
);
|
|
58
63
|
const { blockchains, tokens } = useMetaStore.use.meta();
|
|
@@ -64,8 +69,7 @@ export function Layout({ config }: LayoutProps) {
|
|
|
64
69
|
const setAffiliateRef = useSettingsStore.use.setAffiliateRef();
|
|
65
70
|
|
|
66
71
|
const totalBalance = calculateWalletUsdValue(connectedWallets);
|
|
67
|
-
const connectWalletsButtonDisabled =
|
|
68
|
-
useUiStore.use.connectWalletsButtonDisabled();
|
|
72
|
+
const connectWalletsButtonDisabled = useUiStore.use.connectWalletsButtonDisabled();
|
|
69
73
|
const loadingMetaStatus = useMetaStore.use.loadingStatus();
|
|
70
74
|
const fetchingBalance = useWalletsStore(fetchingBalanceSelector);
|
|
71
75
|
|
|
@@ -73,9 +77,9 @@ export function Layout({ config }: LayoutProps) {
|
|
|
73
77
|
useEffect(() => {
|
|
74
78
|
if (loadingMetaStatus === 'success') {
|
|
75
79
|
const chain = blockchains.find(
|
|
76
|
-
|
|
80
|
+
chain => chain.name === config?.to?.blockchain
|
|
77
81
|
);
|
|
78
|
-
const token = tokens.find(
|
|
82
|
+
const token = tokens.find(t =>
|
|
79
83
|
tokensAreEqual(t, config?.to?.token || null)
|
|
80
84
|
);
|
|
81
85
|
setToChain(chain || null);
|
|
@@ -90,9 +94,9 @@ export function Layout({ config }: LayoutProps) {
|
|
|
90
94
|
useEffect(() => {
|
|
91
95
|
if (loadingMetaStatus === 'success') {
|
|
92
96
|
const chain = blockchains.find(
|
|
93
|
-
|
|
97
|
+
chain => chain.name === config?.from?.blockchain
|
|
94
98
|
);
|
|
95
|
-
const token = tokens.find(
|
|
99
|
+
const token = tokens.find(t =>
|
|
96
100
|
tokensAreEqual(t, config?.from?.token || null)
|
|
97
101
|
);
|
|
98
102
|
|
|
@@ -118,16 +122,18 @@ export function Layout({ config }: LayoutProps) {
|
|
|
118
122
|
if (!connectWalletsButtonDisabled)
|
|
119
123
|
navigate(navigationRoutes.wallets);
|
|
120
124
|
}}
|
|
125
|
+
prefix={
|
|
126
|
+
connectedWalletsImages?.length ? (
|
|
127
|
+
<WalletImages>
|
|
128
|
+
{connectedWalletsImages.map((walletImage, index) => (
|
|
129
|
+
<WalletImageContainer key={index}>
|
|
130
|
+
<Image src={walletImage} size={24} />
|
|
131
|
+
</WalletImageContainer>
|
|
132
|
+
))}
|
|
133
|
+
</WalletImages>
|
|
134
|
+
) : null
|
|
135
|
+
}
|
|
121
136
|
>
|
|
122
|
-
{connectedWalletsImages?.length ? (
|
|
123
|
-
connectedWalletsImages.map((walletImage, index) => (
|
|
124
|
-
<WalletImageContainer key={index}>
|
|
125
|
-
<Image src={walletImage} size={24} />
|
|
126
|
-
</WalletImageContainer>
|
|
127
|
-
))
|
|
128
|
-
) : (
|
|
129
|
-
<></>
|
|
130
|
-
)}
|
|
131
137
|
<div className="balance">
|
|
132
138
|
<Typography variant="body2">
|
|
133
139
|
{!connectedWallets?.length
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { styled, ChevronRightIcon, GasIcon,
|
|
2
|
+
import { styled, ChevronRightIcon, GasIcon, Divider } from '@rango-dev/ui';
|
|
3
3
|
import { BestRouteResponse } from 'rango-sdk';
|
|
4
4
|
|
|
5
5
|
export const Container = styled('div', {
|
|
@@ -47,7 +47,7 @@ function RoutesOverview(props: PropTypes) {
|
|
|
47
47
|
{props.totalFee ? (
|
|
48
48
|
<div className="fee">
|
|
49
49
|
<GasIcon size={12} />
|
|
50
|
-
<
|
|
50
|
+
<Divider size={4} direction="horizontal" />${props.totalFee}
|
|
51
51
|
</div>
|
|
52
52
|
) : null}
|
|
53
53
|
</Container>
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
TextField,
|
|
8
8
|
Typography,
|
|
9
9
|
Image,
|
|
10
|
-
|
|
10
|
+
Divider,
|
|
11
11
|
} from '@rango-dev/ui';
|
|
12
12
|
import { useMetaStore } from '../store/meta';
|
|
13
13
|
import { BlockchainMeta, Token } from 'rango-sdk';
|
|
@@ -201,7 +201,7 @@ export function TokenInfo(props: PropTypes) {
|
|
|
201
201
|
<Typography variant="body3" color="neutral600">{`${t(
|
|
202
202
|
'Balance'
|
|
203
203
|
)}: ${tokenBalance} ${fromToken?.symbol || ''}`}</Typography>
|
|
204
|
-
<
|
|
204
|
+
<Divider size={4} />
|
|
205
205
|
<Button type="primary" variant="ghost" size="compact">
|
|
206
206
|
{t('Max')}
|
|
207
207
|
</Button>
|
|
@@ -246,7 +246,7 @@ export function TokenInfo(props: PropTypes) {
|
|
|
246
246
|
? chain.displayName
|
|
247
247
|
: t('Chain')}
|
|
248
248
|
</Button>
|
|
249
|
-
<
|
|
249
|
+
<Divider size={12} direction="horizontal" />
|
|
250
250
|
<Button
|
|
251
251
|
className="selectors"
|
|
252
252
|
onClick={() => {
|
|
@@ -272,7 +272,7 @@ export function TokenInfo(props: PropTypes) {
|
|
|
272
272
|
>
|
|
273
273
|
{loadingStatus === 'success' && token ? token.symbol : t('Token')}
|
|
274
274
|
</Button>
|
|
275
|
-
<
|
|
275
|
+
<Divider size={12} direction="horizontal" />
|
|
276
276
|
<div className="amount">
|
|
277
277
|
{props.type === 'From' ? (
|
|
278
278
|
<TextField
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
InfoCircleIcon,
|
|
5
5
|
styled,
|
|
6
6
|
Typography,
|
|
7
|
-
|
|
7
|
+
Divider,
|
|
8
8
|
Image,
|
|
9
9
|
} from '@rango-dev/ui';
|
|
10
10
|
import { LoadingStatus } from '../store/meta';
|
|
@@ -157,7 +157,7 @@ export function TokenPreview(props: PropTypes) {
|
|
|
157
157
|
? chain.displayName
|
|
158
158
|
: t('Chain')}
|
|
159
159
|
</Button>
|
|
160
|
-
<
|
|
160
|
+
<Divider size={12} direction="horizontal" />
|
|
161
161
|
<Button
|
|
162
162
|
className="selectors"
|
|
163
163
|
variant="outlined"
|
|
@@ -175,7 +175,7 @@ export function TokenPreview(props: PropTypes) {
|
|
|
175
175
|
>
|
|
176
176
|
{loadingStatus === 'success' && token ? token.symbol : t('Token')}
|
|
177
177
|
</Button>
|
|
178
|
-
<
|
|
178
|
+
<Divider size={12} direction="horizontal" />
|
|
179
179
|
<div className="amount">
|
|
180
180
|
<OutputContainer>
|
|
181
181
|
<Typography variant="h4">{props.amount}</Typography>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Divider, styled, Typography } from '@rango-dev/ui';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
interface PropTypes {
|
|
@@ -34,7 +34,7 @@ export function BalanceErrors({ messages }: PropTypes) {
|
|
|
34
34
|
<Typography className="title" variant="title" color={'error'}>
|
|
35
35
|
Insufficent Balance:
|
|
36
36
|
</Typography>
|
|
37
|
-
<
|
|
37
|
+
<Divider size={8} />
|
|
38
38
|
<List showListStyle={showListStyle}>
|
|
39
39
|
{messages.map((warning, index) => (
|
|
40
40
|
<ListItem showListStyle={showListStyle} key={index}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Divider, Typography, styled } from '@rango-dev/ui';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChangeSlippageButton } from '../ChangeSlippageButton';
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ export function MinRequiredSlippage({ minRequiredSlippage }: PropTypes) {
|
|
|
16
16
|
We recommend you to increase slippage to at least
|
|
17
17
|
{minRequiredSlippage}
|
|
18
18
|
for this route.
|
|
19
|
-
<
|
|
19
|
+
<Divider size={8}/>
|
|
20
20
|
<ChangeSlippageButton />
|
|
21
21
|
</StyledMessage>
|
|
22
22
|
);
|
package/src/index.tsx
CHANGED
|
@@ -28,13 +28,7 @@ import { useUiStore } from './store/ui';
|
|
|
28
28
|
import { navigationRoutes } from './constants/navigationRoutes';
|
|
29
29
|
import { initConfig } from './utils/configs';
|
|
30
30
|
|
|
31
|
-
export {
|
|
32
|
-
WidgetConfig,
|
|
33
|
-
WalletType,
|
|
34
|
-
WidgetTheme,
|
|
35
|
-
WidgetColors,
|
|
36
|
-
BlockchainAndTokenConfig,
|
|
37
|
-
};
|
|
31
|
+
export { WidgetConfig, WidgetTheme, WidgetColors, BlockchainAndTokenConfig };
|
|
38
32
|
|
|
39
33
|
export type WidgetProps = {
|
|
40
34
|
config?: WidgetConfig;
|
|
@@ -18,7 +18,7 @@ import { useNavigateBack } from '../hooks/useNavigateBack';
|
|
|
18
18
|
import { TokenPreview } from '../components/TokenPreview';
|
|
19
19
|
// @ts-ignore // TODO: fix error in tsc build
|
|
20
20
|
import { t } from 'i18next';
|
|
21
|
-
import {
|
|
21
|
+
import { Divider, ConfirmSwap, LoadingFailedAlert } from '@rango-dev/ui';
|
|
22
22
|
import RoutesOverview from '../components/RoutesOverview';
|
|
23
23
|
import { useManager } from '@rango-dev/queue-manager-react';
|
|
24
24
|
import { useConfirmSwap } from '../hooks/useConfirmSwap';
|
|
@@ -66,14 +66,14 @@ export function ConfirmSwapPage() {
|
|
|
66
66
|
const selectedSlippage = customSlippage || slippage;
|
|
67
67
|
|
|
68
68
|
const showHighSlippageWarning = !errors.find(
|
|
69
|
-
|
|
69
|
+
error => error.type === ConfirmSwapErrorTypes.INSUFFICIENT_SLIPPAGE
|
|
70
70
|
);
|
|
71
71
|
|
|
72
72
|
const { getWalletInfo, connect } = useWallets();
|
|
73
73
|
const confirmDisabled =
|
|
74
74
|
fetchingBestRoute ||
|
|
75
|
-
!requiredWallets(bestRoute).every(
|
|
76
|
-
selectedWallets.map(
|
|
75
|
+
!requiredWallets(bestRoute).every(chain =>
|
|
76
|
+
selectedWallets.map(wallet => wallet.chain).includes(chain)
|
|
77
77
|
);
|
|
78
78
|
|
|
79
79
|
const firstStep = bestRoute?.result?.swaps[0];
|
|
@@ -94,8 +94,10 @@ export function ConfirmSwapPage() {
|
|
|
94
94
|
|
|
95
95
|
const handleConnectChain = (wallet: string) => {
|
|
96
96
|
const network = wallet as Network;
|
|
97
|
-
getKeplrCompatibleConnectedWallets(
|
|
98
|
-
|
|
97
|
+
getKeplrCompatibleConnectedWallets(
|
|
98
|
+
selectableWallets
|
|
99
|
+
).forEach((compatibleWallet: WalletType) =>
|
|
100
|
+
connect?.(compatibleWallet, network)
|
|
99
101
|
);
|
|
100
102
|
};
|
|
101
103
|
|
|
@@ -107,7 +109,7 @@ export function ConfirmSwapPage() {
|
|
|
107
109
|
selectableWallets={selectableWallets}
|
|
108
110
|
onBack={navigateBackFrom.bind(null, navigationRoutes.confirmSwap)}
|
|
109
111
|
onConfirm={async () => {
|
|
110
|
-
confirmSwap?.().then(async
|
|
112
|
+
confirmSwap?.().then(async swap => {
|
|
111
113
|
if (swap) {
|
|
112
114
|
try {
|
|
113
115
|
await manager?.create(
|
|
@@ -128,10 +130,10 @@ export function ConfirmSwapPage() {
|
|
|
128
130
|
}
|
|
129
131
|
});
|
|
130
132
|
}}
|
|
131
|
-
onChange={
|
|
133
|
+
onChange={wallet => setSelectedWallet(wallet)}
|
|
132
134
|
confirmDisabled={loadingMetaStatus !== 'success' || confirmDisabled}
|
|
133
|
-
handleConnectChain={
|
|
134
|
-
isExperimentalChain={
|
|
135
|
+
handleConnectChain={wallet => handleConnectChain(wallet)}
|
|
136
|
+
isExperimentalChain={wallet =>
|
|
135
137
|
getKeplrCompatibleConnectedWallets(selectableWallets).length > 0
|
|
136
138
|
? isExperimentalChain(blockchains, wallet)
|
|
137
139
|
: false
|
|
@@ -156,7 +158,7 @@ export function ConfirmSwapPage() {
|
|
|
156
158
|
: bestRouteloadingStatus
|
|
157
159
|
}
|
|
158
160
|
/>
|
|
159
|
-
<
|
|
161
|
+
<Divider size={12} />
|
|
160
162
|
<TokenPreview
|
|
161
163
|
chain={{
|
|
162
164
|
displayName: lastStep?.to.blockchain || '',
|
|
@@ -200,7 +202,7 @@ export function ConfirmSwapPage() {
|
|
|
200
202
|
<>
|
|
201
203
|
{loadingMetaStatus === 'failed' && <LoadingFailedAlert />}
|
|
202
204
|
{loadingMetaStatus === 'failed' && showHighSlippageWarning && (
|
|
203
|
-
<
|
|
205
|
+
<Divider />
|
|
204
206
|
)}
|
|
205
207
|
{showHighSlippageWarning && (
|
|
206
208
|
<ConfirmSwapExtraMessages selectedSlippage={selectedSlippage} />
|
|
@@ -8,7 +8,11 @@ import {
|
|
|
8
8
|
} from '@rango-dev/ui';
|
|
9
9
|
import React, { useEffect, useRef, useState } from 'react';
|
|
10
10
|
import { getlistWallet, sortWalletsBasedOnState } from '../utils/wallets';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
WalletType,
|
|
13
|
+
WalletTypes,
|
|
14
|
+
detectMobileScreens,
|
|
15
|
+
} from '@rango-dev/wallets-shared';
|
|
12
16
|
import { useWallets } from '@rango-dev/wallets-core';
|
|
13
17
|
|
|
14
18
|
import { useUiStore } from '../store/ui';
|
|
@@ -50,7 +54,7 @@ export function WalletsPage({ supportedWallets, multiWallets }: PropTypes) {
|
|
|
50
54
|
const wallets = getlistWallet(
|
|
51
55
|
state,
|
|
52
56
|
getWalletInfo,
|
|
53
|
-
supportedWallets || Object.values(
|
|
57
|
+
supportedWallets || Object.values(WalletTypes)
|
|
54
58
|
);
|
|
55
59
|
const walletsRef = useRef<WalletInfo[]>();
|
|
56
60
|
|
package/src/utils/wallets.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
WalletType,
|
|
8
8
|
detectInstallLink,
|
|
9
9
|
WalletInfo,
|
|
10
|
+
WalletTypes,
|
|
10
11
|
} from '@rango-dev/wallets-shared';
|
|
11
12
|
|
|
12
13
|
import {
|
|
@@ -42,7 +43,7 @@ export function getStateWallet(state: WalletState): WalletStatus {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
export const excludedWallets = [
|
|
46
|
+
export const excludedWallets = [WalletTypes.LEAP];
|
|
46
47
|
|
|
47
48
|
export function getlistWallet(
|
|
48
49
|
getState: (type: WalletType) => WalletState,
|
|
@@ -50,7 +51,7 @@ export function getlistWallet(
|
|
|
50
51
|
list: WalletType[]
|
|
51
52
|
): ModalWalletInfo[] {
|
|
52
53
|
return list
|
|
53
|
-
.filter((wallet) => !excludedWallets.includes(wallet))
|
|
54
|
+
.filter((wallet) => !excludedWallets.includes(wallet as WalletTypes))
|
|
54
55
|
.map((type) => {
|
|
55
56
|
const {
|
|
56
57
|
name,
|
|
@@ -377,7 +378,9 @@ export const getKeplrCompatibleConnectedWallets = (
|
|
|
377
378
|
selectableWallets: SelectableWallet[]
|
|
378
379
|
): WalletType[] => {
|
|
379
380
|
const connectedWalletTypes = new Set(
|
|
380
|
-
selectableWallets.map((
|
|
381
|
+
selectableWallets.map((wallet) => {
|
|
382
|
+
return wallet.walletType;
|
|
383
|
+
})
|
|
381
384
|
);
|
|
382
385
|
|
|
383
386
|
return KEPLR_COMPATIBLE_WALLETS.filter((compatibleWallet) =>
|