@cfxjs/sirius-next-common 0.2.17 → 0.2.19
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/{chunk-SX6R4MHO.js → chunk-2WEBXRNL.js} +2 -2
- package/dist/{chunk-CNF26YY7.js → chunk-6L4ZEJQI.js} +2 -2
- package/dist/{chunk-2KXTTKRI.js → chunk-7AVQOIDM.js} +2 -2
- package/dist/{chunk-ZLNQICQZ.js → chunk-7VQL3G7K.js} +4 -4
- package/dist/{chunk-GSWIFV2B.js → chunk-AYCHKB2Y.js} +2 -2
- package/dist/{chunk-E3ZD2GGG.js → chunk-BEI5TWJL.js} +2 -2
- package/dist/{chunk-CKVDFS45.js → chunk-BHAXBHVC.js} +8 -13
- package/dist/chunk-BHAXBHVC.js.map +1 -0
- package/dist/{chunk-7OSADJ6H.js → chunk-C3E5EA6J.js} +23 -9
- package/dist/chunk-C3E5EA6J.js.map +1 -0
- package/dist/{chunk-LBWKTQYK.js → chunk-C6CGZ6KN.js} +2 -2
- package/dist/{chunk-P4EE3QGM.js → chunk-C7OIVXE3.js} +3 -3
- package/dist/{chunk-BUSBM33B.js → chunk-CMOP3BKX.js} +3 -3
- package/dist/{chunk-6H5A42YS.js → chunk-DCQANK66.js} +2 -2
- package/dist/{chunk-OZ4OJLIM.js → chunk-DYNSSHD5.js} +7 -7
- package/dist/{chunk-OCQIWTDC.js → chunk-ELF2EOGF.js} +2 -2
- package/dist/{chunk-YIZCD4WG.js → chunk-GHHUAWSG.js} +3 -3
- package/dist/{chunk-JRB53YY7.js → chunk-GPQN2P32.js} +22 -18
- package/dist/chunk-GPQN2P32.js.map +1 -0
- package/dist/{chunk-DF3PVTB5.js → chunk-GQRCW7WX.js} +2 -2
- package/dist/{chunk-YIXV7A4J.js → chunk-H5ZJBRIK.js} +4 -4
- package/dist/{chunk-3PXUIH3S.js → chunk-LCIBOT5P.js} +2 -2
- package/dist/chunk-MUW5KBWU.js +25 -0
- package/dist/chunk-MUW5KBWU.js.map +1 -0
- package/dist/{chunk-CPPQCJEV.js → chunk-NM3BMITL.js} +4 -5
- package/dist/chunk-NM3BMITL.js.map +1 -0
- package/dist/{chunk-L62OTV7F.js → chunk-OT7NZ4PK.js} +3 -3
- package/dist/{chunk-EMPFZFBS.js → chunk-RUU22F7R.js} +2 -2
- package/dist/{chunk-5M5ECKFB.js → chunk-S7M6UTND.js} +46 -41
- package/dist/chunk-S7M6UTND.js.map +1 -0
- package/dist/{chunk-5CDCNIBM.js → chunk-TC4445WV.js} +28 -24
- package/dist/chunk-TC4445WV.js.map +1 -0
- package/dist/{chunk-CPR4QZT6.js → chunk-UF5BN4QN.js} +2 -2
- package/dist/{chunk-TP67325Z.js → chunk-UZALXR3J.js} +4 -4
- package/dist/{chunk-5EDEEGZK.js → chunk-VGYNHJFT.js} +16 -3
- package/dist/chunk-VGYNHJFT.js.map +1 -0
- package/dist/{chunk-CL6QEKM6.js → chunk-W64AF7LA.js} +5 -5
- package/dist/chunk-WZIT54AU.js +51 -0
- package/dist/chunk-WZIT54AU.js.map +1 -0
- package/dist/{chunk-LUCBUM2Y.js → chunk-XZL5CZFT.js} +4 -4
- package/dist/{chunk-5Y7I6VYA.js → chunk-YEAWH772.js} +2 -2
- package/dist/{chunk-LVFMTP5H.js → chunk-YVV32ON3.js} +2 -2
- package/dist/components/AceEditor/index.js +4 -4
- package/dist/components/AddressContainer/CoreAddressContainer.d.ts +1 -0
- package/dist/components/AddressContainer/CoreAddressContainer.js +10 -10
- package/dist/components/AddressContainer/EVMAddressContainer.d.ts +1 -0
- package/dist/components/AddressContainer/EVMAddressContainer.js +9 -9
- package/dist/components/AddressContainer/addressSwitcher.d.ts +1 -0
- package/dist/components/AddressContainer/addressSwitcher.js +7 -7
- package/dist/components/AddressContainer/addressView.d.ts +2 -1
- package/dist/components/AddressContainer/addressView.js +6 -6
- package/dist/components/AddressContainer/label.js +45 -6
- package/dist/components/AddressContainer/label.js.map +1 -1
- package/dist/components/AddressContainer/types.d.ts +19 -23
- package/dist/components/AddressContainer/utils.d.ts +17 -2
- package/dist/components/AddressContainer/utils.js +6 -20
- package/dist/components/AddressContainer/utils.js.map +1 -1
- package/dist/components/Age/index.js +4 -4
- package/dist/components/AutoComplete/index.js +3 -3
- package/dist/components/Charts/PreviewChartTemplate.js +1 -1
- package/dist/components/Charts/StockChartTemplate.js +1 -1
- package/dist/components/CopyButton/index.js +3 -3
- package/dist/components/DecimalsSelect/index.js +3 -3
- package/dist/components/DownloadCSV/index.js +4 -4
- package/dist/components/GasPriceDropdown/index.js +2 -2
- package/dist/components/IncreasePercent/index.js +2 -2
- package/dist/components/InfoIconWithTooltip/index.js +4 -4
- package/dist/components/InputData/AddressLabel.js +8 -9
- package/dist/components/InputData/ContractDetail.js +3 -3
- package/dist/components/InputData/JsonDecode.js +5 -5
- package/dist/components/InputData/OptimizationDecode.js +10 -11
- package/dist/components/InputData/UTF8.js +3 -3
- package/dist/components/InputData/index.js +14 -15
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/NetworkIcon/index.js +2 -2
- package/dist/components/OutputData/ErrorDecode.js +13 -14
- package/dist/components/OutputData/index.js +15 -16
- package/dist/components/PhishingAddressContainer/index.js +4 -4
- package/dist/components/Popover/index.js +3 -3
- package/dist/components/Price/index.js +3 -3
- package/dist/components/ProxyContractAddress/index.d.ts +1 -1
- package/dist/components/ProxyContractAddress/index.js +24 -15
- package/dist/components/ProxyContractAddress/index.js.map +1 -1
- package/dist/components/Radio/index.js +2 -2
- package/dist/components/SearchInput/index.js +4 -4
- package/dist/components/Select/index.js +4 -4
- package/dist/components/Select/select.js +3 -3
- package/dist/components/Text/index.js +4 -4
- package/dist/components/Tooltip/index.js +3 -3
- package/dist/components/TransactionAction/coreTransactionAction.js +13 -18
- package/dist/components/TransactionAction/coreTransactionAction.js.map +1 -1
- package/dist/components/TransactionAction/evmTransactionAction.js +12 -17
- package/dist/components/TransactionAction/evmTransactionAction.js.map +1 -1
- package/dist/components/TransactionTrace/TraceDetail.js +23 -24
- package/dist/components/TransactionTrace/TreeTraceTable.js +24 -25
- package/dist/components/TransactionTrace/index.js +24 -25
- package/dist/utils/address.js +2 -2
- package/dist/utils/contractManagerTool.js +2 -2
- package/dist/utils/hooks/useAddressLabel.js +3 -3
- package/dist/utils/hooks/useAddressNameMap.d.ts +6 -0
- package/dist/utils/hooks/useAddressNameMap.js +12 -0
- package/dist/utils/hooks/useAddressNameMap.js.map +1 -0
- package/dist/utils/hooks/useAge.js +1 -1
- package/dist/utils/hooks/useAge.js.map +1 -1
- package/dist/utils/hooks/useAutoSetHolderFilterParams.js +2 -2
- package/dist/utils/hooks/useContractDetail.js +2 -2
- package/dist/utils/hooks/useDecodeFunctionData.js +5 -5
- package/dist/utils/hooks/useDecodeFunctionError.js +3 -3
- package/dist/utils/hooks/useENS.js +3 -3
- package/dist/utils/hooks/useEnhanceDataWithNameMap.d.ts +30 -0
- package/dist/utils/hooks/useEnhanceDataWithNameMap.js +71 -0
- package/dist/utils/hooks/useEnhanceDataWithNameMap.js.map +1 -0
- package/dist/utils/hooks/useMethodAbi.js +2 -2
- package/dist/utils/hooks/useTableData.d.ts +34 -0
- package/dist/utils/hooks/useTableData.js +95 -0
- package/dist/utils/hooks/useTableData.js.map +1 -0
- package/dist/utils/hooks/useTxTrace.d.ts +3 -40
- package/dist/utils/hooks/useTxTrace.js +5 -15
- package/dist/utils/hooks/useTxTrace.js.map +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/request.d.ts +7 -2
- package/dist/utils/request.js +3 -1
- package/dist/utils/request.types.d.ts +35 -1
- package/package.json +10 -10
- package/dist/chunk-5CDCNIBM.js.map +0 -1
- package/dist/chunk-5EDEEGZK.js.map +0 -1
- package/dist/chunk-5M5ECKFB.js.map +0 -1
- package/dist/chunk-7OSADJ6H.js.map +0 -1
- package/dist/chunk-CKVDFS45.js.map +0 -1
- package/dist/chunk-CPPQCJEV.js.map +0 -1
- package/dist/chunk-JRB53YY7.js.map +0 -1
- package/dist/chunk-Q2DX6IDH.js +0 -49
- package/dist/chunk-Q2DX6IDH.js.map +0 -1
- /package/dist/{chunk-SX6R4MHO.js.map → chunk-2WEBXRNL.js.map} +0 -0
- /package/dist/{chunk-CNF26YY7.js.map → chunk-6L4ZEJQI.js.map} +0 -0
- /package/dist/{chunk-2KXTTKRI.js.map → chunk-7AVQOIDM.js.map} +0 -0
- /package/dist/{chunk-ZLNQICQZ.js.map → chunk-7VQL3G7K.js.map} +0 -0
- /package/dist/{chunk-GSWIFV2B.js.map → chunk-AYCHKB2Y.js.map} +0 -0
- /package/dist/{chunk-E3ZD2GGG.js.map → chunk-BEI5TWJL.js.map} +0 -0
- /package/dist/{chunk-LBWKTQYK.js.map → chunk-C6CGZ6KN.js.map} +0 -0
- /package/dist/{chunk-P4EE3QGM.js.map → chunk-C7OIVXE3.js.map} +0 -0
- /package/dist/{chunk-BUSBM33B.js.map → chunk-CMOP3BKX.js.map} +0 -0
- /package/dist/{chunk-6H5A42YS.js.map → chunk-DCQANK66.js.map} +0 -0
- /package/dist/{chunk-OZ4OJLIM.js.map → chunk-DYNSSHD5.js.map} +0 -0
- /package/dist/{chunk-OCQIWTDC.js.map → chunk-ELF2EOGF.js.map} +0 -0
- /package/dist/{chunk-YIZCD4WG.js.map → chunk-GHHUAWSG.js.map} +0 -0
- /package/dist/{chunk-DF3PVTB5.js.map → chunk-GQRCW7WX.js.map} +0 -0
- /package/dist/{chunk-YIXV7A4J.js.map → chunk-H5ZJBRIK.js.map} +0 -0
- /package/dist/{chunk-3PXUIH3S.js.map → chunk-LCIBOT5P.js.map} +0 -0
- /package/dist/{chunk-L62OTV7F.js.map → chunk-OT7NZ4PK.js.map} +0 -0
- /package/dist/{chunk-EMPFZFBS.js.map → chunk-RUU22F7R.js.map} +0 -0
- /package/dist/{chunk-CPR4QZT6.js.map → chunk-UF5BN4QN.js.map} +0 -0
- /package/dist/{chunk-TP67325Z.js.map → chunk-UZALXR3J.js.map} +0 -0
- /package/dist/{chunk-CL6QEKM6.js.map → chunk-W64AF7LA.js.map} +0 -0
- /package/dist/{chunk-LUCBUM2Y.js.map → chunk-XZL5CZFT.js.map} +0 -0
- /package/dist/{chunk-5Y7I6VYA.js.map → chunk-YEAWH772.js.map} +0 -0
- /package/dist/{chunk-LVFMTP5H.js.map → chunk-YVV32ON3.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-MWAD4CIG.js";
|
|
7
7
|
import {
|
|
8
8
|
formatAddress
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6L4ZEJQI.js";
|
|
10
10
|
|
|
11
11
|
// src/components/InputData/ContractDetail.tsx
|
|
12
12
|
import clsx from "clsx";
|
|
@@ -81,4 +81,4 @@ export {
|
|
|
81
81
|
formatContractAndTokenInfoMap,
|
|
82
82
|
ContractDetail
|
|
83
83
|
};
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-2WEBXRNL.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-WIB76E7O.js";
|
|
4
4
|
import {
|
|
5
5
|
detectAccountType
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VGYNHJFT.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/address.ts
|
|
9
9
|
import SDK from "js-conflux-sdk";
|
|
@@ -281,4 +281,4 @@ export {
|
|
|
281
281
|
formatAddressHexToBase32,
|
|
282
282
|
isAddressEqual
|
|
283
283
|
};
|
|
284
|
-
//# sourceMappingURL=chunk-
|
|
284
|
+
//# sourceMappingURL=chunk-6L4ZEJQI.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-6SXAFSBF.js";
|
|
4
4
|
import {
|
|
5
5
|
useContractDetail
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LCIBOT5P.js";
|
|
7
7
|
import {
|
|
8
8
|
CommonError_default
|
|
9
9
|
} from "./chunk-5TGK2EA2.js";
|
|
@@ -125,4 +125,4 @@ var useDecodeFunctionError = ({
|
|
|
125
125
|
export {
|
|
126
126
|
useDecodeFunctionError
|
|
127
127
|
};
|
|
128
|
-
//# sourceMappingURL=chunk-
|
|
128
|
+
//# sourceMappingURL=chunk-7AVQOIDM.js.map
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "./chunk-OYESIV3F.js";
|
|
4
4
|
import {
|
|
5
5
|
JsonDecode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OT7NZ4PK.js";
|
|
7
7
|
import {
|
|
8
8
|
OptimizationDecode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DYNSSHD5.js";
|
|
10
10
|
import {
|
|
11
11
|
Original
|
|
12
12
|
} from "./chunk-YBQQ72FQ.js";
|
|
13
13
|
import {
|
|
14
14
|
UTF8
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UF5BN4QN.js";
|
|
16
16
|
|
|
17
17
|
// src/components/InputData/index.tsx
|
|
18
18
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -63,4 +63,4 @@ var InputData = ({
|
|
|
63
63
|
export {
|
|
64
64
|
InputData
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-7VQL3G7K.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-XCKMXAL2.js";
|
|
4
4
|
import {
|
|
5
5
|
cn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NM3BMITL.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Modal/index.tsx
|
|
9
9
|
import { useEffect, useCallback, useMemo } from "react";
|
|
@@ -137,4 +137,4 @@ var Modal = ({
|
|
|
137
137
|
export {
|
|
138
138
|
Modal
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
140
|
+
//# sourceMappingURL=chunk-AYCHKB2Y.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
reqAbiByMethodId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VGYNHJFT.js";
|
|
4
4
|
|
|
5
5
|
// src/utils/hooks/useMethodAbi.ts
|
|
6
6
|
import useSWRImmutable from "swr/immutable";
|
|
@@ -14,4 +14,4 @@ var useMethodAbi = (methodId, shouldFetch = true) => {
|
|
|
14
14
|
export {
|
|
15
15
|
useMethodAbi
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-BEI5TWJL.js.map
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAddressLabel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DCQANK66.js";
|
|
4
4
|
import {
|
|
5
5
|
useENS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CMOP3BKX.js";
|
|
7
7
|
import {
|
|
8
8
|
Text
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
getLabelInfo
|
|
12
|
-
} from "./chunk-Q2DX6IDH.js";
|
|
9
|
+
} from "./chunk-C7OIVXE3.js";
|
|
13
10
|
import {
|
|
14
11
|
getTranslations
|
|
15
12
|
} from "./chunk-DQGLZCIG.js";
|
|
@@ -17,8 +14,9 @@ import {
|
|
|
17
14
|
// src/components/InputData/AddressLabel.tsx
|
|
18
15
|
import { Bookmark } from "@zeit-ui/react-icons";
|
|
19
16
|
import { useTranslation } from "react-i18next";
|
|
20
|
-
import
|
|
17
|
+
import ICON_ENS from "./logo-cns-7CXISC6I.svg";
|
|
21
18
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
var ENSIcon = () => /* @__PURE__ */ jsx("img", { src: ICON_ENS, className: "w-[16px] h-[16px] mb-[3px] mr-[2px]", alt: "" });
|
|
22
20
|
var AddressLabel = ({
|
|
23
21
|
address,
|
|
24
22
|
space
|
|
@@ -27,16 +25,13 @@ var AddressLabel = ({
|
|
|
27
25
|
const { ens } = useENS(space === "core" ? address : null);
|
|
28
26
|
const { t } = useTranslation();
|
|
29
27
|
const addressLabel = useAddressLabel(address);
|
|
30
|
-
const
|
|
31
|
-
() => getLabelInfo(ens[address]?.name ?? "", "ens"),
|
|
32
|
-
[address, ens]
|
|
33
|
-
);
|
|
28
|
+
const label = ens[address]?.name ?? "";
|
|
34
29
|
const addressLabelIcon = /* @__PURE__ */ jsx(Text, { tag: "span", hoverValue: t(translations.profile.tip.label), children: /* @__PURE__ */ jsx(Bookmark, { color: "var(--theme-color-gray2)", size: 16 }) });
|
|
35
30
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36
31
|
label && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
37
32
|
" ",
|
|
38
33
|
"(",
|
|
39
|
-
|
|
34
|
+
/* @__PURE__ */ jsx(ENSIcon, {}),
|
|
40
35
|
label,
|
|
41
36
|
")"
|
|
42
37
|
] }),
|
|
@@ -53,4 +48,4 @@ var AddressLabel = ({
|
|
|
53
48
|
export {
|
|
54
49
|
AddressLabel
|
|
55
50
|
};
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-BHAXBHVC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/InputData/AddressLabel.tsx"],"sourcesContent":["import { Bookmark } from '@zeit-ui/react-icons';\nimport { useTranslation } from 'react-i18next';\nimport { Text } from '../Text';\nimport { getTranslations } from 'src/store';\nimport { useENS } from 'src/utils/hooks/useENS';\nimport { useAddressLabel } from 'src/utils/hooks/useAddressLabel';\nimport ICON_ENS from '../../images/logo-cns.svg';\n\nconst ENSIcon = () => (\n <img src={ICON_ENS} className=\"w-[16px] h-[16px] mb-[3px] mr-[2px]\" alt=\"\" />\n);\n\nexport const AddressLabel = ({\n address,\n space,\n}: {\n address: string;\n space: 'evm' | 'core';\n}) => {\n const translations = getTranslations();\n // ENS is only for core space, and we don't want to request ENS info for evm space to avoid unnecessary requests\n const { ens } = useENS(space === 'core' ? address : null);\n const { t } = useTranslation();\n\n const addressLabel = useAddressLabel(address);\n\n const label = ens[address]?.name ?? '';\n\n const addressLabelIcon = (\n <Text tag=\"span\" hoverValue={t(translations.profile.tip.label)}>\n <Bookmark color=\"var(--theme-color-gray2)\" size={16} />\n </Text>\n );\n\n return (\n <>\n {label && (\n <>\n {' '}\n (<ENSIcon />\n {label})\n </>\n )}\n {addressLabel && (\n <>\n {' '}\n ({addressLabelIcon}\n {addressLabel})\n </>\n )}\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAK/B,OAAO,cAAc;AAGnB,SA4BM,UA5BN,KA4BM,YA5BN;AADF,IAAM,UAAU,MACd,oBAAC,SAAI,KAAK,UAAU,WAAU,uCAAsC,KAAI,IAAG;AAGtE,IAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AACF,MAGM;AACJ,QAAM,eAAe,gBAAgB;AAErC,QAAM,EAAE,IAAI,IAAI,OAAO,UAAU,SAAS,UAAU,IAAI;AACxD,QAAM,EAAE,EAAE,IAAI,eAAe;AAE7B,QAAM,eAAe,gBAAgB,OAAO;AAE5C,QAAM,QAAQ,IAAI,OAAO,GAAG,QAAQ;AAEpC,QAAM,mBACJ,oBAAC,QAAK,KAAI,QAAO,YAAY,EAAE,aAAa,QAAQ,IAAI,KAAK,GAC3D,8BAAC,YAAS,OAAM,4BAA2B,MAAM,IAAI,GACvD;AAGF,SACE,iCACG;AAAA,aACC,iCACG;AAAA;AAAA,MAAI;AAAA,MACJ,oBAAC,WAAQ;AAAA,MACT;AAAA,MAAM;AAAA,OACT;AAAA,IAED,gBACC,iCACG;AAAA;AAAA,MAAI;AAAA,MACH;AAAA,MACD;AAAA,MAAa;AAAA,OAChB;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
convertCheckSum
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6L4ZEJQI.js";
|
|
4
4
|
import {
|
|
5
5
|
Text
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C7OIVXE3.js";
|
|
7
7
|
import {
|
|
8
8
|
getTranslations
|
|
9
9
|
} from "./chunk-DQGLZCIG.js";
|
|
@@ -54,10 +54,11 @@ var convertLink = ({
|
|
|
54
54
|
};
|
|
55
55
|
var RenderAddress = ({
|
|
56
56
|
cfxAddress,
|
|
57
|
-
|
|
57
|
+
tokenName,
|
|
58
|
+
contractName,
|
|
59
|
+
verificationName,
|
|
58
60
|
hoverValue,
|
|
59
61
|
hrefAddress,
|
|
60
|
-
content,
|
|
61
62
|
link = "",
|
|
62
63
|
isFull = false,
|
|
63
64
|
isFullNameTag = false,
|
|
@@ -70,13 +71,23 @@ var RenderAddress = ({
|
|
|
70
71
|
addressLabel = "",
|
|
71
72
|
ENSLabel = "",
|
|
72
73
|
nametag = "",
|
|
74
|
+
innerName = "",
|
|
73
75
|
hideAliasPrefixInHover = false
|
|
74
76
|
}) => {
|
|
75
77
|
const translations = getTranslations();
|
|
76
|
-
const name =
|
|
78
|
+
const name = (
|
|
79
|
+
// Private name tags
|
|
80
|
+
addressLabel || // Official tag/name
|
|
81
|
+
nametag || // contract token name
|
|
82
|
+
tokenName || // contract name tag
|
|
83
|
+
contractName || // contract verification name
|
|
84
|
+
verificationName || // CNS/ENS
|
|
85
|
+
ENSLabel || // inner name is used for some special address, like the zero address
|
|
86
|
+
innerName
|
|
87
|
+
);
|
|
77
88
|
const isShowEns = !!ENSLabel && name === ENSLabel;
|
|
78
89
|
const defaultStyle = {
|
|
79
|
-
maxWidth: `${name && isFullNameTag || isFull ? "
|
|
90
|
+
maxWidth: `${name && isFullNameTag || isFull ? "unset" : (maxWidth || defaultPCMaxWidth) + "px"}`
|
|
80
91
|
};
|
|
81
92
|
const href = convertLink({ link, type, hrefAddress, cfxAddress });
|
|
82
93
|
const Wrapper = href ? "a" : "div";
|
|
@@ -95,12 +106,15 @@ var RenderAddress = ({
|
|
|
95
106
|
},
|
|
96
107
|
alias: {
|
|
97
108
|
label: translations?.profile.address.publicNameTag,
|
|
98
|
-
value:
|
|
109
|
+
value: tokenName || contractName || verificationName,
|
|
99
110
|
hideLabel: hideAliasPrefixInHover
|
|
100
111
|
}
|
|
101
112
|
};
|
|
102
113
|
const checksumAddress = convertCheckSum(cfxAddress);
|
|
103
|
-
const cfxAddressLabel = typeof
|
|
114
|
+
const cfxAddressLabel = typeof checksumAddress === "string" && !isFull ? type === "pos" ? shortenAddress(checksumAddress, {
|
|
115
|
+
prefixLength: 10,
|
|
116
|
+
suffixLength: 0
|
|
117
|
+
}) : shortenAddress(checksumAddress) : checksumAddress;
|
|
104
118
|
return /* @__PURE__ */ jsxs("div", { className: "inline-flex", children: [
|
|
105
119
|
prefix || (isShowEns ? ENSIcon : null),
|
|
106
120
|
/* @__PURE__ */ jsx(
|
|
@@ -129,4 +143,4 @@ var RenderAddress = ({
|
|
|
129
143
|
export {
|
|
130
144
|
RenderAddress
|
|
131
145
|
};
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-C3E5EA6J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/addressView.tsx"],"sourcesContent":["import { Translation } from 'react-i18next';\nimport { Text } from '../Text';\nimport { convertCheckSum } from '../../utils/address';\nimport { getTranslations } from '../../store';\nimport { TooltipContent, RenderAddressProps } from './types';\nimport { shortenAddress } from '@cfx-kit/dapp-utils/dist/address';\n\nconst defaultPCMaxWidth = 138;\n\n// common\nconst renderTooltipContent = (tooltipContent: TooltipContent) => {\n return Object.entries(tooltipContent)\n .map(([key, { label, value, hideLabel }]) => {\n if (value) {\n return (\n <div key={key}>\n {!hideLabel && (\n <span>\n <Translation>{t => t(label)}</Translation>\n </span>\n )}\n {value}\n </div>\n );\n }\n return null;\n })\n .filter(Boolean);\n};\n\n// common\nconst convertLink = ({\n link,\n type,\n hrefAddress,\n cfxAddress,\n}: RenderAddressProps) => {\n if (typeof link === 'string') {\n return link;\n }\n if (link === false) {\n return false;\n }\n\n const address = hrefAddress || cfxAddress;\n\n if (address && typeof address === 'string') {\n const pathname = window.location.pathname.toLowerCase();\n const addressLower = address.toLowerCase();\n if (pathname.includes('/address/' + addressLower)) {\n return false;\n }\n\n if (type === 'pow') {\n return `/address/${address}`;\n }\n\n if (type === 'pos') {\n return `/pos/accounts/${address}`;\n }\n }\n\n return false;\n};\n\n// common\nexport const RenderAddress = ({\n cfxAddress,\n tokenName,\n contractName,\n verificationName,\n hoverValue,\n hrefAddress,\n link = '',\n isFull = false,\n isFullNameTag = false,\n style = {},\n maxWidth,\n prefix = null,\n ENSIcon = null,\n suffix = null,\n type = 'pow',\n addressLabel = '',\n ENSLabel = '',\n nametag = '',\n innerName = '',\n hideAliasPrefixInHover = false,\n}: RenderAddressProps) => {\n const translations = getTranslations();\n\n // Private name tags > Official tag/name > contract token name > contract name tag > contract verification name > CNS/ENS\n const name =\n // Private name tags\n addressLabel ||\n // Official tag/name\n nametag ||\n // contract token name\n tokenName ||\n // contract name tag\n contractName ||\n // contract verification name\n verificationName ||\n // CNS/ENS\n ENSLabel ||\n // inner name is used for some special address, like the zero address\n innerName;\n const isShowEns = !!ENSLabel && name === ENSLabel;\n\n const defaultStyle = {\n maxWidth: `${(name && isFullNameTag) || isFull ? 'unset' : (maxWidth || defaultPCMaxWidth) + 'px'}`,\n };\n\n const href = convertLink({ link, type, hrefAddress, cfxAddress });\n\n const Wrapper = href ? 'a' : 'div';\n\n const tooltipContent: TooltipContent = {\n ENSLabel: {\n label: (translations as any)?.ens?.tip,\n value: ENSLabel,\n },\n nametag: {\n label: translations?.nametag?.tip,\n value: nametag,\n },\n addressLabel: {\n label: translations?.profile.address.myNameTag,\n value: addressLabel,\n },\n alias: {\n label: translations?.profile.address.publicNameTag,\n value: tokenName || contractName || verificationName,\n hideLabel: hideAliasPrefixInHover,\n },\n };\n\n const checksumAddress = convertCheckSum(cfxAddress);\n\n const cfxAddressLabel =\n typeof checksumAddress === 'string' && !isFull\n ? type === 'pos'\n ? shortenAddress(checksumAddress!, {\n prefixLength: 10,\n suffixLength: 0,\n })\n : shortenAddress(checksumAddress!)\n : checksumAddress;\n\n return (\n <div className=\"inline-flex\">\n {prefix || (isShowEns ? ENSIcon : null)}\n <Text\n tag=\"span\"\n hoverValue={\n <>\n {renderTooltipContent(tooltipContent)}\n <div>{hoverValue || checksumAddress}</div>\n </>\n }\n >\n <Wrapper\n className=\"block relative align-bottom cursor-default truncate\"\n style={{ ...defaultStyle, ...style }}\n {...(href ? { href: String(href) } : {})}\n >\n {name || cfxAddressLabel}\n </Wrapper>\n </Text>\n {suffix}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,mBAAmB;AAK5B,SAAS,sBAAsB;AAUrB,SA2IA,UAxIM,KAHN;AARV,IAAM,oBAAoB;AAG1B,IAAM,uBAAuB,CAAC,mBAAmC;AAC/D,SAAO,OAAO,QAAQ,cAAc,EACjC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,OAAO,UAAU,CAAC,MAAM;AAC3C,QAAI,OAAO;AACT,aACE,qBAAC,SACE;AAAA,SAAC,aACA,oBAAC,UACC,8BAAC,eAAa,iBAAK,EAAE,KAAK,GAAE,GAC9B;AAAA,QAED;AAAA,WANO,GAOV;AAAA,IAEJ;AACA,WAAO;AAAA,EACT,CAAC,EACA,OAAO,OAAO;AACnB;AAGA,IAAM,cAAc,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA0B;AACxB,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO;AAAA,EACT;AACA,MAAI,SAAS,OAAO;AAClB,WAAO;AAAA,E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AA,IACT;AAAA,IACA,cAAc;AAAA,MACZ,OAAO,cAAc,QAAQ,QAAQ;AAAA,MACrC,OAAO;AAAA,IACT;AAAA,IACA,OAAO;AAAA,MACL,OAAO,cAAc,QAAQ,QAAQ;AAAA,MACrC,OAAO,aAAa,gBAAgB;AAAA,MACpC,WAAW;AAAA,IACb;AAAA,EACF;AAEA,QAAM,kBAAkB,gBAAgB,UAAU;AAElD,QAAM,kBACJ,OAAO,oBAAoB,YAAY,CAAC,SACpC,SAAS,QACP,eAAe,iBAAkB;AAAA,IAC/B,cAAc;AAAA,IACd,cAAc;AAAA,EAChB,CAAC,IACD,eAAe,eAAgB,IACjC;AAEN,SACE,qBAAC,SAAI,WAAU,eACZ;AAAA,eAAW,YAAY,UAAU;AAAA,IAClC;AAAA,MAAC;AAAA;AAAA,QACC,KAAI;AAAA,QACJ,YACE,iCACG;AAAA,+BAAqB,cAAc;AAAA,UACpC,oBAAC,SAAK,wBAAc,iBAAgB;AAAA,WACtC;AAAA,QAGF;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO,EAAE,GAAG,cAAc,GAAG,MAAM;AAAA,YAClC,GAAI,OAAO,EAAE,MAAM,OAAO,IAAI,EAAE,IAAI,CAAC;AAAA,YAErC,kBAAQ;AAAA;AAAA,QACX;AAAA;AAAA,IACF;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TraceDetail
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W64AF7LA.js";
|
|
4
4
|
import {
|
|
5
5
|
Table
|
|
6
6
|
} from "./chunk-XZ7IV2FF.js";
|
|
@@ -79,4 +79,4 @@ var TreeTraceTable = ({
|
|
|
79
79
|
export {
|
|
80
80
|
TreeTraceTable
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-C6CGZ6KN.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-TOKKKTFG.js";
|
|
4
4
|
import {
|
|
5
5
|
Tooltip
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GQRCW7WX.js";
|
|
7
7
|
import {
|
|
8
8
|
selectText
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NM3BMITL.js";
|
|
10
10
|
|
|
11
11
|
// src/components/Text/index.tsx
|
|
12
12
|
import React from "react";
|
|
@@ -102,4 +102,4 @@ var Text = React.memo(
|
|
|
102
102
|
export {
|
|
103
103
|
Text
|
|
104
104
|
};
|
|
105
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-C7OIVXE3.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isCoreMainOrTestAddress
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6L4ZEJQI.js";
|
|
4
4
|
import {
|
|
5
5
|
apiPrefix
|
|
6
6
|
} from "./chunk-WIB76E7O.js";
|
|
7
7
|
import {
|
|
8
8
|
sendRequestENSInfo
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VGYNHJFT.js";
|
|
10
10
|
import {
|
|
11
11
|
useENSStore
|
|
12
12
|
} from "./chunk-DQGLZCIG.js";
|
|
@@ -60,4 +60,4 @@ var useENS = (address) => {
|
|
|
60
60
|
export {
|
|
61
61
|
useENS
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-CMOP3BKX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
convertCheckSum
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6L4ZEJQI.js";
|
|
4
4
|
import {
|
|
5
5
|
useGlobalData
|
|
6
6
|
} from "./chunk-DQGLZCIG.js";
|
|
@@ -20,4 +20,4 @@ var useAddressLabel = (address, showAddressLabel = true) => {
|
|
|
20
20
|
export {
|
|
21
21
|
useAddressLabel
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-DCQANK66.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ContractDetail,
|
|
3
3
|
formatContractAndTokenInfoMap
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2WEBXRNL.js";
|
|
5
5
|
import {
|
|
6
6
|
FunctionName,
|
|
7
7
|
getParameterType
|
|
@@ -11,22 +11,22 @@ import {
|
|
|
11
11
|
} from "./chunk-SFCNLOQ5.js";
|
|
12
12
|
import {
|
|
13
13
|
AddressLabel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BHAXBHVC.js";
|
|
15
15
|
import {
|
|
16
16
|
Link
|
|
17
17
|
} from "./chunk-2Y57U43P.js";
|
|
18
18
|
import {
|
|
19
19
|
convertCheckSum
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6L4ZEJQI.js";
|
|
21
21
|
import {
|
|
22
22
|
Text
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-C7OIVXE3.js";
|
|
24
24
|
import {
|
|
25
25
|
cn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NM3BMITL.js";
|
|
27
27
|
import {
|
|
28
28
|
reqContractAndToken
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VGYNHJFT.js";
|
|
30
30
|
|
|
31
31
|
// src/components/InputData/OptimizationDecode.tsx
|
|
32
32
|
import { useEffect, useMemo, useState } from "react";
|
|
@@ -181,4 +181,4 @@ export {
|
|
|
181
181
|
DecodedParameters,
|
|
182
182
|
OptimizationDecode
|
|
183
183
|
};
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-DYNSSHD5.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-65X53DMW.js";
|
|
4
4
|
import {
|
|
5
5
|
Tooltip
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GQRCW7WX.js";
|
|
7
7
|
|
|
8
8
|
// src/components/InfoIconWithTooltip/index.tsx
|
|
9
9
|
import clsx from "clsx";
|
|
@@ -23,4 +23,4 @@ var InfoIconWithTooltip = ({
|
|
|
23
23
|
export {
|
|
24
24
|
InfoIconWithTooltip
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-ELF2EOGF.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
SelectItem,
|
|
6
6
|
SelectTrigger,
|
|
7
7
|
SelectValue
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RUU22F7R.js";
|
|
9
9
|
import {
|
|
10
10
|
cn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NM3BMITL.js";
|
|
12
12
|
|
|
13
13
|
// src/components/Select/index.tsx
|
|
14
14
|
import React, { useMemo, useState, useEffect } from "react";
|
|
@@ -104,4 +104,4 @@ Select2.Option = Option;
|
|
|
104
104
|
export {
|
|
105
105
|
Select2 as Select
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=chunk-
|
|
107
|
+
//# sourceMappingURL=chunk-GHHUAWSG.js.map
|
|
@@ -3,19 +3,18 @@ import {
|
|
|
3
3
|
} from "./chunk-MWAD4CIG.js";
|
|
4
4
|
import {
|
|
5
5
|
RenderAddress
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C3E5EA6J.js";
|
|
7
7
|
import {
|
|
8
8
|
formatAddress,
|
|
9
9
|
isInnerContractAddress
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6L4ZEJQI.js";
|
|
11
11
|
import {
|
|
12
12
|
Tooltip
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GQRCW7WX.js";
|
|
14
14
|
import {
|
|
15
15
|
coreCorrespondsToEspace,
|
|
16
|
-
formatString,
|
|
17
16
|
getNetwork
|
|
18
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NM3BMITL.js";
|
|
19
18
|
import {
|
|
20
19
|
getEnvConfig,
|
|
21
20
|
getTranslations,
|
|
@@ -35,8 +34,7 @@ var ContractCreatedAddress = (props) => {
|
|
|
35
34
|
const translations = getTranslations();
|
|
36
35
|
const contractAddress = formatAddress(contractCreated, outputType);
|
|
37
36
|
const customProps = {
|
|
38
|
-
|
|
39
|
-
alias: t(translations.transaction.contractCreation),
|
|
37
|
+
contractName: t(translations.transaction.contractCreation),
|
|
40
38
|
hrefAddress: contractAddress,
|
|
41
39
|
cfxAddress: contractAddress,
|
|
42
40
|
maxWidth: 160
|
|
@@ -44,7 +42,7 @@ var ContractCreatedAddress = (props) => {
|
|
|
44
42
|
const mergedProps = { ...props, ...customProps };
|
|
45
43
|
return RenderAddress({
|
|
46
44
|
...mergedProps,
|
|
47
|
-
prefix: /* @__PURE__ */ jsx("div", { className: `mr-[2px] flex-shrink-0 ${isFull ? "icon" : ""}`, children: /* @__PURE__ */ jsx(Tooltip, { title: mergedProps.
|
|
45
|
+
prefix: /* @__PURE__ */ jsx("div", { className: `mr-[2px] flex-shrink-0 ${isFull ? "icon" : ""}`, children: /* @__PURE__ */ jsx(Tooltip, { title: mergedProps.contractName, children: /* @__PURE__ */ jsx("div", { className: "relative w-[16px] h-[16px]", children: /* @__PURE__ */ jsx(ContractCreated, { className: "w-[16px] h-[16px] align-bottom mb-[3px]" }) }) }) })
|
|
48
46
|
});
|
|
49
47
|
};
|
|
50
48
|
var CoreHexAddress = (props) => {
|
|
@@ -71,7 +69,9 @@ var CoreHexAddress = (props) => {
|
|
|
71
69
|
var InvalidAddress = (props) => {
|
|
72
70
|
const {
|
|
73
71
|
value,
|
|
74
|
-
|
|
72
|
+
tokenName,
|
|
73
|
+
contractName,
|
|
74
|
+
verificationName,
|
|
75
75
|
t,
|
|
76
76
|
isFull,
|
|
77
77
|
maxWidth,
|
|
@@ -82,9 +82,10 @@ var InvalidAddress = (props) => {
|
|
|
82
82
|
const tip = t(translations.general.invalidAddress);
|
|
83
83
|
return RenderAddress({
|
|
84
84
|
cfxAddress: value,
|
|
85
|
-
|
|
85
|
+
contractName,
|
|
86
|
+
tokenName,
|
|
87
|
+
verificationName,
|
|
86
88
|
hoverValue: `${tip}: ${value}`,
|
|
87
|
-
content: alias ? formatString(alias, "tag") : value,
|
|
88
89
|
link: false,
|
|
89
90
|
isFull,
|
|
90
91
|
isFullNameTag,
|
|
@@ -149,7 +150,9 @@ var MyAddress = (props) => {
|
|
|
149
150
|
};
|
|
150
151
|
var PosAddress = (props) => {
|
|
151
152
|
const {
|
|
152
|
-
|
|
153
|
+
tokenName,
|
|
154
|
+
contractName,
|
|
155
|
+
verificationName,
|
|
153
156
|
isFull,
|
|
154
157
|
isFullNameTag,
|
|
155
158
|
maxWidth,
|
|
@@ -166,14 +169,14 @@ var PosAddress = (props) => {
|
|
|
166
169
|
return MyAddress(props);
|
|
167
170
|
}
|
|
168
171
|
const translations = getTranslations();
|
|
169
|
-
const content = alias ? formatString(alias, "tag") : formatString(value, "posAddress");
|
|
170
172
|
if (!isPosAddress(value)) {
|
|
171
173
|
const tip = t(translations.general.invalidPosAddress);
|
|
172
174
|
return RenderAddress({
|
|
173
175
|
cfxAddress: value,
|
|
174
|
-
|
|
176
|
+
tokenName,
|
|
177
|
+
contractName,
|
|
178
|
+
verificationName,
|
|
175
179
|
hoverValue: `${tip}: ${value}`,
|
|
176
|
-
content,
|
|
177
180
|
link: false,
|
|
178
181
|
isFull,
|
|
179
182
|
isFullNameTag,
|
|
@@ -186,13 +189,14 @@ var PosAddress = (props) => {
|
|
|
186
189
|
}
|
|
187
190
|
return RenderAddress({
|
|
188
191
|
cfxAddress: value,
|
|
189
|
-
|
|
192
|
+
tokenName,
|
|
193
|
+
contractName,
|
|
194
|
+
verificationName,
|
|
190
195
|
link,
|
|
191
196
|
isFull,
|
|
192
197
|
isFullNameTag,
|
|
193
198
|
maxWidth,
|
|
194
199
|
type: "pos",
|
|
195
|
-
content,
|
|
196
200
|
hideAliasPrefixInHover
|
|
197
201
|
});
|
|
198
202
|
};
|
|
@@ -205,4 +209,4 @@ export {
|
|
|
205
209
|
MyAddress,
|
|
206
210
|
PosAddress
|
|
207
211
|
};
|
|
208
|
-
//# sourceMappingURL=chunk-
|
|
212
|
+
//# sourceMappingURL=chunk-GPQN2P32.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/addressSwitcher.tsx"],"sourcesContent":["import { WithTranslation } from 'react-i18next';\nimport { AlertTriangle, File } from '@zeit-ui/react-icons';\nimport InternalContractIcon from '../../images/internal-contract-icon.png';\nimport ContractIcon from '../../images/contract-icon.png';\nimport VerifiedIcon from '../../images/verified.png';\nimport isMeIcon from '../../images/me.png';\nimport { Tooltip } from '../Tooltip';\nimport { isPosAddress } from '@cfx-kit/dapp-utils/dist/address';\nimport { formatAddress, isInnerContractAddress } from '../../utils/address';\nimport { getTranslations, getEnvConfig, useGlobalData } from '../../store';\nimport { getNetwork, coreCorrespondsToEspace } from 'src/utils';\nimport { Props } from './types';\nimport { RenderAddress } from './addressView';\nimport { ContractCreated } from '../Icons';\n\n// common\nexport const ContractCreatedAddress = (\n props: Props & WithTranslation & { outputType: 'hex' | 'base32' },\n) => {\n const { contractCreated = '', outputType, t, isFull } = props;\n\n const translations = getTranslations();\n\n const contractAddress = formatAddress(contractCreated, outputType);\n\n const customProps = {\n contractName: t(translations.transaction.contractCreation),\n hrefAddress: contractAddress,\n cfxAddress: contractAddress,\n maxWidth: 160,\n };\n\n const mergedProps = { ...props, ...customProps };\n return RenderAddress({\n ...mergedProps,\n prefix: (\n <div className={`mr-[2px] flex-shrink-0 ${isFull ? 'icon' : ''}`}>\n <Tooltip title={mergedProps.contractName}>\n <div className=\"relative w-[16px] h-[16px]\">\n <ContractCreated className=\"w-[16px] h-[16px] align-bottom mb-[3px]\" />\n </div>\n </Tooltip>\n </div>\n ),\n });\n};\n\n// core\nexport const CoreHexAddress = (props: Props & WithTranslation) => {\n const { value, t, isFull, maxWidth } = props;\n const { globalData } = useGlobalData();\n\n const ENV_CONFIG = getEnvConfig();\n const translations = getTranslations();\n const hexAddress = formatAddress(value, 'hex');\n const network = getNetwork(\n globalData?.networks,\n coreCorrespondsToEspace(ENV_CONFIG.ENV_NETWORK_ID),\n );\n const url = `${network.url}/address/${hexAddress}`;\n\n return RenderAddress({\n cfxAddress: hexAddress,\n hoverValue: hexAddress,\n link: url,\n isFull,\n maxWidth,\n suffixSize: 0,\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={t((translations as any).general.eSpaceAddress)}>\n <File size={16} color=\"#17B38A\" />\n </Tooltip>\n </div>\n ),\n });\n};\n\n// common\nexport const InvalidAddress = (props: Props & WithTranslation) => {\n const {\n value,\n tokenName,\n contractName,\n verificationName,\n t,\n isFull,\n maxWidth,\n isFullNameTag,\n hideAliasPrefixInHover,\n } = props;\n\n const translations = getTranslations();\n\n const tip = t(translations.general.invalidAddress);\n\n return RenderAddress({\n cfxAddress: value,\n contractName,\n tokenName,\n verificationName,\n hoverValue: `${tip}: ${value}`,\n link: false,\n isFull,\n isFullNameTag,\n maxWidth,\n style: { color: '#e00909' },\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={tip}>\n <AlertTriangle size={16} color=\"#e00909\" />\n </Tooltip>\n </div>\n ),\n hideAliasPrefixInHover,\n });\n};\n\n// common\nexport const ContractAddress = (props: Props & WithTranslation) => {\n const { showIcon, verify, t, cfxAddress, isFull } = props;\n\n const translations = getTranslations();\n\n const isInnerContract = cfxAddress && isInnerContractAddress(cfxAddress);\n\n const typeText = t(\n isInnerContract\n ? translations.general.internalContract\n : verify\n ? translations.general.verifiedContract\n : translations.general.unverifiedContract,\n );\n\n return RenderAddress({\n ...props,\n prefix: showIcon ? (\n <div className={`mr-[2px] flex-shrink-0 ${isFull ? 'icon' : ''}`}>\n <Tooltip title={typeText}>\n <div className=\"relative w-[16px] h-[16px]\">\n {isInnerContract ? (\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[5px]\"\n src={InternalContractIcon}\n alt={typeText}\n />\n ) : (\n <>\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[5px]\"\n src={ContractIcon}\n alt={typeText}\n />\n {verify ? (\n <img\n className=\"w-[8px] h-[8px] absolute bottom-[-1px] right-[1px]\"\n src={VerifiedIcon}\n alt={''}\n />\n ) : (\n <></>\n )}\n </>\n )}\n </div>\n </Tooltip>\n </div>\n ) : (\n <></>\n ),\n });\n};\n\n// common\nexport const MyAddress = (props: Props & WithTranslation) => {\n const { isFull } = props;\n return RenderAddress({\n ...props,\n suffix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <img\n className=\"w-[38.5px] h-[16px] ml-[3px] align-bottom\"\n src={isMeIcon}\n alt=\"is me\"\n style={{\n marginBottom: isFull ? '6px' : '4px',\n }}\n />\n </div>\n ),\n });\n};\n\n// core\nexport const PosAddress = (props: Props & WithTranslation) => {\n const {\n tokenName,\n contractName,\n verificationName,\n isFull,\n isFullNameTag,\n maxWidth,\n t,\n link,\n isMe,\n hideAliasPrefixInHover,\n } = props;\n const value = props.value;\n if (!value) {\n return <>--</>;\n }\n if (isMe) {\n return MyAddress(props);\n }\n const translations = getTranslations();\n if (!isPosAddress(value)) {\n const tip = t(translations.general.invalidPosAddress);\n return RenderAddress({\n cfxAddress: value,\n tokenName,\n contractName,\n verificationName,\n hoverValue: `${tip}: ${value}`,\n link: false,\n isFull,\n isFullNameTag,\n maxWidth,\n style: { color: '#e00909' },\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={tip}>\n <AlertTriangle size={16} color=\"#e00909\" />\n </Tooltip>\n </div>\n ),\n type: 'pos',\n hideAliasPrefixInHover,\n });\n }\n\n return RenderAddress({\n cfxAddress: value,\n tokenName,\n contractName,\n verificationName,\n link,\n isFull,\n isFullNameTag,\n maxWidth,\n type: 'pos',\n hideAliasPrefixInHover,\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe,YAAY;AACpC,OAAO,0BAA0B;AACjC,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,cAAc;AAErB,SAAS,oBAAoB;AAgCjB,SAyHM,UAzHN,KA4GE,YA5GF;AAvBL,IAAM,yBAAyB,CACpC,UACG;AACH,QAAM,EAAE,kBAAkB,IAAI,YAAY,GAAG,OAAO,IAAI;AAExD,QAAM,eAAe,gBAAgB;AAErC,QAAM,kBAAkB,cAAc,iBAAiB,UAAU;AAEjE,QAAM,cAAc;AAAA,IAClB,cAAc,EAAE,aAAa,YAAY,gBAAgB;AAAA,IACzD,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAEA,QAAM,cAAc,EAAE,GAAG,OAAO,GAAG,YAAY;AAC/C,SAAO,cAAc;AAAA,IACnB,GAAG;AAAA,IACH,QACE,oBAAC,SAAI,WAAW,0BAA0B,SAAS,SAAS,MAC1D,8BAAC,WAAQ,OAAO,YAAY,cAC1B,8BAAC,SAAI,WAAU,8BACb,8BAAC,mBAAgB,WAAU,2CAA0C,GACvE,GACF,GACF;AAAA,EAEJ,CAAC;AACH;AAGO,IAAM,iBAAiB,CAAC,UAAmC;AAChE,QAAM,EAAE,OAAO,GAAG,QAAQ,SAAS,IAAI;AACvC,QAAM,EAAE,WAAW,IAAI,cAAc;AAErC,QAAM,aAAa,aAAa;AAChC,QAAM,eAAe,gBAAgB;AACrC,QAAM,aAAa,cAAc,OAAO,KAAK;AAC7C,QAAM,UAAU;AAAA,IACd,YAAY;AAAA,IACZ,wBAAwB,WAAW,cAAc;AAAA,EACnD;AACA,QAAM,MAAM,GAAG,QAAQ,eAAe;AAEtC,SAAO,cAA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AA,MACvB,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO,EAAE,OAAO,UAAU;AAAA,MAC1B,QACE,oBAAC,SAAI,WAAU,0BACb,8BAAC,WAAQ,OAAO,KACd,8BAAC,iBAAc,MAAM,IAAI,OAAM,WAAU,GAC3C,GACF;AAAA,MAEF,MAAM;AAAA,MACN;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO,cAAc;AAAA,IACnB,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-BMO4IZHV.js";
|
|
24
24
|
import {
|
|
25
25
|
cn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NM3BMITL.js";
|
|
27
27
|
|
|
28
28
|
// src/components/Tooltip/index.tsx
|
|
29
29
|
import {
|
|
@@ -531,4 +531,4 @@ var Tooltip2 = ({
|
|
|
531
531
|
export {
|
|
532
532
|
Tooltip2 as Tooltip
|
|
533
533
|
};
|
|
534
|
-
//# sourceMappingURL=chunk-
|
|
534
|
+
//# sourceMappingURL=chunk-GQRCW7WX.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useDecodeFunctionError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7AVQOIDM.js";
|
|
4
4
|
import {
|
|
5
5
|
DecodedParameters
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DYNSSHD5.js";
|
|
7
7
|
import {
|
|
8
8
|
FunctionName
|
|
9
9
|
} from "./chunk-FYLAXC3R.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-XBEBAU77.js";
|
|
16
16
|
import {
|
|
17
17
|
cn
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NM3BMITL.js";
|
|
19
19
|
|
|
20
20
|
// src/components/OutputData/ErrorDecode.tsx
|
|
21
21
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -87,4 +87,4 @@ var ErrorDecode = ({
|
|
|
87
87
|
export {
|
|
88
88
|
ErrorDecode
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-H5ZJBRIK.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getContractDetail
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VGYNHJFT.js";
|
|
4
4
|
|
|
5
5
|
// src/utils/hooks/useContractDetail.ts
|
|
6
6
|
import useSWRImmutable from "swr/immutable";
|
|
@@ -14,4 +14,4 @@ var useContractDetail = (contractAddress, fields = [], shouldFetch = true) => {
|
|
|
14
14
|
export {
|
|
15
15
|
useContractDetail
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-LCIBOT5P.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchAddressNameMap
|
|
3
|
+
} from "./chunk-VGYNHJFT.js";
|
|
4
|
+
|
|
5
|
+
// src/utils/hooks/useAddressNameMap.ts
|
|
6
|
+
import useSWRImmutable from "swr/immutable";
|
|
7
|
+
import { useMemo } from "react";
|
|
8
|
+
var useAddressNameMap = (addresses, shouldFetch = true) => {
|
|
9
|
+
const key = useMemo(() => {
|
|
10
|
+
return shouldFetch && addresses.length > 0 ? `address-name-map-${[...addresses].sort().join(",")}` : null;
|
|
11
|
+
}, [addresses, shouldFetch]);
|
|
12
|
+
return useSWRImmutable(
|
|
13
|
+
key,
|
|
14
|
+
() => fetchAddressNameMap(addresses, {
|
|
15
|
+
withContractInfo: "true",
|
|
16
|
+
withNameTagInfo: "true",
|
|
17
|
+
withENSInfo: "true"
|
|
18
|
+
})
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
useAddressNameMap
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chunk-MUW5KBWU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/hooks/useAddressNameMap.ts"],"sourcesContent":["import useSWRImmutable from 'swr/immutable';\nimport { fetchAddressNameMap } from '../request';\nimport { useMemo } from 'react';\n\nexport const useAddressNameMap = (addresses: string[], shouldFetch = true) => {\n const key = useMemo(() => {\n return shouldFetch && addresses.length > 0\n ? `address-name-map-${[...addresses].sort().join(',')}`\n : null;\n }, [addresses, shouldFetch]);\n return useSWRImmutable(key, () =>\n fetchAddressNameMap(addresses, {\n withContractInfo: 'true',\n withNameTagInfo: 'true',\n withENSInfo: 'true',\n }),\n );\n};\n"],"mappings":";;;;;AAAA,OAAO,qBAAqB;AAE5B,SAAS,eAAe;AAEjB,IAAM,oBAAoB,CAAC,WAAqB,cAAc,SAAS;AAC5E,QAAM,MAAM,QAAQ,MAAM;AACxB,WAAO,eAAe,UAAU,SAAS,IACrC,oBAAoB,CAAC,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,MAClD;AAAA,EACN,GAAG,CAAC,WAAW,WAAW,CAAC;AAC3B,SAAO;AAAA,IAAgB;AAAA,IAAK,MAC1B,oBAAoB,WAAW;AAAA,MAC7B,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
|