@rango-dev/widget-embedded 0.60.2-next.0 → 0.60.2-next.10
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/CustomTokenModal/CustomTokenModal.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/DerivationPath.helpers.d.ts +1 -1
- package/dist/components/WalletStatefulConnect/DerivationPath.helpers.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/Detached.types.d.ts +1 -1
- package/dist/components/WalletStatefulConnect/Detached.types.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/Namespaces.types.d.ts +2 -2
- package/dist/components/WalletStatefulConnect/Namespaces.types.d.ts.map +1 -1
- package/dist/containers/Wallets/Wallets.d.ts.map +1 -1
- package/dist/hooks/useStatefulConnect/useStatefulConnect.d.ts +1 -1
- package/dist/hooks/useStatefulConnect/useStatefulConnect.d.ts.map +1 -1
- package/dist/hooks/useStatefulConnect/useStatefulConnect.state.d.ts +1 -1
- package/dist/hooks/useStatefulConnect/useStatefulConnect.state.d.ts.map +1 -1
- package/dist/hooks/useStatefulConnect/useStatefulConnect.types.d.ts +1 -1
- package/dist/hooks/useStatefulConnect/useStatefulConnect.types.d.ts.map +1 -1
- package/dist/hooks/useWalletProviders/useWalletProviders.d.ts +1 -1
- package/dist/hooks/useWalletProviders/useWalletProviders.helpers.d.ts +1 -1
- package/dist/hooks/useWalletProviders/useWalletProviders.helpers.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/dist/store/slices/config.d.ts +1 -1
- package/dist/store/slices/config.d.ts.map +1 -1
- package/dist/store/slices/wallets.d.ts +1 -1
- package/dist/store/slices/wallets.d.ts.map +1 -1
- package/dist/store/utils/wallets.d.ts +1 -1
- package/dist/store/utils/wallets.d.ts.map +1 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/meta.d.ts +4 -0
- package/dist/utils/meta.d.ts.map +1 -1
- package/dist/utils/providers.d.ts +2 -1
- package/dist/utils/providers.d.ts.map +1 -1
- package/dist/utils/wallets.d.ts.map +1 -1
- package/dist/widget-embedded.build.json +1 -1
- package/package.json +11 -8
- package/src/components/CustomTokenModal/CustomTokenModal.tsx +7 -2
- package/src/components/StatefulConnectModal/StatefulConnectModal.tsx +1 -1
- package/src/components/TokenList/TokenList.tsx +18 -15
- package/src/components/WalletStatefulConnect/DerivationPath.helpers.ts +1 -1
- package/src/components/WalletStatefulConnect/Detached.tsx +2 -2
- package/src/components/WalletStatefulConnect/Detached.types.ts +1 -1
- package/src/components/WalletStatefulConnect/Namespaces.tsx +1 -1
- package/src/components/WalletStatefulConnect/Namespaces.types.tsx +2 -2
- package/src/containers/Wallets/Wallets.tsx +3 -0
- package/src/hooks/useStatefulConnect/useStatefulConnect.state.ts +1 -1
- package/src/hooks/useStatefulConnect/useStatefulConnect.ts +1 -1
- package/src/hooks/useStatefulConnect/useStatefulConnect.types.ts +1 -1
- package/src/hooks/useWalletProviders/useWalletProviders.helpers.ts +1 -1
- package/src/store/slices/config.ts +1 -4
- package/src/store/slices/wallets.ts +1 -1
- package/src/store/utils/wallets.ts +1 -1
- package/src/types/config.ts +1 -1
- package/src/utils/meta.ts +13 -0
- package/src/utils/providers.ts +2 -2
- package/src/utils/wallets.ts +9 -0
- package/dist/components/CustomTokenModal/CustomTokenModal.helpers.d.ts +0 -3
- package/dist/components/CustomTokenModal/CustomTokenModal.helpers.d.ts.map +0 -1
- package/src/components/CustomTokenModal/CustomTokenModal.helpers.ts +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.60.2-next.
|
|
3
|
+
"version": "0.60.2-next.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -22,18 +22,21 @@
|
|
|
22
22
|
"test:coverage": "vitest run --coverage"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"@hub3js/core": "^0.60.1",
|
|
26
|
+
"@hub3js/namespaces": "^0.1.1",
|
|
27
|
+
"@hub3js/std": "^0.1.1",
|
|
25
28
|
"@lingui/core": "4.2.1",
|
|
26
29
|
"@lingui/react": "4.2.1",
|
|
27
|
-
"@rango-dev/logging-core": "^0.12.
|
|
28
|
-
"@rango-dev/provider-all": "^0.62.2-next.
|
|
30
|
+
"@rango-dev/logging-core": "^0.12.2-next.0",
|
|
31
|
+
"@rango-dev/provider-all": "^0.62.2-next.6",
|
|
29
32
|
"@rango-dev/queue-manager-core": "^0.33.0",
|
|
30
|
-
"@rango-dev/queue-manager-rango-preset": "^0.62.1-next.
|
|
33
|
+
"@rango-dev/queue-manager-rango-preset": "^0.62.1-next.5",
|
|
31
34
|
"@rango-dev/queue-manager-react": "^0.33.0",
|
|
32
35
|
"@rango-dev/signer-solana": "^0.48.0",
|
|
33
|
-
"@rango-dev/ui": "^0.63.1-next.
|
|
34
|
-
"@rango-dev/wallets-core": "^0.59.1-next.
|
|
35
|
-
"@rango-dev/wallets-react": "^0.46.1-next.
|
|
36
|
-
"@rango-dev/wallets-shared": "^0.60.1-next.
|
|
36
|
+
"@rango-dev/ui": "^0.63.1-next.4",
|
|
37
|
+
"@rango-dev/wallets-core": "^0.59.1-next.2",
|
|
38
|
+
"@rango-dev/wallets-react": "^0.46.1-next.4",
|
|
39
|
+
"@rango-dev/wallets-shared": "^0.60.1-next.3",
|
|
37
40
|
"bignumber.js": "^9.1.1",
|
|
38
41
|
"copy-to-clipboard": "^3.3.3",
|
|
39
42
|
"crypto-browserify": "^3.12.1",
|
|
@@ -13,10 +13,10 @@ import React from 'react';
|
|
|
13
13
|
|
|
14
14
|
import { DEFAULT_TOKEN_IMAGE_SRC } from '../../constants/customTokens';
|
|
15
15
|
import { getContainer } from '../../utils/common';
|
|
16
|
+
import { createTokenExplorerUrl } from '../../utils/meta';
|
|
16
17
|
import { WatermarkedModal } from '../common/WatermarkedModal';
|
|
17
18
|
|
|
18
19
|
import { CUSTOM_TOKEN_LEARN_MORE_LINK } from './CustomTokenModal.constants';
|
|
19
|
-
import { generateExplorerLink } from './CustomTokenModal.helpers';
|
|
20
20
|
import {
|
|
21
21
|
Container,
|
|
22
22
|
FlexCenteredContainer,
|
|
@@ -29,7 +29,12 @@ const MAX_SYMBOL_LENGTH_THRESHOLD = 9;
|
|
|
29
29
|
export function CustomTokenModal(props: PropTypes) {
|
|
30
30
|
const { open, onClose, token, onExit, onSubmitClick, blockchain } = props;
|
|
31
31
|
|
|
32
|
-
const explorerLink =
|
|
32
|
+
const explorerLink = token.address
|
|
33
|
+
? createTokenExplorerUrl({
|
|
34
|
+
contractAddress: token.address,
|
|
35
|
+
blockchainMeta: blockchain,
|
|
36
|
+
})
|
|
37
|
+
: undefined;
|
|
33
38
|
|
|
34
39
|
const onClickLearnMore = () =>
|
|
35
40
|
window.open(CUSTOM_TOKEN_LEARN_MORE_LINK, '_blank');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Result } from '../../hooks/useStatefulConnect';
|
|
2
2
|
import type { WalletInfoWithExtra } from '../../types';
|
|
3
|
-
import type { Namespace } from '@
|
|
3
|
+
import type { Namespace } from '@hub3js/namespaces';
|
|
4
4
|
|
|
5
5
|
import { Divider } from '@rango-dev/ui';
|
|
6
6
|
import React, { useEffect, useRef, useState } from 'react';
|
|
@@ -25,7 +25,7 @@ import { useAppStore } from '../../store/AppStore';
|
|
|
25
25
|
import { useQuoteStore } from '../../store/quote';
|
|
26
26
|
import { createTintsAndShades } from '../../utils/colors';
|
|
27
27
|
import { getContainer } from '../../utils/common';
|
|
28
|
-
import { findBlockchain } from '../../utils/meta';
|
|
28
|
+
import { createTokenExplorerUrl, findBlockchain } from '../../utils/meta';
|
|
29
29
|
import { formatBalance } from '../../utils/wallets';
|
|
30
30
|
import { ImportCustomToken } from '../ImportCustomToken';
|
|
31
31
|
|
|
@@ -81,8 +81,7 @@ const renderDesc = (props: RenderDescProps) => {
|
|
|
81
81
|
<div
|
|
82
82
|
className={`${tokenAddressStyles()} ${
|
|
83
83
|
!name && tokenWithoutNameStyles()
|
|
84
|
-
}`}
|
|
85
|
-
>
|
|
84
|
+
}`}>
|
|
86
85
|
{length > 10
|
|
87
86
|
? `${address.slice(0, 5)}...${address.slice(length - 6, length)}`
|
|
88
87
|
: address}{' '}
|
|
@@ -91,8 +90,7 @@ const renderDesc = (props: RenderDescProps) => {
|
|
|
91
90
|
href={url}
|
|
92
91
|
target="_blank"
|
|
93
92
|
rel="nofollow noreferrer"
|
|
94
|
-
onClick={(e) => e.stopPropagation()}
|
|
95
|
-
>
|
|
93
|
+
onClick={(e) => e.stopPropagation()}>
|
|
96
94
|
<ExternalLinkIcon size={12} />
|
|
97
95
|
</StyledLink>
|
|
98
96
|
</div>
|
|
@@ -153,8 +151,7 @@ export function TokenList(props: PropTypes) {
|
|
|
153
151
|
type="primary"
|
|
154
152
|
size="small"
|
|
155
153
|
className="widget-token-list-item-import-btn"
|
|
156
|
-
onClick={handleClick}
|
|
157
|
-
>
|
|
154
|
+
onClick={handleClick}>
|
|
158
155
|
<Typography variant="body" size="xsmall" color="background">
|
|
159
156
|
{t('import')}
|
|
160
157
|
</Typography>
|
|
@@ -187,8 +184,7 @@ export function TokenList(props: PropTypes) {
|
|
|
187
184
|
<Typography
|
|
188
185
|
variant="body"
|
|
189
186
|
className={usdValueStyles()}
|
|
190
|
-
size="xsmall"
|
|
191
|
-
>
|
|
187
|
+
size="xsmall">
|
|
192
188
|
{`$${tokenBalance.usdValue}`}
|
|
193
189
|
</Typography>
|
|
194
190
|
)}
|
|
@@ -266,6 +262,13 @@ export function TokenList(props: PropTypes) {
|
|
|
266
262
|
}
|
|
267
263
|
};
|
|
268
264
|
|
|
265
|
+
const url = address
|
|
266
|
+
? createTokenExplorerUrl({
|
|
267
|
+
contractAddress: address,
|
|
268
|
+
blockchainMeta: blockchain,
|
|
269
|
+
})
|
|
270
|
+
: undefined;
|
|
271
|
+
|
|
269
272
|
return (
|
|
270
273
|
<ListItemContainer>
|
|
271
274
|
<StyledListItemButton
|
|
@@ -306,8 +309,7 @@ export function TokenList(props: PropTypes) {
|
|
|
306
309
|
<TagTitle
|
|
307
310
|
variant="body"
|
|
308
311
|
size="xsmall"
|
|
309
|
-
css={customCssForTagTitle}
|
|
310
|
-
>
|
|
312
|
+
css={customCssForTagTitle}>
|
|
311
313
|
{token.blockchain}
|
|
312
314
|
</TagTitle>
|
|
313
315
|
</Tag>
|
|
@@ -321,16 +323,17 @@ export function TokenList(props: PropTypes) {
|
|
|
321
323
|
) : undefined
|
|
322
324
|
}
|
|
323
325
|
description={
|
|
324
|
-
typeof token !== 'string' &&
|
|
326
|
+
typeof token !== 'string' &&
|
|
327
|
+
!!blockchain.info &&
|
|
328
|
+
!!address &&
|
|
329
|
+
!!url
|
|
325
330
|
? renderDesc({
|
|
326
331
|
address,
|
|
327
332
|
token,
|
|
328
333
|
customCssForTag,
|
|
329
334
|
customCssForTagTitle,
|
|
330
335
|
name: token.name,
|
|
331
|
-
url
|
|
332
|
-
.split('{wallet}')
|
|
333
|
-
.join(address),
|
|
336
|
+
url,
|
|
334
337
|
})
|
|
335
338
|
: token.name || undefined
|
|
336
339
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropTypes } from './Detached.types';
|
|
2
|
+
import type { Namespace } from '@hub3js/namespaces';
|
|
2
3
|
import type { LegacyNamespaceMeta } from '@rango-dev/wallets-core/legacy';
|
|
3
|
-
import type { Namespace } from '@rango-dev/wallets-core/namespaces/common';
|
|
4
4
|
|
|
5
5
|
import { i18n } from '@lingui/core';
|
|
6
6
|
import {
|
|
@@ -161,7 +161,7 @@ export function Detached(props: PropTypes) {
|
|
|
161
161
|
<MessageBox
|
|
162
162
|
type="info"
|
|
163
163
|
title={i18n.t(`Connect {wallet}`, {
|
|
164
|
-
wallet: targetWallet.
|
|
164
|
+
wallet: targetWallet.title,
|
|
165
165
|
})}
|
|
166
166
|
description={i18n.t(
|
|
167
167
|
'This wallet supports multiple chains. Choose which chains you’d like to connect or disconnect.'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NeedsNamespacesState } from '../../hooks/useStatefulConnect';
|
|
2
|
-
import type { Namespace } from '@
|
|
2
|
+
import type { Namespace } from '@hub3js/namespaces';
|
|
3
3
|
|
|
4
4
|
export interface PropTypes {
|
|
5
5
|
value: NeedsNamespacesState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NeedsNamespacesState } from '../../hooks/useStatefulConnect';
|
|
2
|
+
import type { NamespaceData } from '@hub3js/core/store';
|
|
3
|
+
import type { Namespace } from '@hub3js/namespaces';
|
|
2
4
|
import type { LegacyNamespaceMeta } from '@rango-dev/wallets-core/legacy';
|
|
3
|
-
import type { Namespace } from '@rango-dev/wallets-core/namespaces/common';
|
|
4
|
-
import type { NamespaceData } from '@rango-dev/wallets-core/store';
|
|
5
5
|
|
|
6
6
|
export interface PropTypes {
|
|
7
7
|
onConfirm: (namespaces: Namespace[]) => void;
|
|
@@ -109,6 +109,9 @@ function Main(props: PropsWithChildren<PropTypes>) {
|
|
|
109
109
|
[WalletTypes.TON_CONNECT]: {
|
|
110
110
|
provider: { manifestUrl: config.tonConnect?.manifestUrl },
|
|
111
111
|
},
|
|
112
|
+
[WalletTypes.TREZOR]: {
|
|
113
|
+
provider: { manifest: config.trezorManifest },
|
|
114
|
+
},
|
|
112
115
|
},
|
|
113
116
|
}}>
|
|
114
117
|
{props.children}
|
|
@@ -3,7 +3,7 @@ import type {
|
|
|
3
3
|
NeedsDerivationPathState,
|
|
4
4
|
NeedsNamespacesState,
|
|
5
5
|
} from './useStatefulConnect.types';
|
|
6
|
-
import type { Namespace } from '@
|
|
6
|
+
import type { Namespace } from '@hub3js/namespaces';
|
|
7
7
|
|
|
8
8
|
export interface State {
|
|
9
9
|
status: 'init' | 'namespace' | 'derivationPath' | 'detached';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HandleConnectOptions, Result } from './useStatefulConnect.types';
|
|
2
2
|
import type { WalletInfoWithExtra } from '../../types';
|
|
3
|
-
import type { Namespace } from '@
|
|
3
|
+
import type { Namespace } from '@hub3js/namespaces';
|
|
4
4
|
import type { NamespaceData } from '@rango-dev/wallets-shared';
|
|
5
5
|
|
|
6
6
|
import { WalletState } from '@rango-dev/ui';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExtendedModalWalletInfo } from '../../utils/wallets';
|
|
2
|
-
import type { Namespace } from '@
|
|
2
|
+
import type { Namespace } from '@hub3js/namespaces';
|
|
3
3
|
|
|
4
4
|
export interface HandleConnectOptions {
|
|
5
5
|
// To have a switch between connect and disconnect when user is clicking on a button, this option can be helpful.
|
|
@@ -2,9 +2,9 @@ import type { DataSlice } from './data';
|
|
|
2
2
|
import type { SettingsSlice } from './settings';
|
|
3
3
|
import type { WidgetConfig } from '../../types';
|
|
4
4
|
import type { StateCreatorWithInitialData } from '../app';
|
|
5
|
+
import type { VersionedProviders } from '@hub3js/core/utils';
|
|
5
6
|
|
|
6
7
|
import { allProviders as getAllProviders } from '@rango-dev/provider-all';
|
|
7
|
-
import { type VersionedProviders } from '@rango-dev/wallets-core';
|
|
8
8
|
|
|
9
9
|
import { cacheService } from '../../services/cacheService';
|
|
10
10
|
import {
|
|
@@ -93,9 +93,6 @@ function generateProviders(config: WidgetConfig) {
|
|
|
93
93
|
options?.walletConnectListedDesktopWalletLink,
|
|
94
94
|
},
|
|
95
95
|
selectedProviders: config.wallets,
|
|
96
|
-
trezor: options?.trezorManifest
|
|
97
|
-
? { manifest: options.trezorManifest }
|
|
98
|
-
: undefined,
|
|
99
96
|
tonConnect: options?.tonConnect?.manifestUrl
|
|
100
97
|
? { manifestUrl: options?.tonConnect.manifestUrl }
|
|
101
98
|
: undefined,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AppStoreState } from './types';
|
|
2
|
-
import type { Namespace } from '@
|
|
2
|
+
import type { Namespace } from '@hub3js/namespaces';
|
|
3
3
|
import type { Asset, Token, WalletDetail } from 'rango-sdk';
|
|
4
4
|
|
|
5
5
|
import BigNumber from 'bignumber.js';
|
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
BalanceState,
|
|
9
9
|
ConnectedWallet,
|
|
10
10
|
} from '../slices/wallets';
|
|
11
|
-
import type { Namespace } from '@
|
|
11
|
+
import type { Namespace } from '@hub3js/namespaces';
|
|
12
12
|
import type { Asset, WalletDetail } from 'rango-types';
|
|
13
13
|
|
|
14
14
|
import BigNumber from 'bignumber.js';
|
package/src/types/config.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Provider } from '@hub3js/core';
|
|
1
2
|
import type { Language, theme } from '@rango-dev/ui';
|
|
2
|
-
import type { Provider } from '@rango-dev/wallets-core';
|
|
3
3
|
import type { LegacyProviderInterface } from '@rango-dev/wallets-core/legacy';
|
|
4
4
|
import type { WalletType } from '@rango-dev/wallets-shared';
|
|
5
5
|
import type { Asset } from 'rango-sdk';
|
package/src/utils/meta.ts
CHANGED
|
@@ -70,3 +70,16 @@ export function isValidTokenAddress(
|
|
|
70
70
|
const valid = regex.filter((r) => new RegExp(r).test(address)).length > 0;
|
|
71
71
|
return valid;
|
|
72
72
|
}
|
|
73
|
+
|
|
74
|
+
export function createTokenExplorerUrl(params: {
|
|
75
|
+
contractAddress: string;
|
|
76
|
+
blockchainMeta: BlockchainMeta;
|
|
77
|
+
}): string | undefined {
|
|
78
|
+
const { contractAddress, blockchainMeta } = params;
|
|
79
|
+
|
|
80
|
+
if (blockchainMeta.info?.tokenUrl) {
|
|
81
|
+
return blockchainMeta.info.tokenUrl.replace('{address}', contractAddress);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return blockchainMeta.info?.addressUrl.replace('{wallet}', contractAddress);
|
|
85
|
+
}
|
package/src/utils/providers.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { WidgetConfig } from '../types';
|
|
2
2
|
import type { LegacyProviderInterface } from '@rango-dev/wallets-core/legacy';
|
|
3
3
|
|
|
4
|
+
import { Provider } from '@hub3js/core';
|
|
4
5
|
import {
|
|
5
6
|
defineVersions,
|
|
6
7
|
pickVersion,
|
|
7
|
-
Provider,
|
|
8
8
|
type VersionedProviders,
|
|
9
|
-
} from '@
|
|
9
|
+
} from '@hub3js/core/utils';
|
|
10
10
|
|
|
11
11
|
export interface ProvidersOptions {
|
|
12
12
|
walletConnectProjectId?: WidgetConfig['walletConnectProjectId'];
|
package/src/utils/wallets.ts
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
import { legacyReadAccountAddress as readAccountAddress } from '@rango-dev/wallets-core/legacy';
|
|
24
24
|
import {
|
|
25
25
|
detectInstallLink,
|
|
26
|
+
HYPERLIQUID_SIGN_NETWORK,
|
|
26
27
|
isEvmAddress,
|
|
27
28
|
Networks,
|
|
28
29
|
} from '@rango-dev/wallets-shared';
|
|
@@ -223,6 +224,14 @@ export function prepareAccountsForWalletStore(
|
|
|
223
224
|
*/
|
|
224
225
|
addAccount(network, address.toLowerCase());
|
|
225
226
|
});
|
|
227
|
+
|
|
228
|
+
const shouldAddHyperliquidAccount = evmChainsSupportedByWallet.includes(
|
|
229
|
+
HYPERLIQUID_SIGN_NETWORK
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
if (shouldAddHyperliquidAccount) {
|
|
233
|
+
addAccount(Networks.HYPERLIQUID, address.toLowerCase());
|
|
234
|
+
}
|
|
226
235
|
}
|
|
227
236
|
} else {
|
|
228
237
|
addAccount(network, address);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomTokenModal.helpers.d.ts","sourceRoot":"","sources":["../../../src/components/CustomTokenModal/CustomTokenModal.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,UAAU,EAAE,cAAc,GACzB,MAAM,CAQR"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { BlockchainMeta } from 'rango-types';
|
|
2
|
-
|
|
3
|
-
export function generateExplorerLink(
|
|
4
|
-
address: string | null,
|
|
5
|
-
blockchain: BlockchainMeta
|
|
6
|
-
): string {
|
|
7
|
-
const explorerLinkPattern = blockchain.info?.addressUrl;
|
|
8
|
-
|
|
9
|
-
if (!explorerLinkPattern || !address) {
|
|
10
|
-
return '';
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return explorerLinkPattern.replace('{wallet}', address);
|
|
14
|
-
}
|