@cfxjs/sirius-next-common 0.5.0 → 0.6.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/dist/{chunk-ODPPKXIV.js → chunk-2PHHS2RO.js} +2 -2
- package/dist/{chunk-TTMMIWXR.js → chunk-6B2K5TEW.js} +3 -3
- package/dist/{chunk-LUHISU5F.js → chunk-6CSKHPNW.js} +2 -2
- package/dist/{chunk-CPSXYQJ7.js → chunk-6R34R4GT.js} +6 -3
- package/dist/{chunk-CPSXYQJ7.js.map → chunk-6R34R4GT.js.map} +1 -1
- package/dist/{chunk-4MVQ3JTN.js → chunk-7XTWMLAL.js} +2 -2
- package/dist/{chunk-M7G2HHUU.js → chunk-A66ETOJQ.js} +12 -10
- package/dist/{chunk-M7G2HHUU.js.map → chunk-A66ETOJQ.js.map} +1 -1
- package/dist/chunk-ATKGS22K.js +22 -0
- package/dist/chunk-ATKGS22K.js.map +1 -0
- package/dist/{chunk-4MEAKY73.js → chunk-BE7ARWED.js} +2 -2
- package/dist/{chunk-TAEXZ5LI.js → chunk-BVUDZX7G.js} +2 -2
- package/dist/{chunk-EGXD2GDI.js → chunk-DG5UBEHF.js} +2 -2
- package/dist/{chunk-7FIPVSHQ.js → chunk-DYXED7QQ.js} +2 -2
- package/dist/{chunk-WYM7FWXA.js → chunk-ESZKQ6TN.js} +2 -2
- package/dist/{chunk-NBMABBMG.js → chunk-EXHT4Z5W.js} +5 -5
- package/dist/{chunk-XGSBVC7P.js → chunk-FDTENXEV.js} +2 -2
- package/dist/{chunk-OAUFBUYV.js → chunk-G5X35MKG.js} +5 -5
- package/dist/{chunk-TIWELXT7.js → chunk-I2P6ZCOL.js} +5 -5
- package/dist/{chunk-XIQH26WA.js → chunk-IGKHPUYH.js} +2 -2
- package/dist/{chunk-B74PZXOZ.js → chunk-IZPVE2KL.js} +6 -6
- package/dist/{chunk-CTCBKNSN.js → chunk-JY3EDI6L.js} +3 -3
- package/dist/{chunk-QCA4QRD4.js → chunk-KEXEB4J3.js} +5 -3
- package/dist/chunk-KEXEB4J3.js.map +1 -0
- package/dist/{chunk-LMY5VYFP.js → chunk-KJGWBTHN.js} +2 -2
- package/dist/{chunk-2WY3J56A.js → chunk-KTHEE74W.js} +2 -2
- package/dist/{chunk-H26P76N6.js → chunk-NQXQI7SA.js} +5 -5
- package/dist/{chunk-3XNQKM2D.js → chunk-OBAIINAG.js} +2 -2
- package/dist/{chunk-UBHTXZWS.js → chunk-OJKUPTS6.js} +2 -2
- package/dist/{chunk-S2C6VOUJ.js → chunk-ONKMQT55.js} +2 -2
- package/dist/{chunk-HTRUONHE.js → chunk-OZQ7HC6E.js} +2 -2
- package/dist/{chunk-2RVLHSYV.js → chunk-P56G5URI.js} +4 -4
- package/dist/{chunk-LZF26HB6.js → chunk-R6M4UPAP.js} +2 -2
- package/dist/{chunk-IVE75CAC.js → chunk-ROINL4AD.js} +5 -5
- package/dist/{chunk-QBF7EJFY.js → chunk-RPJ6QLNG.js} +5 -5
- package/dist/{chunk-RK632STC.js → chunk-SW7XEZSP.js} +4 -4
- package/dist/{chunk-YLBHOAH5.js → chunk-SWXU6RIW.js} +3 -3
- package/dist/{chunk-OGZSZDXL.js → chunk-TLB3MT66.js} +4 -4
- package/dist/{chunk-XJPWKT2J.js → chunk-URGXFUYM.js} +3 -3
- package/dist/{chunk-36EB4LRH.js → chunk-V63T5THG.js} +4 -4
- package/dist/{chunk-D5HJCIRL.js → chunk-VHVK63XA.js} +2 -2
- package/dist/{chunk-2T3VTZXW.js → chunk-VTQN4OFN.js} +3 -3
- package/dist/{chunk-2BLHJLZO.js → chunk-VYC4H34V.js} +6 -6
- package/dist/{chunk-B7IDVT2B.js → chunk-WOL4GXHM.js} +4 -4
- package/dist/chunk-X6IIYPI2.js +5801 -0
- package/dist/chunk-X6IIYPI2.js.map +1 -0
- package/dist/{chunk-OUQEXLFQ.js → chunk-XD4ERIC5.js} +3 -3
- package/dist/{chunk-QL4NKKTA.js → chunk-XF3VAJAR.js} +2 -2
- package/dist/components/AAFailedReason/index.js +6 -5
- package/dist/components/AAFailedReason/index.js.map +1 -1
- package/dist/components/AceEditor/index.js +6 -4
- package/dist/components/AddressContainer/CoreAddressContainer.js +12 -10
- package/dist/components/AddressContainer/EVMAddressContainer.js +11 -9
- package/dist/components/AddressContainer/addressSwitcher.js +9 -7
- package/dist/components/AddressContainer/addressView.js +8 -6
- package/dist/components/AddressContainer/label.js +5 -3
- package/dist/components/AddressContainer/label.js.map +1 -1
- package/dist/components/AddressContainer/utils.js +4 -3
- package/dist/components/Age/index.js +6 -4
- package/dist/components/Age/index.js.map +1 -1
- package/dist/components/AutoComplete/index.js +4 -3
- package/dist/components/AutoComplete/index.js.map +1 -1
- package/dist/components/Charts/PreviewChartTemplate.js +2 -1
- package/dist/components/Charts/PreviewChartTemplate.js.map +1 -1
- package/dist/components/Charts/StockChartTemplate.js +2 -1
- package/dist/components/Charts/StockChartTemplate.js.map +1 -1
- package/dist/components/ContractAbi/IntValueFormatter.js +6 -5
- package/dist/components/ContractAbi/ParamTitle.js +7 -5
- package/dist/components/ContractAbi/index.js +11 -9
- package/dist/components/ContractAbi/utils.js +4 -3
- package/dist/components/CopyButton/index.js +5 -3
- package/dist/components/CopyButton/index.js.map +1 -1
- package/dist/components/DecimalsSelect/index.js +5 -4
- package/dist/components/DownloadCSV/index.js +6 -4
- package/dist/components/DownloadCSV/index.js.map +1 -1
- package/dist/components/Dropdown/index.js +9 -5
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/GasPriceDropdown/index.js +3 -2
- package/dist/components/GasPriceDropdown/index.js.map +1 -1
- package/dist/components/IncreasePercent/index.js +3 -2
- package/dist/components/IncreasePercent/index.js.map +1 -1
- package/dist/components/InfoIconWithTooltip/index.js +6 -4
- package/dist/components/InputData/AddressLabel.js +10 -8
- package/dist/components/InputData/ContractDetail.js +6 -5
- package/dist/components/InputData/JsonDecode.js +7 -5
- package/dist/components/InputData/OptimizationDecode.js +14 -12
- package/dist/components/InputData/Original.js +4 -3
- package/dist/components/InputData/UTF8.js +4 -3
- package/dist/components/InputData/index.js +19 -17
- package/dist/components/Modal/index.js +4 -3
- package/dist/components/NetworkIcon/index.js +3 -2
- package/dist/components/NetworkIcon/index.js.map +1 -1
- package/dist/components/OutputData/ErrorDecode.js +19 -17
- package/dist/components/OutputData/index.js +21 -19
- package/dist/components/PhishingAddressContainer/index.js +6 -4
- package/dist/components/PhishingAddressContainer/index.js.map +1 -1
- package/dist/components/Popover/index.js +4 -3
- package/dist/components/Price/index.js +5 -3
- package/dist/components/Price/index.js.map +1 -1
- package/dist/components/ProxyContractAddress/index.js +8 -6
- package/dist/components/ProxyContractAddress/index.js.map +1 -1
- package/dist/components/Radio/index.js +3 -2
- package/dist/components/Radio/index.js.map +1 -1
- package/dist/components/SearchInput/index.js +6 -4
- package/dist/components/SearchInput/index.js.map +1 -1
- package/dist/components/Select/index.js +5 -4
- package/dist/components/Select/select.js +4 -3
- package/dist/components/SmartAccountAddress/index.js +8 -6
- package/dist/components/SmartAccountAddress/index.js.map +1 -1
- package/dist/components/Text/index.js +6 -4
- package/dist/components/Tooltip/index.js +5 -3
- package/dist/components/TransactionAction/coreTransactionAction.js +12 -10
- package/dist/components/TransactionAction/coreTransactionAction.js.map +1 -1
- package/dist/components/TransactionAction/evmTransactionAction.js +11 -9
- package/dist/components/TransactionAction/evmTransactionAction.js.map +1 -1
- package/dist/components/TransactionTrace/TraceDetail.js +29 -27
- package/dist/components/TransactionTrace/TreeTraceTable.js +30 -28
- package/dist/components/TransactionTrace/index.js +30 -28
- package/dist/utils/address.js +3 -2
- package/dist/utils/contractManagerTool.js +3 -2
- package/dist/utils/contractManagerTool.js.map +1 -1
- package/dist/utils/hooks/useAbiItemById.js +3 -2
- package/dist/utils/hooks/useAddressLabel.js +4 -3
- package/dist/utils/hooks/useAddressNameMap.js +3 -2
- package/dist/utils/hooks/useAutoSetHolderFilterParams.js +8 -6
- package/dist/utils/hooks/useAutoSetHolderFilterParams.js.map +1 -1
- package/dist/utils/hooks/useClickAway.d.ts +5 -0
- package/dist/utils/hooks/useClickAway.js +8 -0
- package/dist/utils/hooks/useClickAway.js.map +1 -0
- package/dist/utils/hooks/useContractDetail.js +3 -2
- package/dist/utils/hooks/useContractsStatistics.js +2 -1
- package/dist/utils/hooks/useContractsStatistics.js.map +1 -1
- package/dist/utils/hooks/useDecodeFunctionData.js +6 -5
- package/dist/utils/hooks/useDecodeFunctionError.js +6 -5
- package/dist/utils/hooks/useENS.js +4 -3
- package/dist/utils/hooks/useEnhanceDataWithNameMap.js +3 -2
- package/dist/utils/hooks/useEnhanceDataWithNameMap.js.map +1 -1
- package/dist/utils/hooks/useMethodAbi.js +3 -2
- package/dist/utils/hooks/useSearchParams.js +2 -1
- package/dist/utils/hooks/useSimulateTrace.js +5 -4
- package/dist/utils/hooks/useSimulateTrace.js.map +1 -1
- package/dist/utils/hooks/useTableData.js +7 -5
- package/dist/utils/hooks/useTableData.js.map +1 -1
- package/dist/utils/hooks/useTxTrace.js +5 -4
- package/dist/utils/index.js +3 -2
- package/dist/utils/request.js +2 -1
- package/package.json +12 -5
- package/dist/chunk-QCA4QRD4.js.map +0 -1
- /package/dist/{chunk-ODPPKXIV.js.map → chunk-2PHHS2RO.js.map} +0 -0
- /package/dist/{chunk-TTMMIWXR.js.map → chunk-6B2K5TEW.js.map} +0 -0
- /package/dist/{chunk-LUHISU5F.js.map → chunk-6CSKHPNW.js.map} +0 -0
- /package/dist/{chunk-4MVQ3JTN.js.map → chunk-7XTWMLAL.js.map} +0 -0
- /package/dist/{chunk-4MEAKY73.js.map → chunk-BE7ARWED.js.map} +0 -0
- /package/dist/{chunk-TAEXZ5LI.js.map → chunk-BVUDZX7G.js.map} +0 -0
- /package/dist/{chunk-EGXD2GDI.js.map → chunk-DG5UBEHF.js.map} +0 -0
- /package/dist/{chunk-7FIPVSHQ.js.map → chunk-DYXED7QQ.js.map} +0 -0
- /package/dist/{chunk-WYM7FWXA.js.map → chunk-ESZKQ6TN.js.map} +0 -0
- /package/dist/{chunk-NBMABBMG.js.map → chunk-EXHT4Z5W.js.map} +0 -0
- /package/dist/{chunk-XGSBVC7P.js.map → chunk-FDTENXEV.js.map} +0 -0
- /package/dist/{chunk-OAUFBUYV.js.map → chunk-G5X35MKG.js.map} +0 -0
- /package/dist/{chunk-TIWELXT7.js.map → chunk-I2P6ZCOL.js.map} +0 -0
- /package/dist/{chunk-XIQH26WA.js.map → chunk-IGKHPUYH.js.map} +0 -0
- /package/dist/{chunk-B74PZXOZ.js.map → chunk-IZPVE2KL.js.map} +0 -0
- /package/dist/{chunk-CTCBKNSN.js.map → chunk-JY3EDI6L.js.map} +0 -0
- /package/dist/{chunk-LMY5VYFP.js.map → chunk-KJGWBTHN.js.map} +0 -0
- /package/dist/{chunk-2WY3J56A.js.map → chunk-KTHEE74W.js.map} +0 -0
- /package/dist/{chunk-H26P76N6.js.map → chunk-NQXQI7SA.js.map} +0 -0
- /package/dist/{chunk-3XNQKM2D.js.map → chunk-OBAIINAG.js.map} +0 -0
- /package/dist/{chunk-UBHTXZWS.js.map → chunk-OJKUPTS6.js.map} +0 -0
- /package/dist/{chunk-S2C6VOUJ.js.map → chunk-ONKMQT55.js.map} +0 -0
- /package/dist/{chunk-HTRUONHE.js.map → chunk-OZQ7HC6E.js.map} +0 -0
- /package/dist/{chunk-2RVLHSYV.js.map → chunk-P56G5URI.js.map} +0 -0
- /package/dist/{chunk-LZF26HB6.js.map → chunk-R6M4UPAP.js.map} +0 -0
- /package/dist/{chunk-IVE75CAC.js.map → chunk-ROINL4AD.js.map} +0 -0
- /package/dist/{chunk-QBF7EJFY.js.map → chunk-RPJ6QLNG.js.map} +0 -0
- /package/dist/{chunk-RK632STC.js.map → chunk-SW7XEZSP.js.map} +0 -0
- /package/dist/{chunk-YLBHOAH5.js.map → chunk-SWXU6RIW.js.map} +0 -0
- /package/dist/{chunk-OGZSZDXL.js.map → chunk-TLB3MT66.js.map} +0 -0
- /package/dist/{chunk-XJPWKT2J.js.map → chunk-URGXFUYM.js.map} +0 -0
- /package/dist/{chunk-36EB4LRH.js.map → chunk-V63T5THG.js.map} +0 -0
- /package/dist/{chunk-D5HJCIRL.js.map → chunk-VHVK63XA.js.map} +0 -0
- /package/dist/{chunk-2T3VTZXW.js.map → chunk-VTQN4OFN.js.map} +0 -0
- /package/dist/{chunk-2BLHJLZO.js.map → chunk-VYC4H34V.js.map} +0 -0
- /package/dist/{chunk-B7IDVT2B.js.map → chunk-WOL4GXHM.js.map} +0 -0
- /package/dist/{chunk-OUQEXLFQ.js.map → chunk-XD4ERIC5.js.map} +0 -0
- /package/dist/{chunk-QL4NKKTA.js.map → chunk-XF3VAJAR.js.map} +0 -0
|
@@ -1,45 +1,47 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OutputData
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-RPJ6QLNG.js";
|
|
4
|
+
import "../../chunk-NQXQI7SA.js";
|
|
5
|
+
import "../../chunk-FDTENXEV.js";
|
|
6
|
+
import "../../chunk-7XTWMLAL.js";
|
|
7
7
|
import "../../chunk-GPHUCEN2.js";
|
|
8
8
|
import "../../chunk-JVCFVNGV.js";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-IZPVE2KL.js";
|
|
10
|
+
import "../../chunk-P56G5URI.js";
|
|
11
|
+
import "../../chunk-OJKUPTS6.js";
|
|
12
|
+
import "../../chunk-SW7XEZSP.js";
|
|
13
|
+
import "../../chunk-XF3VAJAR.js";
|
|
14
14
|
import "../../chunk-GZMSESHY.js";
|
|
15
15
|
import "../../chunk-XI5WO2NW.js";
|
|
16
16
|
import "../../chunk-TPUZ46LY.js";
|
|
17
17
|
import "../../chunk-X35GBAUQ.js";
|
|
18
|
-
import "../../chunk-
|
|
18
|
+
import "../../chunk-WOL4GXHM.js";
|
|
19
19
|
import "../../chunk-SBFEY7I7.js";
|
|
20
20
|
import "../../chunk-6A3FV7ST.js";
|
|
21
|
-
import "../../chunk-
|
|
22
|
-
import "../../chunk-
|
|
21
|
+
import "../../chunk-KTHEE74W.js";
|
|
22
|
+
import "../../chunk-IGKHPUYH.js";
|
|
23
23
|
import "../../chunk-2ZR25NMU.js";
|
|
24
24
|
import "../../chunk-CGDNDBBP.js";
|
|
25
25
|
import "../../chunk-S6O6Q2GQ.js";
|
|
26
26
|
import "../../chunk-LBAEFEJU.js";
|
|
27
27
|
import "../../chunk-5TGK2EA2.js";
|
|
28
28
|
import "../../chunk-ADNS57X5.js";
|
|
29
|
-
import "../../chunk-
|
|
30
|
-
import "../../chunk-
|
|
29
|
+
import "../../chunk-VTQN4OFN.js";
|
|
30
|
+
import "../../chunk-ESZKQ6TN.js";
|
|
31
31
|
import "../../chunk-PRKOG6DK.js";
|
|
32
|
-
import "../../chunk-
|
|
33
|
-
import "../../chunk-
|
|
32
|
+
import "../../chunk-2PHHS2RO.js";
|
|
33
|
+
import "../../chunk-6B2K5TEW.js";
|
|
34
34
|
import "../../chunk-TOKKKTFG.js";
|
|
35
|
-
import "../../chunk-
|
|
35
|
+
import "../../chunk-KEXEB4J3.js";
|
|
36
|
+
import "../../chunk-ATKGS22K.js";
|
|
36
37
|
import "../../chunk-BMO4IZHV.js";
|
|
37
38
|
import "../../chunk-LRCAKRPK.js";
|
|
38
|
-
import "../../chunk-
|
|
39
|
+
import "../../chunk-DG5UBEHF.js";
|
|
39
40
|
import "../../chunk-HHJWVVJC.js";
|
|
40
|
-
import "../../chunk-
|
|
41
|
+
import "../../chunk-A66ETOJQ.js";
|
|
41
42
|
import "../../chunk-ON5OBLMV.js";
|
|
42
43
|
import "../../chunk-YEINMVAR.js";
|
|
44
|
+
import "../../chunk-X6IIYPI2.js";
|
|
43
45
|
import "../../chunk-L4AFJGXJ.js";
|
|
44
46
|
import "../../chunk-WQG2LZMB.js";
|
|
45
47
|
export {
|
|
@@ -3,17 +3,19 @@ import {
|
|
|
3
3
|
} from "../../chunk-3DOLNPRU.js";
|
|
4
4
|
import {
|
|
5
5
|
convertCheckSum
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-2PHHS2RO.js";
|
|
7
7
|
import {
|
|
8
8
|
Tooltip
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-KEXEB4J3.js";
|
|
10
|
+
import "../../chunk-ATKGS22K.js";
|
|
10
11
|
import "../../chunk-BMO4IZHV.js";
|
|
11
12
|
import "../../chunk-LRCAKRPK.js";
|
|
12
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-DG5UBEHF.js";
|
|
13
14
|
import "../../chunk-HHJWVVJC.js";
|
|
14
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-A66ETOJQ.js";
|
|
15
16
|
import "../../chunk-ON5OBLMV.js";
|
|
16
17
|
import "../../chunk-YEINMVAR.js";
|
|
18
|
+
import "../../chunk-X6IIYPI2.js";
|
|
17
19
|
import {
|
|
18
20
|
getTranslations
|
|
19
21
|
} from "../../chunk-L4AFJGXJ.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PhishingAddressContainer/index.tsx"],"sourcesContent":["import { getTranslations } from 'src/store';\nimport { Tooltip } from '../Tooltip';\nimport { PhishingWarningIcon } from './PhishingWarningIcon';\nimport { Trans } from 'react-i18next';\nimport { useMemo } from 'react';\nimport { convertCheckSum } from 'src/utils/address';\n\nexport interface PhishingData {\n key: string;\n regex: RegExp;\n list: {\n address: string;\n list: [string, string, string];\n }[];\n}\n\nexport const formatListResponseWithPhishingInfo = <\n T extends Record<string, unknown>,\n>(\n response: T,\n) => {\n if (!response || !response.phishingInfo || !response.list) {\n return response;\n }\n const phishingInfo = response.phishingInfo as Record<string, string[]>;\n const phishingRegex = Object.keys(phishingInfo).reduce((acc, key) => {\n const value = phishingInfo[key] || [];\n if (!Array.isArray(value) || value.length <= 1) {\n return acc;\n }\n const [start = '', end = ''] = key.split('...');\n const regex = new RegExp(`^(${start})(.*)(${end})$`, 'i');\n acc.push({\n key,\n regex,\n list: value.map(item => {\n const [_, start = '', middle = '', end = ''] =\n convertCheckSum(item).match(regex) || [];\n return {\n address: item,\n list: [start, middle, end],\n };\n }),\n });\n return acc;\n }, [] as PhishingData[]);\n if (phishingRegex.length === 0) {\n return response;\n }\n return {\n ...response,\n list: (response.list as Record<string, unknown>[]).map(item => {\n const fromPhishingData = phishingRegex.find(p =>\n p.regex.test((item.from || '') as string),\n );\n const toPhishingData = phishingRegex.find(p =>\n p.regex.test((item.to || '') as string),\n );\n return {\n ...item,\n fromPhishingData,\n toPhishingData,\n };\n }),\n };\n};\n\nconst PhishingAddress: React.FC<{\n start: string;\n end: string;\n middle: string;\n}> = ({ start, end, middle }) => {\n return (\n <span>\n <span className=\"text-#FFBB37\">{start}</span>\n <span>{middle}</span>\n <span className=\"text-#FFBB37\">{end}</span>\n </span>\n );\n};\n\nconst SimilarAddresses: React.FC<{\n list: [string, string, string][];\n}> = ({ list }) => {\n return (\n <div className=\"flex flex-col\">\n {list.map(item => (\n <PhishingAddress\n key={item[1]}\n start={item[0]}\n end={item[2]}\n middle={item[1]}\n />\n ))}\n </div>\n );\n};\n\nconst PhishingTooltip: React.FC<{\n phishingData: PhishingData;\n address: string;\n}> = ({ phishingData, address }) => {\n const translations = getTranslations();\n const { list: _list, key, regex } = phishingData;\n const { start, middle, end, list } = useMemo(() => {\n const [_, start = '', middle = '', end = ''] =\n convertCheckSum(address).match(regex) || [];\n return {\n start,\n middle,\n end,\n list: _list\n .filter(item => item.address.toLowerCase() !== address.toLowerCase())\n .map(item => item.list),\n };\n }, [address, key, _list]);\n\n return (\n <Tooltip\n className=\"flex items-center\"\n containerClassName=\"[&.sirius-next-tooltip>[data-part=content]]:text-10px\"\n title={\n <Trans i18nKey={translations.toolTip.phishingWarning}>\n <PhishingAddress start={start} end={end} middle={middle} />\n <SimilarAddresses list={list} />\n </Trans>\n }\n >\n <PhishingWarningIcon className=\"text-#FFBB37\" />\n </Tooltip>\n );\n};\n\nexport const PhishingAddressContainer: React.FC<\n React.PropsWithChildren & {\n address?: string;\n phishingData?: PhishingData;\n }\n> = ({ children, phishingData, address }) => {\n if (address && phishingData && phishingData.list.length > 0) {\n return (\n <div className=\"flex items-center\">\n <PhishingTooltip phishingData={phishingData} address={address} />\n {children}\n </div>\n );\n }\n return children;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/PhishingAddressContainer/index.tsx"],"sourcesContent":["import { getTranslations } from 'src/store';\nimport { Tooltip } from '../Tooltip';\nimport { PhishingWarningIcon } from './PhishingWarningIcon';\nimport { Trans } from 'react-i18next';\nimport { useMemo } from 'react';\nimport { convertCheckSum } from 'src/utils/address';\n\nexport interface PhishingData {\n key: string;\n regex: RegExp;\n list: {\n address: string;\n list: [string, string, string];\n }[];\n}\n\nexport const formatListResponseWithPhishingInfo = <\n T extends Record<string, unknown>,\n>(\n response: T,\n) => {\n if (!response || !response.phishingInfo || !response.list) {\n return response;\n }\n const phishingInfo = response.phishingInfo as Record<string, string[]>;\n const phishingRegex = Object.keys(phishingInfo).reduce((acc, key) => {\n const value = phishingInfo[key] || [];\n if (!Array.isArray(value) || value.length <= 1) {\n return acc;\n }\n const [start = '', end = ''] = key.split('...');\n const regex = new RegExp(`^(${start})(.*)(${end})$`, 'i');\n acc.push({\n key,\n regex,\n list: value.map(item => {\n const [_, start = '', middle = '', end = ''] =\n convertCheckSum(item).match(regex) || [];\n return {\n address: item,\n list: [start, middle, end],\n };\n }),\n });\n return acc;\n }, [] as PhishingData[]);\n if (phishingRegex.length === 0) {\n return response;\n }\n return {\n ...response,\n list: (response.list as Record<string, unknown>[]).map(item => {\n const fromPhishingData = phishingRegex.find(p =>\n p.regex.test((item.from || '') as string),\n );\n const toPhishingData = phishingRegex.find(p =>\n p.regex.test((item.to || '') as string),\n );\n return {\n ...item,\n fromPhishingData,\n toPhishingData,\n };\n }),\n };\n};\n\nconst PhishingAddress: React.FC<{\n start: string;\n end: string;\n middle: string;\n}> = ({ start, end, middle }) => {\n return (\n <span>\n <span className=\"text-#FFBB37\">{start}</span>\n <span>{middle}</span>\n <span className=\"text-#FFBB37\">{end}</span>\n </span>\n );\n};\n\nconst SimilarAddresses: React.FC<{\n list: [string, string, string][];\n}> = ({ list }) => {\n return (\n <div className=\"flex flex-col\">\n {list.map(item => (\n <PhishingAddress\n key={item[1]}\n start={item[0]}\n end={item[2]}\n middle={item[1]}\n />\n ))}\n </div>\n );\n};\n\nconst PhishingTooltip: React.FC<{\n phishingData: PhishingData;\n address: string;\n}> = ({ phishingData, address }) => {\n const translations = getTranslations();\n const { list: _list, key, regex } = phishingData;\n const { start, middle, end, list } = useMemo(() => {\n const [_, start = '', middle = '', end = ''] =\n convertCheckSum(address).match(regex) || [];\n return {\n start,\n middle,\n end,\n list: _list\n .filter(item => item.address.toLowerCase() !== address.toLowerCase())\n .map(item => item.list),\n };\n }, [address, key, _list]);\n\n return (\n <Tooltip\n className=\"flex items-center\"\n containerClassName=\"[&.sirius-next-tooltip>[data-part=content]]:text-10px\"\n title={\n <Trans i18nKey={translations.toolTip.phishingWarning}>\n <PhishingAddress start={start} end={end} middle={middle} />\n <SimilarAddresses list={list} />\n </Trans>\n }\n >\n <PhishingWarningIcon className=\"text-#FFBB37\" />\n </Tooltip>\n );\n};\n\nexport const PhishingAddressContainer: React.FC<\n React.PropsWithChildren & {\n address?: string;\n phishingData?: PhishingData;\n }\n> = ({ children, phishingData, address }) => {\n if (address && phishingData && phishingData.list.length > 0) {\n return (\n <div className=\"flex items-center\">\n <PhishingTooltip phishingData={phishingData} address={address} />\n {children}\n </div>\n );\n }\n return children;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,aAAa;AACtB,SAAS,eAA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;AAAA,MAGF,8BAAC,uBAAoB,WAAU,gBAAe;AAAA;AAAA,EAChD;AAEJ;AAEO,IAAM,2BAKT,CAAC,EAAE,UAAU,cAAc,QAAQ,MAAM;AAC3C,MAAI,WAAW,gBAAgB,aAAa,KAAK,SAAS,GAAG;AAC3D,WACE,qBAAC,SAAI,WAAU,qBACb;AAAA,0BAAC,mBAAgB,cAA4B,SAAkB;AAAA,MAC9D;AAAA,OACH;AAAA,EAEJ;AACA,SAAO;AACT;","names":["start","end","middle"]}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Popover
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-ONKMQT55.js";
|
|
4
4
|
import "../../chunk-BMO4IZHV.js";
|
|
5
5
|
import "../../chunk-LRCAKRPK.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-DG5UBEHF.js";
|
|
7
7
|
import "../../chunk-HHJWVVJC.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-A66ETOJQ.js";
|
|
9
9
|
import "../../chunk-ON5OBLMV.js";
|
|
10
10
|
import "../../chunk-YEINMVAR.js";
|
|
11
|
+
import "../../chunk-X6IIYPI2.js";
|
|
11
12
|
import "../../chunk-L4AFJGXJ.js";
|
|
12
13
|
import "../../chunk-WQG2LZMB.js";
|
|
13
14
|
export {
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tooltip
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-KEXEB4J3.js";
|
|
4
|
+
import "../../chunk-ATKGS22K.js";
|
|
4
5
|
import "../../chunk-BMO4IZHV.js";
|
|
5
6
|
import "../../chunk-LRCAKRPK.js";
|
|
6
7
|
import {
|
|
7
8
|
formatPrice
|
|
8
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-DG5UBEHF.js";
|
|
9
10
|
import "../../chunk-HHJWVVJC.js";
|
|
10
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-A66ETOJQ.js";
|
|
11
12
|
import "../../chunk-ON5OBLMV.js";
|
|
12
13
|
import "../../chunk-YEINMVAR.js";
|
|
14
|
+
import "../../chunk-X6IIYPI2.js";
|
|
13
15
|
import "../../chunk-L4AFJGXJ.js";
|
|
14
16
|
import "../../chunk-WQG2LZMB.js";
|
|
15
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Price/index.tsx"],"sourcesContent":["/**\n *\n * Footer\n *\n */\nimport React from 'react';\nimport { formatPrice } from '../../utils';\nimport { Tooltip } from '../Tooltip';\n\nexport const Price = ({\n children,\n showTooltip = true,\n}: {\n children: string | number;\n showTooltip?: boolean;\n}) => {\n if (['NaN', 'undefined', 'null'].includes(String(children))) {\n return <span>--</span>;\n }\n\n const [fPrice, fullPrice] = formatPrice(children);\n\n return fullPrice && showTooltip ? (\n <Tooltip\n title={\n <span\n style={{\n whiteSpace: 'nowrap',\n }}\n >\n {fullPrice}\n </span>\n }\n >\n <span>{fPrice}</span>\n </Tooltip>\n ) : (\n <span>{fPrice}</span>\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Price/index.tsx"],"sourcesContent":["/**\n *\n * Footer\n *\n */\nimport React from 'react';\nimport { formatPrice } from '../../utils';\nimport { Tooltip } from '../Tooltip';\n\nexport const Price = ({\n children,\n showTooltip = true,\n}: {\n children: string | number;\n showTooltip?: boolean;\n}) => {\n if (['NaN', 'undefined', 'null'].includes(String(children))) {\n return <span>--</span>;\n }\n\n const [fPrice, fullPrice] = formatPrice(children);\n\n return fullPrice && showTooltip ? (\n <Tooltip\n title={\n <span\n style={{\n whiteSpace: 'nowrap',\n }}\n >\n {fullPrice}\n </span>\n }\n >\n <span>{fPrice}</span>\n </Tooltip>\n ) : (\n <span>{fPrice}</span>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBW;AARJ,IAAM,QAAQ,CAAC;AAAA,EACpB;AAAA,EACA,cAAc;AAChB,MAGM;AACJ,MAAI,CAAC,OAAO,aAAa,MAAM,EAAE,SAAS,OAAO,QAAQ,CAAC,GAAG;AAC3D,WAAO,oBAAC,UAAK,gBAAE;AAAA,EACjB;AAEA,QAAM,CAAC,QAAQ,SAAS,IAAI,YAAY,QAAQ;AAEhD,SAAO,aAAa,cAClB;AAAA,IAAC;AAAA;AAAA,MACC,OACE;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,YACL,YAAY;AAAA,UACd;AAAA,UAEC;AAAA;AAAA,MACH;AAAA,MAGF,8BAAC,UAAM,kBAAO;AAAA;AAAA,EAChB,IAEA,oBAAC,UAAM,kBAAO;AAElB;","names":[]}
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAddressLabel
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-OJKUPTS6.js";
|
|
4
4
|
import {
|
|
5
5
|
Link
|
|
6
6
|
} from "../../chunk-TPUZ46LY.js";
|
|
7
7
|
import "../../chunk-X35GBAUQ.js";
|
|
8
8
|
import {
|
|
9
9
|
getAddressNameInfo
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-ESZKQ6TN.js";
|
|
11
11
|
import {
|
|
12
12
|
isInnerContractAddress
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-2PHHS2RO.js";
|
|
14
14
|
import {
|
|
15
15
|
Tooltip
|
|
16
|
-
} from "../../chunk-
|
|
16
|
+
} from "../../chunk-KEXEB4J3.js";
|
|
17
|
+
import "../../chunk-ATKGS22K.js";
|
|
17
18
|
import "../../chunk-BMO4IZHV.js";
|
|
18
19
|
import "../../chunk-LRCAKRPK.js";
|
|
19
20
|
import {
|
|
20
21
|
cn
|
|
21
|
-
} from "../../chunk-
|
|
22
|
+
} from "../../chunk-DG5UBEHF.js";
|
|
22
23
|
import "../../chunk-HHJWVVJC.js";
|
|
23
|
-
import "../../chunk-
|
|
24
|
+
import "../../chunk-A66ETOJQ.js";
|
|
24
25
|
import "../../chunk-ON5OBLMV.js";
|
|
25
26
|
import "../../chunk-YEINMVAR.js";
|
|
27
|
+
import "../../chunk-X6IIYPI2.js";
|
|
26
28
|
import {
|
|
27
29
|
getTranslations
|
|
28
30
|
} from "../../chunk-L4AFJGXJ.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ProxyContractAddress/index.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next';\nimport { getTranslations } from 'src/store';\nimport { isInnerContractAddress } from 'src/utils/address';\nimport { Tooltip } from '../Tooltip';\nimport InternalContractIcon from '../../images/internal-contract-icon.png';\nimport ContractIcon from '../../images/contract-icon.png';\nimport VerifiedIcon from '../../images/verified.png';\nimport { shortenAddress } from '@cfx-kit/dapp-utils/dist/address';\nimport { cn } from 'src/utils';\nimport { ProxyType } from 'src/utils/hooks/useTxTrace';\nimport { useAddressLabel } from 'src/utils/hooks/useAddressLabel';\nimport { useMemo } from 'react';\nimport { Link } from '../Link';\nimport { CoreAddressContainerProps } from '../AddressContainer/types';\nimport { getAddressNameInfo } from '../AddressContainer/utils';\n\nexport const ProxyContractAddress = (\n props: Pick<\n CoreAddressContainerProps,\n | 'value'\n | 'contractName'\n | 'tokenName'\n | 'showVerificationName'\n | 'verificationName'\n | 'isFull'\n | 'verify'\n | 'showIcon'\n | 'showAddressLabel'\n | 'showENSLabel'\n | 'ensName'\n | 'showNametag'\n | 'nametag'\n | 'nameMap'\n > & {\n proxy: {\n type: ProxyType;\n implAddress: string;\n beaconAddress?: string;\n };\n style?: React.CSSProperties;\n className?: string;\n },\n) => {\n const {\n showIcon = true,\n showAddressLabel = true,\n showVerificationName = false,\n value,\n isFull = false,\n proxy,\n className,\n style,\n showENSLabel = true,\n showNametag = true,\n nameMap,\n } = props;\n\n const nameInfo = getAddressNameInfo(value, nameMap);\n\n const tokenName = props.tokenName ?? nameInfo?.tokenName;\n const contractName = props.contractName ?? nameInfo?.contractName;\n const verificationName = props.verificationName ?? nameInfo?.verificationName;\n const verify = props.verify ?? nameInfo?.verify;\n\n const nametag = props.nametag ?? nameInfo?.nametag;\n const ensName = props.ensName ?? nameInfo?.ensName;\n\n const { t } = useTranslation();\n const translations = getTranslations();\n const addressLabel = useAddressLabel(value, showAddressLabel);\n\n const text = useMemo(() => {\n // Private name tags > Official tag/name > contract token name > contract tag > contract name > CNS/ENS\n return (\n addressLabel ||\n (showNametag ? nametag : undefined) ||\n tokenName ||\n contractName ||\n (showVerificationName && verificationName) ||\n (showENSLabel ? ensName : undefined) ||\n (isFull ? value : shortenAddress(value))\n );\n }, [\n nametag,\n value,\n showNametag,\n addressLabel,\n contractName,\n tokenName,\n showVerificationName,\n verificationName,\n isFull,\n showENSLabel,\n ensName,\n ]);\n\n const isInnerContract = value && isInnerContractAddress(value);\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 (\n <div className=\"inline-flex\">\n {showIcon && (\n <div className={`mr-[2px] flex-shrink-0`}>\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 <Tooltip\n title={\n <div className=\"flex flex-col gap-5px\">\n <div>\n {proxy.type}: {value}\n </div>\n {proxy.beaconAddress && <div>Beacon: {proxy.beaconAddress}</div>}\n <div>Impl: {proxy.implAddress}</div>\n </div>\n }\n containerClassName=\"max-w-unset\"\n >\n <Link\n className={cn(\n 'block relative align-bottom cursor-pointer truncate max-w-220px',\n className,\n )}\n href={`/address/${value}`}\n style={style}\n >\n {text} ({proxy.type})\n </Link>\n </Tooltip>\n </div>\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ProxyContractAddress/index.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next';\nimport { getTranslations } from 'src/store';\nimport { isInnerContractAddress } from 'src/utils/address';\nimport { Tooltip } from '../Tooltip';\nimport InternalContractIcon from '../../images/internal-contract-icon.png';\nimport ContractIcon from '../../images/contract-icon.png';\nimport VerifiedIcon from '../../images/verified.png';\nimport { shortenAddress } from '@cfx-kit/dapp-utils/dist/address';\nimport { cn } from 'src/utils';\nimport { ProxyType } from 'src/utils/hooks/useTxTrace';\nimport { useAddressLabel } from 'src/utils/hooks/useAddressLabel';\nimport { useMemo } from 'react';\nimport { Link } from '../Link';\nimport { CoreAddressContainerProps } from '../AddressContainer/types';\nimport { getAddressNameInfo } from '../AddressContainer/utils';\n\nexport const ProxyContractAddress = (\n props: Pick<\n CoreAddressContainerProps,\n | 'value'\n | 'contractName'\n | 'tokenName'\n | 'showVerificationName'\n | 'verificationName'\n | 'isFull'\n | 'verify'\n | 'showIcon'\n | 'showAddressLabel'\n | 'showENSLabel'\n | 'ensName'\n | 'showNametag'\n | 'nametag'\n | 'nameMap'\n > & {\n proxy: {\n type: ProxyType;\n implAddress: string;\n beaconAddress?: string;\n };\n style?: React.CSSProperties;\n className?: string;\n },\n) => {\n const {\n showIcon = true,\n showAddressLabel = true,\n showVerificationName = false,\n value,\n isFull = false,\n proxy,\n className,\n style,\n showENSLabel = true,\n showNametag = true,\n nameMap,\n } = props;\n\n const nameInfo = getAddressNameInfo(value, nameMap);\n\n const tokenName = props.tokenName ?? nameInfo?.tokenName;\n const contractName = props.contractName ?? nameInfo?.contractName;\n const verificationName = props.verificationName ?? nameInfo?.verificationName;\n const verify = props.verify ?? nameInfo?.verify;\n\n const nametag = props.nametag ?? nameInfo?.nametag;\n const ensName = props.ensName ?? nameInfo?.ensName;\n\n const { t } = useTranslation();\n const translations = getTranslations();\n const addressLabel = useAddressLabel(value, showAddressLabel);\n\n const text = useMemo(() => {\n // Private name tags > Official tag/name > contract token name > contract tag > contract name > CNS/ENS\n return (\n addressLabel ||\n (showNametag ? nametag : undefined) ||\n tokenName ||\n contractName ||\n (showVerificationName && verificationName) ||\n (showENSLabel ? ensName : undefined) ||\n (isFull ? value : shortenAddress(value))\n );\n }, [\n nametag,\n value,\n showNametag,\n addressLabel,\n contractName,\n tokenName,\n showVerificationName,\n verificationName,\n isFull,\n showENSLabel,\n ensName,\n ]);\n\n const isInnerContract = value && isInnerContractAddress(value);\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 (\n <div className=\"inline-flex\">\n {showIcon && (\n <div className={`mr-[2px] flex-shrink-0`}>\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 <Tooltip\n title={\n <div className=\"flex flex-col gap-5px\">\n <div>\n {proxy.type}: {value}\n </div>\n {proxy.beaconAddress && <div>Beacon: {proxy.beaconAddress}</div>}\n <div>Impl: {proxy.implAddress}</div>\n </div>\n }\n containerClassName=\"max-w-unset\"\n >\n <Link\n className={cn(\n 'block relative align-bottom cursor-pointer truncate max-w-220px',\n className,\n )}\n href={`/address/${value}`}\n style={style}\n >\n {text} ({proxy.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import "../../chunk-
|
|
5
|
+
import "../../chunk-A66ETOJQ.js";
|
|
6
6
|
import "../../chunk-ON5OBLMV.js";
|
|
7
7
|
import "../../chunk-YEINMVAR.js";
|
|
8
|
+
import "../../chunk-X6IIYPI2.js";
|
|
8
9
|
import "../../chunk-L4AFJGXJ.js";
|
|
9
10
|
import "../../chunk-WQG2LZMB.js";
|
|
10
11
|
|