@rango-dev/widget-embedded 0.30.0 → 0.30.1-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 +46 -0
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
- package/dist/components/WalletDerivationPathModal/WalletDerivationPathModal.d.ts.map +1 -1
- package/dist/components/WalletNamespacesModal/WalletNamespacesModal.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/dist/widget-embedded.build.json +1 -1
- package/package.json +8 -8
- package/src/components/SwapDetails/SwapDetails.styles.ts +10 -0
- package/src/components/SwapDetails/SwapDetails.tsx +24 -6
- package/src/components/WalletDerivationPathModal/WalletDerivationPathModal.tsx +1 -1
- package/src/components/WalletNamespacesModal/WalletNamespacesModal.tsx +1 -1
- package/dist/constants/namespaces.d.ts +0 -8
- package/dist/constants/namespaces.d.ts.map +0 -1
- package/src/constants/namespaces.ts +0 -62
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.1-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@lingui/core": "4.2.1",
|
|
26
26
|
"@lingui/react": "4.2.1",
|
|
27
|
-
"@rango-dev/logging-core": "^0.5.0",
|
|
28
|
-
"@rango-dev/provider-all": "^0.35.0",
|
|
27
|
+
"@rango-dev/logging-core": "^0.5.1-next.0",
|
|
28
|
+
"@rango-dev/provider-all": "^0.35.2-next.0",
|
|
29
29
|
"@rango-dev/queue-manager-core": "^0.26.0",
|
|
30
|
-
"@rango-dev/queue-manager-rango-preset": "^0.35.0",
|
|
30
|
+
"@rango-dev/queue-manager-rango-preset": "^0.35.2-next.0",
|
|
31
31
|
"@rango-dev/queue-manager-react": "^0.26.0",
|
|
32
|
-
"@rango-dev/signer-solana": "^0.30.0",
|
|
33
|
-
"@rango-dev/ui": "^0.36.
|
|
34
|
-
"@rango-dev/wallets-react": "^0.21.0",
|
|
35
|
-
"@rango-dev/wallets-shared": "^0.35.
|
|
32
|
+
"@rango-dev/signer-solana": "^0.30.1-next.0",
|
|
33
|
+
"@rango-dev/ui": "^0.36.1-next.1",
|
|
34
|
+
"@rango-dev/wallets-react": "^0.21.2-next.0",
|
|
35
|
+
"@rango-dev/wallets-shared": "^0.35.1",
|
|
36
36
|
"bignumber.js": "^9.1.1",
|
|
37
37
|
"copy-to-clipboard": "^3.3.3",
|
|
38
38
|
"dayjs": "^1.11.7",
|
|
@@ -11,6 +11,16 @@ export const Container = styled('div', {
|
|
|
11
11
|
|
|
12
12
|
export const HeaderDetails = styled('div', {
|
|
13
13
|
width: '100%',
|
|
14
|
+
'& ._icon-button': {
|
|
15
|
+
'&:hover': {
|
|
16
|
+
'& svg': {
|
|
17
|
+
color: '$secondary550',
|
|
18
|
+
[`.${darkTheme} &`]: {
|
|
19
|
+
color: '$secondary500',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
14
24
|
});
|
|
15
25
|
|
|
16
26
|
export const StepsList = styled(ScrollableArea, {
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
Button,
|
|
12
12
|
CopyIcon,
|
|
13
13
|
Divider,
|
|
14
|
+
DoneIcon,
|
|
14
15
|
IconButton,
|
|
15
16
|
QuoteCost,
|
|
16
17
|
RangoExplorerIcon,
|
|
@@ -88,7 +89,7 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
88
89
|
const retry = useQuoteStore.use.retry();
|
|
89
90
|
const isActiveTab = useUiStore.use.isActiveTab();
|
|
90
91
|
const navigate = useNavigate();
|
|
91
|
-
const [
|
|
92
|
+
const [isCopied, handleCopy] = useCopyToClipboard(RESET_INTERVAL);
|
|
92
93
|
const listRef = useRef<HTMLDivElement | null>(null);
|
|
93
94
|
const [modalState, setModalState] = useState<ModalState>(null);
|
|
94
95
|
const [showCompletedModal, setShowCompletedModal] = useState<
|
|
@@ -318,11 +319,28 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
318
319
|
<Typography variant="label" size="small" color="neutral700">
|
|
319
320
|
{requestId}
|
|
320
321
|
</Typography>
|
|
321
|
-
<
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
322
|
+
<Tooltip
|
|
323
|
+
container={getContainer()}
|
|
324
|
+
content={
|
|
325
|
+
isCopied
|
|
326
|
+
? i18n.t('Copied To Clipboard')
|
|
327
|
+
: i18n.t('Copy Request ID')
|
|
328
|
+
}
|
|
329
|
+
open={isCopied || undefined}
|
|
330
|
+
side="bottom"
|
|
331
|
+
alignOffset={-16}
|
|
332
|
+
align="end">
|
|
333
|
+
<IconButton
|
|
334
|
+
variant="ghost"
|
|
335
|
+
onClick={handleCopy.bind(null, requestId || '')}>
|
|
336
|
+
{isCopied ? (
|
|
337
|
+
<DoneIcon size={16} color="secondary" />
|
|
338
|
+
) : (
|
|
339
|
+
<CopyIcon size={16} color="gray" />
|
|
340
|
+
)}
|
|
341
|
+
</IconButton>
|
|
342
|
+
</Tooltip>
|
|
343
|
+
|
|
326
344
|
<StyledLink
|
|
327
345
|
target="_blank"
|
|
328
346
|
href={`${SCANNER_BASE_URL}/swap/${requestId}`}>
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
Select,
|
|
11
11
|
TextField,
|
|
12
12
|
} from '@rango-dev/ui';
|
|
13
|
+
import { namespaces } from '@rango-dev/wallets-shared';
|
|
13
14
|
import React, { useEffect, useState } from 'react';
|
|
14
15
|
|
|
15
16
|
import { WIDGET_UI_ID } from '../../constants';
|
|
16
|
-
import { namespaces } from '../../constants/namespaces';
|
|
17
17
|
import { WatermarkedModal } from '../common/WatermarkedModal';
|
|
18
18
|
import {
|
|
19
19
|
LogoContainer,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
Radio,
|
|
14
14
|
RadioRoot,
|
|
15
15
|
} from '@rango-dev/ui';
|
|
16
|
+
import { namespaces } from '@rango-dev/wallets-shared';
|
|
16
17
|
import React, { useMemo, useState } from 'react';
|
|
17
18
|
|
|
18
19
|
import { WIDGET_UI_ID } from '../../constants';
|
|
19
|
-
import { namespaces } from '../../constants/namespaces';
|
|
20
20
|
import { useAppStore } from '../../store/AppStore';
|
|
21
21
|
import { WatermarkedModal } from '../common/WatermarkedModal';
|
|
22
22
|
import { WalletImageContainer } from '../HeaderButtons/HeaderButtons.styles';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { DerivationPath } from '@rango-dev/wallets-shared';
|
|
2
|
-
import { Namespace } from '@rango-dev/wallets-shared';
|
|
3
|
-
export declare const namespaces: Record<Namespace, {
|
|
4
|
-
mainBlockchain: string;
|
|
5
|
-
title: string;
|
|
6
|
-
derivationPaths?: DerivationPath[];
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=namespaces.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../../src/constants/namespaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,eAAO,MAAM,UAAU,EAAE,MAAM,CAC7B,SAAS,EACT;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;CAAE,CAuD9E,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { DerivationPath } from '@rango-dev/wallets-shared';
|
|
2
|
-
|
|
3
|
-
import { Namespace } from '@rango-dev/wallets-shared';
|
|
4
|
-
|
|
5
|
-
export const namespaces: Record<
|
|
6
|
-
Namespace,
|
|
7
|
-
{ mainBlockchain: string; title: string; derivationPaths?: DerivationPath[] }
|
|
8
|
-
> = {
|
|
9
|
-
[Namespace.Evm]: {
|
|
10
|
-
mainBlockchain: 'ETH',
|
|
11
|
-
title: 'Ethereum',
|
|
12
|
-
derivationPaths: [
|
|
13
|
-
{
|
|
14
|
-
id: 'metamask',
|
|
15
|
-
label: `Metamask (m/44'/60'/0'/0/index)`,
|
|
16
|
-
generateDerivationPath: (index: string) => `44'/60'/0'/0/${index}`,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
id: 'ledgerLive',
|
|
20
|
-
label: `LedgerLive (m/44'/60'/index'/0/0)`,
|
|
21
|
-
generateDerivationPath: (index: string) => `44'/60'/${index}'/0/0`,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: 'legacy',
|
|
25
|
-
label: `Legacy (m/44'/60'/0'/index)`,
|
|
26
|
-
generateDerivationPath: (index: string) => `44'/60'/0'/${index}`,
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
[Namespace.Solana]: {
|
|
31
|
-
mainBlockchain: 'SOLANA',
|
|
32
|
-
title: 'Solana',
|
|
33
|
-
derivationPaths: [
|
|
34
|
-
{
|
|
35
|
-
id: `(m/44'/501'/index')`,
|
|
36
|
-
label: `(m/44'/501'/index')`,
|
|
37
|
-
generateDerivationPath: (index: string) => `44'/501'/${index}'`,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: `(m/44'/501'/0'/index)`,
|
|
41
|
-
label: `(m/44'/501'/0'/index)`,
|
|
42
|
-
generateDerivationPath: (index: string) => `44'/501'/0'/${index}`,
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
[Namespace.Cosmos]: {
|
|
47
|
-
mainBlockchain: 'COSMOS',
|
|
48
|
-
title: 'Cosmos',
|
|
49
|
-
},
|
|
50
|
-
[Namespace.Utxo]: {
|
|
51
|
-
mainBlockchain: 'BTC',
|
|
52
|
-
title: 'Utxo',
|
|
53
|
-
},
|
|
54
|
-
[Namespace.Starknet]: {
|
|
55
|
-
title: 'Starknet',
|
|
56
|
-
mainBlockchain: 'STARKNET',
|
|
57
|
-
},
|
|
58
|
-
[Namespace.Tron]: {
|
|
59
|
-
title: 'Tron',
|
|
60
|
-
mainBlockchain: 'TRON',
|
|
61
|
-
},
|
|
62
|
-
};
|