@cfxjs/sirius-next-common 0.1.33 → 0.1.34
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-27U3ZES6.js +212 -0
- package/dist/chunk-27U3ZES6.js.map +1 -0
- package/dist/chunk-2BYZ7YCR.js +63 -0
- package/dist/chunk-2BYZ7YCR.js.map +1 -0
- package/dist/chunk-2DTZKTKF.js +63 -0
- package/dist/chunk-2DTZKTKF.js.map +1 -0
- package/dist/chunk-2E3YJCV3.js +127 -0
- package/dist/chunk-2E3YJCV3.js.map +1 -0
- package/dist/chunk-2ICNULC2.js +254 -0
- package/dist/chunk-2ICNULC2.js.map +1 -0
- package/dist/chunk-2LPOU4PC.js +141 -0
- package/dist/chunk-2LPOU4PC.js.map +1 -0
- package/dist/chunk-2MSHBEWL.js +268 -0
- package/dist/chunk-2MSHBEWL.js.map +1 -0
- package/dist/chunk-2SCHWFIY.js +105 -0
- package/dist/chunk-2SCHWFIY.js.map +1 -0
- package/dist/chunk-3BYHQHWI.js +212 -0
- package/dist/chunk-3BYHQHWI.js.map +1 -0
- package/dist/chunk-3DTLHHIA.js +796 -0
- package/dist/chunk-3DTLHHIA.js.map +1 -0
- package/dist/chunk-3GT2MSFN.js +105 -0
- package/dist/chunk-3GT2MSFN.js.map +1 -0
- package/dist/chunk-3TE65Q5Q.js +105 -0
- package/dist/chunk-3TE65Q5Q.js.map +1 -0
- package/dist/chunk-3UE7QPSR.js +141 -0
- package/dist/chunk-3UE7QPSR.js.map +1 -0
- package/dist/chunk-4LTDTOPU.js +49 -0
- package/dist/chunk-4LTDTOPU.js.map +1 -0
- package/dist/chunk-4OVKJTEK.js +254 -0
- package/dist/chunk-4OVKJTEK.js.map +1 -0
- package/dist/chunk-54S3AFTR.js +141 -0
- package/dist/chunk-54S3AFTR.js.map +1 -0
- package/dist/chunk-5G3TPHDI.js +49 -0
- package/dist/chunk-5G3TPHDI.js.map +1 -0
- package/dist/chunk-5HPBFAVS.js +108 -0
- package/dist/chunk-5HPBFAVS.js.map +1 -0
- package/dist/chunk-5MMGA5S5.js +108 -0
- package/dist/chunk-5MMGA5S5.js.map +1 -0
- package/dist/chunk-5O5QALCR.js +49 -0
- package/dist/chunk-5O5QALCR.js.map +1 -0
- package/dist/chunk-5PHY7B5Q.js +127 -0
- package/dist/chunk-5PHY7B5Q.js.map +1 -0
- package/dist/chunk-5QV6FSW5.js +108 -0
- package/dist/chunk-5QV6FSW5.js.map +1 -0
- package/dist/chunk-5TCARLKL.js +268 -0
- package/dist/chunk-5TCARLKL.js.map +1 -0
- package/dist/chunk-5VLX5LYF.js +796 -0
- package/dist/chunk-5VLX5LYF.js.map +1 -0
- package/dist/chunk-663WU3VG.js +127 -0
- package/dist/chunk-663WU3VG.js.map +1 -0
- package/dist/chunk-6A5P5KI3.js +141 -0
- package/dist/chunk-6A5P5KI3.js.map +1 -0
- package/dist/chunk-6ECE7EAG.js +63 -0
- package/dist/chunk-6ECE7EAG.js.map +1 -0
- package/dist/chunk-6JGJBJQ5.js +268 -0
- package/dist/chunk-6JGJBJQ5.js.map +1 -0
- package/dist/chunk-6LDWVWGX.js +3629 -0
- package/dist/chunk-6LDWVWGX.js.map +1 -0
- package/dist/chunk-6LZKERHY.js +273 -0
- package/dist/chunk-6LZKERHY.js.map +1 -0
- package/dist/chunk-6RTSZQPF.js +150 -0
- package/dist/chunk-6RTSZQPF.js.map +1 -0
- package/dist/chunk-6T7MFHX3.js +2324 -0
- package/dist/chunk-6T7MFHX3.js.map +1 -0
- package/dist/chunk-6ZC5J3YR.js +212 -0
- package/dist/chunk-6ZC5J3YR.js.map +1 -0
- package/dist/chunk-7355VRDR.js +108 -0
- package/dist/chunk-7355VRDR.js.map +1 -0
- package/dist/chunk-73ACKXGM.js +254 -0
- package/dist/chunk-73ACKXGM.js.map +1 -0
- package/dist/chunk-7FHJMA3Z.js +212 -0
- package/dist/chunk-7FHJMA3Z.js.map +1 -0
- package/dist/chunk-7NSYEE6O.js +127 -0
- package/dist/chunk-7NSYEE6O.js.map +1 -0
- package/dist/chunk-7PGOPD6T.js +63 -0
- package/dist/chunk-7PGOPD6T.js.map +1 -0
- package/dist/chunk-A25FZPUD.js +268 -0
- package/dist/chunk-A25FZPUD.js.map +1 -0
- package/dist/chunk-A4KAYCOA.js +63 -0
- package/dist/chunk-A4KAYCOA.js.map +1 -0
- package/dist/chunk-AC3QYTOI.js +141 -0
- package/dist/chunk-AC3QYTOI.js.map +1 -0
- package/dist/chunk-APYD7IKG.js +49 -0
- package/dist/chunk-APYD7IKG.js.map +1 -0
- package/dist/chunk-AVY3BJ2X.js +127 -0
- package/dist/chunk-AVY3BJ2X.js.map +1 -0
- package/dist/chunk-AZ6RP3ME.js +278 -0
- package/dist/chunk-AZ6RP3ME.js.map +1 -0
- package/dist/chunk-B24CPBDV.js +150 -0
- package/dist/chunk-B24CPBDV.js.map +1 -0
- package/dist/chunk-BC6MQSTI.js +108 -0
- package/dist/chunk-BC6MQSTI.js.map +1 -0
- package/dist/chunk-BETECLYX.js +2324 -0
- package/dist/chunk-BETECLYX.js.map +1 -0
- package/dist/chunk-BGRIHUGF.js +127 -0
- package/dist/chunk-BGRIHUGF.js.map +1 -0
- package/dist/chunk-BGSOKXPS.js +3629 -0
- package/dist/chunk-BGSOKXPS.js.map +1 -0
- package/dist/chunk-BQU5GLOL.js +273 -0
- package/dist/chunk-BQU5GLOL.js.map +1 -0
- package/dist/chunk-BY6TBBZC.js +63 -0
- package/dist/chunk-BY6TBBZC.js.map +1 -0
- package/dist/chunk-CGNWZ4SF.js +108 -0
- package/dist/chunk-CGNWZ4SF.js.map +1 -0
- package/dist/chunk-CWPEXIAP.js +212 -0
- package/dist/chunk-CWPEXIAP.js.map +1 -0
- package/dist/chunk-CX3RKYHL.js +141 -0
- package/dist/chunk-CX3RKYHL.js.map +1 -0
- package/dist/chunk-DDQPPG36.js +63 -0
- package/dist/chunk-DDQPPG36.js.map +1 -0
- package/dist/chunk-DFGPW4FH.js +141 -0
- package/dist/chunk-DFGPW4FH.js.map +1 -0
- package/dist/chunk-DGMKQGSS.js +255 -0
- package/dist/chunk-DGMKQGSS.js.map +1 -0
- package/dist/chunk-DH7E2QJY.js +63 -0
- package/dist/chunk-DH7E2QJY.js.map +1 -0
- package/dist/chunk-DJMQJGDU.js +127 -0
- package/dist/chunk-DJMQJGDU.js.map +1 -0
- package/dist/chunk-DNAOZ3CB.js +127 -0
- package/dist/chunk-DNAOZ3CB.js.map +1 -0
- package/dist/chunk-DRMEOOSC.js +268 -0
- package/dist/chunk-DRMEOOSC.js.map +1 -0
- package/dist/chunk-DSBTIIE2.js +63 -0
- package/dist/chunk-DSBTIIE2.js.map +1 -0
- package/dist/chunk-DX5EXIMK.js +2324 -0
- package/dist/chunk-DX5EXIMK.js.map +1 -0
- package/dist/chunk-DYGOHLN4.js +108 -0
- package/dist/chunk-DYGOHLN4.js.map +1 -0
- package/dist/chunk-DYTSBPL6.js +108 -0
- package/dist/chunk-DYTSBPL6.js.map +1 -0
- package/dist/chunk-ENJ2UI5Q.js +127 -0
- package/dist/chunk-ENJ2UI5Q.js.map +1 -0
- package/dist/chunk-EOYF4Z6B.js +212 -0
- package/dist/chunk-EOYF4Z6B.js.map +1 -0
- package/dist/chunk-EVMADMHS.js +108 -0
- package/dist/chunk-EVMADMHS.js.map +1 -0
- package/dist/chunk-F25QUZ3T.js +127 -0
- package/dist/chunk-F25QUZ3T.js.map +1 -0
- package/dist/chunk-F6PRHM5V.js +2324 -0
- package/dist/chunk-F6PRHM5V.js.map +1 -0
- package/dist/chunk-FAUXJQMT.js +141 -0
- package/dist/chunk-FAUXJQMT.js.map +1 -0
- package/dist/chunk-FWKC2BLZ.js +212 -0
- package/dist/chunk-FWKC2BLZ.js.map +1 -0
- package/dist/chunk-G2H5OP2H.js +49 -0
- package/dist/chunk-G2H5OP2H.js.map +1 -0
- package/dist/chunk-G4J7I73Y.js +37 -0
- package/dist/chunk-G4J7I73Y.js.map +1 -0
- package/dist/chunk-GQC5LNVW.js +63 -0
- package/dist/chunk-GQC5LNVW.js.map +1 -0
- package/dist/chunk-GYYQP4DT.js +127 -0
- package/dist/chunk-GYYQP4DT.js.map +1 -0
- package/dist/chunk-GZBFBCQI.js +63 -0
- package/dist/chunk-GZBFBCQI.js.map +1 -0
- package/dist/chunk-HGLER5MY.js +796 -0
- package/dist/chunk-HGLER5MY.js.map +1 -0
- package/dist/chunk-HQ6KWJFH.js +49 -0
- package/dist/chunk-HQ6KWJFH.js.map +1 -0
- package/dist/chunk-HQQ5ZL6Q.js +49 -0
- package/dist/chunk-HQQ5ZL6Q.js.map +1 -0
- package/dist/chunk-HRAKHATH.js +150 -0
- package/dist/chunk-HRAKHATH.js.map +1 -0
- package/dist/chunk-ILSVC4UY.js +3629 -0
- package/dist/chunk-ILSVC4UY.js.map +1 -0
- package/dist/chunk-IQIVBN66.js +273 -0
- package/dist/chunk-IQIVBN66.js.map +1 -0
- package/dist/chunk-IUQBQLM6.js +19 -0
- package/dist/chunk-IUQBQLM6.js.map +1 -0
- package/dist/chunk-IVS3J33K.js +212 -0
- package/dist/chunk-IVS3J33K.js.map +1 -0
- package/dist/chunk-J6D3CAR7.js +127 -0
- package/dist/chunk-J6D3CAR7.js.map +1 -0
- package/dist/chunk-JCKMXITS.js +212 -0
- package/dist/chunk-JCKMXITS.js.map +1 -0
- package/dist/chunk-JCT3BKSW.js +3629 -0
- package/dist/chunk-JCT3BKSW.js.map +1 -0
- package/dist/chunk-JDLXU3ZF.js +108 -0
- package/dist/chunk-JDLXU3ZF.js.map +1 -0
- package/dist/chunk-JL6ZIJUH.js +2324 -0
- package/dist/chunk-JL6ZIJUH.js.map +1 -0
- package/dist/chunk-K4SYGDQ7.js +63 -0
- package/dist/chunk-K4SYGDQ7.js.map +1 -0
- package/dist/chunk-K5Z6QUIM.js +141 -0
- package/dist/chunk-K5Z6QUIM.js.map +1 -0
- package/dist/chunk-KD6CGNYU.js +254 -0
- package/dist/chunk-KD6CGNYU.js.map +1 -0
- package/dist/chunk-L65LHFIO.js +141 -0
- package/dist/chunk-L65LHFIO.js.map +1 -0
- package/dist/chunk-LBVZAZ6U.js +63 -0
- package/dist/chunk-LBVZAZ6U.js.map +1 -0
- package/dist/chunk-LHMHEG43.js +796 -0
- package/dist/chunk-LHMHEG43.js.map +1 -0
- package/dist/chunk-LJW6ZBRN.js +273 -0
- package/dist/chunk-LJW6ZBRN.js.map +1 -0
- package/dist/chunk-LYXB4GLH.js +108 -0
- package/dist/chunk-LYXB4GLH.js.map +1 -0
- package/dist/chunk-M2B6MZSF.js +796 -0
- package/dist/chunk-M2B6MZSF.js.map +1 -0
- package/dist/chunk-M6WAUVRX.js +212 -0
- package/dist/chunk-M6WAUVRX.js.map +1 -0
- package/dist/chunk-M7ID5HPC.js +150 -0
- package/dist/chunk-M7ID5HPC.js.map +1 -0
- package/dist/chunk-MIVIXDFN.js +63 -0
- package/dist/chunk-MIVIXDFN.js.map +1 -0
- package/dist/chunk-MZAIX5H4.js +254 -0
- package/dist/chunk-MZAIX5H4.js.map +1 -0
- package/dist/chunk-N56EOFH7.js +212 -0
- package/dist/chunk-N56EOFH7.js.map +1 -0
- package/dist/chunk-NCDYCEFI.js +141 -0
- package/dist/chunk-NCDYCEFI.js.map +1 -0
- package/dist/chunk-NOLINMVX.js +63 -0
- package/dist/chunk-NOLINMVX.js.map +1 -0
- package/dist/chunk-NR7VYRLX.js +212 -0
- package/dist/chunk-NR7VYRLX.js.map +1 -0
- package/dist/chunk-NSIDPAOP.js +212 -0
- package/dist/chunk-NSIDPAOP.js.map +1 -0
- package/dist/chunk-NSXFJV7H.js +255 -0
- package/dist/chunk-NSXFJV7H.js.map +1 -0
- package/dist/chunk-NV7LKWOG.js +141 -0
- package/dist/chunk-NV7LKWOG.js.map +1 -0
- package/dist/chunk-NWY2GONC.js +268 -0
- package/dist/chunk-NWY2GONC.js.map +1 -0
- package/dist/chunk-O5TVIMND.js +127 -0
- package/dist/chunk-O5TVIMND.js.map +1 -0
- package/dist/chunk-OG2QBBAF.js +49 -0
- package/dist/chunk-OG2QBBAF.js.map +1 -0
- package/dist/chunk-OK3EPS2C.js +2324 -0
- package/dist/chunk-OK3EPS2C.js.map +1 -0
- package/dist/chunk-OLWGRNA6.js +254 -0
- package/dist/chunk-OLWGRNA6.js.map +1 -0
- package/dist/chunk-OQI2W7LB.js +108 -0
- package/dist/chunk-OQI2W7LB.js.map +1 -0
- package/dist/chunk-OS4E6J4B.js +268 -0
- package/dist/chunk-OS4E6J4B.js.map +1 -0
- package/dist/chunk-P2NXBCRI.js +108 -0
- package/dist/chunk-P2NXBCRI.js.map +1 -0
- package/dist/chunk-PLDMHO2P.js +284 -0
- package/dist/chunk-PLDMHO2P.js.map +1 -0
- package/dist/chunk-PQ5G5Y3F.js +269 -0
- package/dist/chunk-PQ5G5Y3F.js.map +1 -0
- package/dist/chunk-PRFI5PWG.js +3629 -0
- package/dist/chunk-PRFI5PWG.js.map +1 -0
- package/dist/chunk-PYYIF6GR.js +108 -0
- package/dist/chunk-PYYIF6GR.js.map +1 -0
- package/dist/chunk-Q35VQXCA.js +288 -0
- package/dist/chunk-Q35VQXCA.js.map +1 -0
- package/dist/chunk-QBGHXA67.js +141 -0
- package/dist/chunk-QBGHXA67.js.map +1 -0
- package/dist/chunk-QBMZ6QXX.js +212 -0
- package/dist/chunk-QBMZ6QXX.js.map +1 -0
- package/dist/chunk-QFBKNCBJ.js +141 -0
- package/dist/chunk-QFBKNCBJ.js.map +1 -0
- package/dist/chunk-QJIALKBF.js +141 -0
- package/dist/chunk-QJIALKBF.js.map +1 -0
- package/dist/chunk-R2PTF2HJ.js +2324 -0
- package/dist/chunk-R2PTF2HJ.js.map +1 -0
- package/dist/chunk-R2UDBW7V.js +141 -0
- package/dist/chunk-R2UDBW7V.js.map +1 -0
- package/dist/chunk-RBFAHNA3.js +127 -0
- package/dist/chunk-RBFAHNA3.js.map +1 -0
- package/dist/chunk-RBTYJWYS.js +141 -0
- package/dist/chunk-RBTYJWYS.js.map +1 -0
- package/dist/chunk-REVPMYRN.js +127 -0
- package/dist/chunk-REVPMYRN.js.map +1 -0
- package/dist/chunk-RJYSPPZR.js +105 -0
- package/dist/chunk-RJYSPPZR.js.map +1 -0
- package/dist/chunk-RK473OTT.js +141 -0
- package/dist/chunk-RK473OTT.js.map +1 -0
- package/dist/chunk-RU2M3L6Z.js +212 -0
- package/dist/chunk-RU2M3L6Z.js.map +1 -0
- package/dist/chunk-S6MO4YII.js +796 -0
- package/dist/chunk-S6MO4YII.js.map +1 -0
- package/dist/chunk-SGKB56KP.js +150 -0
- package/dist/chunk-SGKB56KP.js.map +1 -0
- package/dist/chunk-SOWNENZM.js +108 -0
- package/dist/chunk-SOWNENZM.js.map +1 -0
- package/dist/chunk-SPQO2KWH.js +796 -0
- package/dist/chunk-SPQO2KWH.js.map +1 -0
- package/dist/chunk-SSKS77V7.js +108 -0
- package/dist/chunk-SSKS77V7.js.map +1 -0
- package/dist/chunk-T7KFCASW.js +63 -0
- package/dist/chunk-T7KFCASW.js.map +1 -0
- package/dist/chunk-THG4N3FI.js +63 -0
- package/dist/chunk-THG4N3FI.js.map +1 -0
- package/dist/chunk-TUK6AZZO.js +150 -0
- package/dist/chunk-TUK6AZZO.js.map +1 -0
- package/dist/chunk-UAUID5ML.js +273 -0
- package/dist/chunk-UAUID5ML.js.map +1 -0
- package/dist/chunk-UCLF63CE.js +212 -0
- package/dist/chunk-UCLF63CE.js.map +1 -0
- package/dist/chunk-UMNQJFSG.js +3629 -0
- package/dist/chunk-UMNQJFSG.js.map +1 -0
- package/dist/chunk-UNMUTILO.js +105 -0
- package/dist/chunk-UNMUTILO.js.map +1 -0
- package/dist/chunk-UP54IQOK.js +105 -0
- package/dist/chunk-UP54IQOK.js.map +1 -0
- package/dist/chunk-UUJ5KHJI.js +105 -0
- package/dist/chunk-UUJ5KHJI.js.map +1 -0
- package/dist/chunk-VICWI4OU.js +108 -0
- package/dist/chunk-VICWI4OU.js.map +1 -0
- package/dist/chunk-VRKWQVK3.js +2324 -0
- package/dist/chunk-VRKWQVK3.js.map +1 -0
- package/dist/chunk-VSLAOZQD.js +212 -0
- package/dist/chunk-VSLAOZQD.js.map +1 -0
- package/dist/chunk-VSYBVVQG.js +108 -0
- package/dist/chunk-VSYBVVQG.js.map +1 -0
- package/dist/chunk-VWQKIEMF.js +273 -0
- package/dist/chunk-VWQKIEMF.js.map +1 -0
- package/dist/chunk-VY2GZXYM.js +141 -0
- package/dist/chunk-VY2GZXYM.js.map +1 -0
- package/dist/chunk-VZ56KTEJ.js +127 -0
- package/dist/chunk-VZ56KTEJ.js.map +1 -0
- package/dist/chunk-W3L4ZQJJ.js +212 -0
- package/dist/chunk-W3L4ZQJJ.js.map +1 -0
- package/dist/chunk-WAO36MW5.js +63 -0
- package/dist/chunk-WAO36MW5.js.map +1 -0
- package/dist/chunk-WIFDOPMN.js +127 -0
- package/dist/chunk-WIFDOPMN.js.map +1 -0
- package/dist/chunk-WNRV6HEX.js +127 -0
- package/dist/chunk-WNRV6HEX.js.map +1 -0
- package/dist/chunk-WVIQHL36.js +288 -0
- package/dist/chunk-WVIQHL36.js.map +1 -0
- package/dist/chunk-WX6ECDMM.js +108 -0
- package/dist/chunk-WX6ECDMM.js.map +1 -0
- package/dist/chunk-XDRQWJU4.js +127 -0
- package/dist/chunk-XDRQWJU4.js.map +1 -0
- package/dist/chunk-XJYGT7M7.js +141 -0
- package/dist/chunk-XJYGT7M7.js.map +1 -0
- package/dist/chunk-XOZOZ2EK.js +3629 -0
- package/dist/chunk-XOZOZ2EK.js.map +1 -0
- package/dist/chunk-XSOHRWJR.js +19 -0
- package/dist/chunk-XSOHRWJR.js.map +1 -0
- package/dist/chunk-YH2WPBJA.js +150 -0
- package/dist/chunk-YH2WPBJA.js.map +1 -0
- package/dist/chunk-YHNYCAVM.js +212 -0
- package/dist/chunk-YHNYCAVM.js.map +1 -0
- package/dist/chunk-YRKENLA3.js +796 -0
- package/dist/chunk-YRKENLA3.js.map +1 -0
- package/dist/chunk-YUXO7TSK.js +272 -0
- package/dist/chunk-YUXO7TSK.js.map +1 -0
- package/dist/chunk-YVM525DY.js +105 -0
- package/dist/chunk-YVM525DY.js.map +1 -0
- package/dist/chunk-Z5U5Q34M.js +150 -0
- package/dist/chunk-Z5U5Q34M.js.map +1 -0
- package/dist/chunk-ZCBBFBGM.js +212 -0
- package/dist/chunk-ZCBBFBGM.js.map +1 -0
- package/dist/chunk-ZGP7RCSE.js +63 -0
- package/dist/chunk-ZGP7RCSE.js.map +1 -0
- package/dist/chunk-ZH2NXJHL.js +3629 -0
- package/dist/chunk-ZH2NXJHL.js.map +1 -0
- package/dist/chunk-ZHGPXPGH.js +278 -0
- package/dist/chunk-ZHGPXPGH.js.map +1 -0
- package/dist/chunk-ZLZWFEEQ.js +37 -0
- package/dist/chunk-ZLZWFEEQ.js.map +1 -0
- package/dist/chunk-ZNCI5EUG.js +108 -0
- package/dist/chunk-ZNCI5EUG.js.map +1 -0
- package/dist/chunk-ZYUWIV3D.js +63 -0
- package/dist/chunk-ZYUWIV3D.js.map +1 -0
- package/dist/chunk-ZZI5775T.js +127 -0
- package/dist/chunk-ZZI5775T.js.map +1 -0
- package/dist/components/AddressContainer/CoreAddressContainer.js +10 -11
- package/dist/components/AddressContainer/EVMAddressContainer.js +9 -10
- package/dist/components/AddressContainer/addressSwitcher.js +7 -8
- package/dist/components/AddressContainer/addressView.js +6 -7
- package/dist/components/AddressContainer/label.js +4 -4
- package/dist/components/Age/index.js +4 -4
- 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/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 +3 -3
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/NetworkIcon/index.js +2 -2
- package/dist/components/PhishingAddressContainer/index.js +4 -5
- package/dist/components/PhishingAddressContainer/index.js.map +1 -1
- package/dist/components/Price/index.js +3 -3
- package/dist/components/Radio/index.js +2 -2
- package/dist/components/Select/index.js +3 -3
- 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 +10 -11
- package/dist/components/TransactionAction/coreTransactionAction.js.map +1 -1
- package/dist/components/TransactionAction/evmTransactionAction.js +9 -10
- package/dist/components/TransactionAction/evmTransactionAction.js.map +1 -1
- package/dist/utils/address.d.ts +1 -2
- package/dist/utils/address.js +2 -4
- package/dist/utils/contractManagerTool.js +2 -2
- package/dist/utils/hooks/useENS.js +3 -4
- package/dist/utils/index.js +2 -2
- package/dist/utils/request.d.ts +4 -1
- package/dist/utils/request.js +3 -1
- package/dist/utils/request.types.d.ts +50 -0
- package/dist/utils/request.types.js +1 -0
- package/dist/utils/request.types.js.map +1 -0
- package/dist/utils/rpcRequest.js +31 -3
- package/dist/utils/rpcRequest.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useBreakpoint
|
|
3
|
+
} from "./chunk-TOKKKTFG.js";
|
|
4
|
+
import {
|
|
5
|
+
Tooltip
|
|
6
|
+
} from "./chunk-OK3EPS2C.js";
|
|
7
|
+
import {
|
|
8
|
+
selectText
|
|
9
|
+
} from "./chunk-S6MO4YII.js";
|
|
10
|
+
|
|
11
|
+
// src/components/Text/index.tsx
|
|
12
|
+
import React from "react";
|
|
13
|
+
import clsx from "clsx";
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var getTypeColor = (type) => {
|
|
16
|
+
const colors = {
|
|
17
|
+
default: "inherit",
|
|
18
|
+
primary: "#7cd77b",
|
|
19
|
+
secondary: "#666",
|
|
20
|
+
success: "#7cd77b",
|
|
21
|
+
warning: "#ffc438",
|
|
22
|
+
error: "#e15c56"
|
|
23
|
+
};
|
|
24
|
+
return colors[type] || colors.default;
|
|
25
|
+
};
|
|
26
|
+
var Text = React.memo(
|
|
27
|
+
({
|
|
28
|
+
className,
|
|
29
|
+
children,
|
|
30
|
+
maxWidth: _maxWidth,
|
|
31
|
+
mobileMaxWidth = _maxWidth,
|
|
32
|
+
maxCount: _maxCount,
|
|
33
|
+
mobileMaxCount = _maxCount,
|
|
34
|
+
hoverValue,
|
|
35
|
+
hoverValueMaxCount: outerHoverValueMaxCount,
|
|
36
|
+
tag = "p",
|
|
37
|
+
type = "default",
|
|
38
|
+
hideTooltip = false,
|
|
39
|
+
...props
|
|
40
|
+
}) => {
|
|
41
|
+
const Component = tag;
|
|
42
|
+
const bp = useBreakpoint();
|
|
43
|
+
let child = children;
|
|
44
|
+
const maxCount = bp === "s" ? mobileMaxCount : _maxCount;
|
|
45
|
+
const maxWidth = bp === "s" ? mobileMaxWidth : _maxWidth;
|
|
46
|
+
if (maxWidth === void 0 && maxCount && typeof children === "string" && children.length > maxCount) {
|
|
47
|
+
child = String.prototype.substr.call(children, 0, maxCount) + "...";
|
|
48
|
+
}
|
|
49
|
+
let textContent = hoverValue || children;
|
|
50
|
+
if (bp === "s" && typeof textContent === "string") {
|
|
51
|
+
const hoverValueMaxCount = outerHoverValueMaxCount || 34;
|
|
52
|
+
let textContentCopy = textContent;
|
|
53
|
+
let newTextContent = [];
|
|
54
|
+
let count = 0;
|
|
55
|
+
while (textContentCopy.length > hoverValueMaxCount) {
|
|
56
|
+
newTextContent.push(
|
|
57
|
+
/* @__PURE__ */ jsx("span", { children: textContentCopy.substr(0, hoverValueMaxCount) }, count)
|
|
58
|
+
);
|
|
59
|
+
newTextContent.push(/* @__PURE__ */ jsx("br", {}, `br${count}`));
|
|
60
|
+
textContentCopy = textContentCopy.substr(hoverValueMaxCount);
|
|
61
|
+
if (count > 3) {
|
|
62
|
+
textContentCopy = textContentCopy.substr(0, hoverValueMaxCount - 3) + "...";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
newTextContent.push(/* @__PURE__ */ jsx("span", { children: textContentCopy }, ++count));
|
|
66
|
+
textContent = newTextContent;
|
|
67
|
+
}
|
|
68
|
+
const tooltipText = !hideTooltip && React.createElement(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
onClick: (e) => {
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
e.stopPropagation();
|
|
74
|
+
selectText(e.currentTarget);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
textContent
|
|
78
|
+
);
|
|
79
|
+
const p = { title: tooltipText };
|
|
80
|
+
return React.createElement(Tooltip, p, [
|
|
81
|
+
/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(
|
|
82
|
+
Component,
|
|
83
|
+
{
|
|
84
|
+
className: clsx(
|
|
85
|
+
"sirius-text truncate vertical-bottom",
|
|
86
|
+
"all-[a]:truncate all-[a]:vertical-bottom all-[a]:cursor-pointer all-[a:hover]:text-#0626ae",
|
|
87
|
+
className
|
|
88
|
+
),
|
|
89
|
+
style: {
|
|
90
|
+
maxWidth,
|
|
91
|
+
display: maxWidth === void 0 ? "inherit" : "inline-block",
|
|
92
|
+
color: getTypeColor(type)
|
|
93
|
+
},
|
|
94
|
+
...props,
|
|
95
|
+
children: child
|
|
96
|
+
}
|
|
97
|
+
) }, "text")
|
|
98
|
+
]);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
export {
|
|
103
|
+
Text
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=chunk-UNMUTILO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Text/index.tsx"],"sourcesContent":["import React from 'react';\nimport clsx from 'clsx';\nimport { Tooltip } from '../Tooltip';\nimport { selectText } from '../../utils';\nimport { useBreakpoint } from '../../utils/media';\n\ntype NormalTypes =\n | 'default'\n | 'secondary'\n | 'success'\n | 'warning'\n | 'error'\n | 'primary';\n\ntype TextProps = {\n children?: React.ReactNode;\n maxWidth?: string;\n mobileMaxWidth?: string;\n maxCount?: number;\n mobileMaxCount?: number;\n hoverValue?: React.ReactNode;\n hoverValueMaxCount?: number;\n tag?: 'p' | 'span';\n type?: NormalTypes;\n hideTooltip?: boolean;\n};\ntype NativeAttrs = Omit<React.HTMLAttributes<any>, keyof TextProps>;\n\nconst getTypeColor = (type: NormalTypes) => {\n const colors: { [key in NormalTypes]: string } = {\n default: 'inherit',\n primary: '#7cd77b',\n secondary: '#666',\n success: '#7cd77b',\n warning: '#ffc438',\n error: '#e15c56',\n };\n\n return colors[type] || colors.default;\n};\n\n// note:\n// 1. maxWidth priority is higher than maxCount\n// 2. maxCount only apply to string\n// 3. if hoverValue is provided, use hoverValue as Tooltip text, otherwise use children\n// if text of prop tooltip is provided, use as Tooltip text\nexport const Text = React.memo(\n ({\n className,\n children,\n maxWidth: _maxWidth,\n mobileMaxWidth = _maxWidth,\n maxCount: _maxCount,\n mobileMaxCount = _maxCount,\n hoverValue,\n hoverValueMaxCount: outerHoverValueMaxCount,\n tag = 'p',\n type = 'default',\n hideTooltip = false,\n ...props\n }: NativeAttrs & TextProps) => {\n const Component = tag;\n const bp = useBreakpoint();\n let child: React.ReactNode = children;\n const maxCount = bp === 's' ? mobileMaxCount : _maxCount;\n const maxWidth = bp === 's' ? mobileMaxWidth : _maxWidth;\n if (\n maxWidth === undefined &&\n maxCount &&\n typeof children === 'string' &&\n children.length > maxCount\n ) {\n child = String.prototype.substr.call(children, 0, maxCount) + '...';\n }\n\n let textContent = hoverValue || children;\n // 控制移动端字符串类型 tooltip 的长度\n // 这里有个问题,就是截断的位置可能是一个完整的单词,暂时没有办法处理,如果为了避免这种情况,需要由外面传入前对内容进行处理,比如设置固定宽度小于 24rem\n // @todo 后续可以试下读取文本长度,动态设置容器宽度值的方式,可以避免截断位置的问题\n if (bp === 's' && typeof textContent === 'string') {\n const hoverValueMaxCount = outerHoverValueMaxCount || 34; // default text count is 36\n let textContentCopy: string = textContent;\n let newTextContent: Array<React.ReactNode> = [];\n let count = 0;\n while (textContentCopy.length > hoverValueMaxCount) {\n newTextContent.push(\n <span key={count}>\n {textContentCopy.substr(0, hoverValueMaxCount)}\n </span>,\n );\n newTextContent.push(<br key={`br${count}`} />);\n textContentCopy = textContentCopy.substr(hoverValueMaxCount);\n // 防止文本过长的情况\n if (count > 3) {\n textContentCopy =\n textContentCopy.substr(0, hoverValueMaxCount - 3) + '...';\n }\n }\n newTextContent.push(<span key={++count}>{textContentCopy}</span>);\n textContent = newTextContent;\n }\n const tooltipText =\n !hideTooltip &&\n React.createElement(\n 'div',\n {\n onClick: e => {\n e.preventDefault();\n e.stopPropagation();\n selectText(e.currentTarget);\n },\n },\n textContent,\n );\n\n const p = { title: tooltipText };\n return React.createElement(Tooltip, p, [\n <span key=\"text\">\n <Component\n className={clsx(\n 'sirius-text truncate vertical-bottom',\n 'all-[a]:truncate all-[a]:vertical-bottom all-[a]:cursor-pointer all-[a:hover]:text-#0626ae',\n className,\n )}\n style={{\n maxWidth,\n display: maxWidth === undefined ? 'inherit' : 'inline-block',\n color: getTypeColor(type),\n }}\n {...props}\n >\n {child}\n </Component>\n </span>,\n ]);\n },\n);\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AAqFP;AA1DV,IAAM,eAAe,CAAC,SAAsB;AAC1C,QAAM,SAA2C;AAAA,IAC/C,SAAS;AAAA,IACT,SAAS;AAAA,IACT,WAAW;AAAA,IACX,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AAEA,SAAO,OAAO,IAAI,KAAK,OAAO;AAChC;AAOO,IAAM,OAAO,MAAM;AAAA,EACxB,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB;AAAA,IACA,oBAAoB;AAAA,IACpB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,cAAc;AAAA,IACd,GAAG;AAAA,EACL,MAA+B;AAC7B,UAAM,YAAY;AAClB,UAAM,KAAK,cAAc;AACzB,QAAI,QAAyB;AAC7B,UAAM,WAAW,OAAO,MAAM,iBAAiB;AAC/C,UAAM,WAAW,OAAO,MAAM,iBAAiB;AAC/C,QACE,aAAa,UACb,YACA,OAAO,aAAa,YACpB,SAAS,SAAS,UAClB;AACA,cAAQ,OAAO,UAAU,OAAO,KAAK,UAAU,GAAG,QAAQ,IAAI;AAAA,IAChE;AAEA,QAAI,cAAc,cAAc;AAIhC,QAAI,OAAO,OAAO,OAAO,gBAAgB,UAAU;AACjD,YAAM,qBAAqB,2BAA2B;AACtD,UAAI,kBAA0B;AAC9B,UAAI,iBAAyC,CAAC;AAC9C,UAAI,QAAQ;AACZ,aAAO,gBAAgB,SAAS,oBAAoB;AAClD,uBAAe;AAAA,UACb,oBAAC,UACE,0BAAgB,OAAO,GAAG,kBAAkB,KADpC,KAEX;AAAA,QACF;AACA,uBAAe,KAAK,oBAAC,UAAQ,KAAK,OAAS,CAAE;AAC7C,0BAAkB,gBAAgB,OAAO,kBAAkB;AAE3D,YAAI,QAAQ,GAAG;AACb,4BACE,gBAAgB,OAAO,GAAG,qBAAqB,CAAC,IAAI;AAAA,QACxD;AAAA,MACF;AACA,qBAAe,KAAK,oBAAC,UAAoB,6BAAV,EAAE,KAAwB,CAAO;AAChE,oBAAc;AAAA,IAChB;AACA,UAAM,cACJ,CAAC,eACD,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,QACE,SAAS,OAAK;AACZ,YAAE,eAAe;AACjB,YAAE,gBAAgB;AAClB,qBAAW,EAAE,aAAa;AAAA,QAC5B;AAAA,MACF;AAAA,MACA;AAAA,IACF;AAEF,UAAM,IAAI,EAAE,OAAO,YAAY;AAC/B,WAAO,MAAM,cAAc,SAAS,GAAG;AAAA,MACrC,oBAAC,UACC;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,UACA,OAAO;AAAA,YACL;AAAA,YACA,SAAS,aAAa,SAAY,YAAY;AAAA,YAC9C,OAAO,aAAa,IAAI;AAAA,UAC1B;AAAA,UACC,GAAG;AAAA,UAEH;AAAA;AAAA,MACH,KAfQ,MAgBV;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useBreakpoint
|
|
3
|
+
} from "./chunk-TOKKKTFG.js";
|
|
4
|
+
import {
|
|
5
|
+
Tooltip
|
|
6
|
+
} from "./chunk-VRKWQVK3.js";
|
|
7
|
+
import {
|
|
8
|
+
selectText
|
|
9
|
+
} from "./chunk-M2B6MZSF.js";
|
|
10
|
+
|
|
11
|
+
// src/components/Text/index.tsx
|
|
12
|
+
import React from "react";
|
|
13
|
+
import clsx from "clsx";
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var getTypeColor = (type) => {
|
|
16
|
+
const colors = {
|
|
17
|
+
default: "inherit",
|
|
18
|
+
primary: "#7cd77b",
|
|
19
|
+
secondary: "#666",
|
|
20
|
+
success: "#7cd77b",
|
|
21
|
+
warning: "#ffc438",
|
|
22
|
+
error: "#e15c56"
|
|
23
|
+
};
|
|
24
|
+
return colors[type] || colors.default;
|
|
25
|
+
};
|
|
26
|
+
var Text = React.memo(
|
|
27
|
+
({
|
|
28
|
+
className,
|
|
29
|
+
children,
|
|
30
|
+
maxWidth: _maxWidth,
|
|
31
|
+
mobileMaxWidth = _maxWidth,
|
|
32
|
+
maxCount: _maxCount,
|
|
33
|
+
mobileMaxCount = _maxCount,
|
|
34
|
+
hoverValue,
|
|
35
|
+
hoverValueMaxCount: outerHoverValueMaxCount,
|
|
36
|
+
tag = "p",
|
|
37
|
+
type = "default",
|
|
38
|
+
hideTooltip = false,
|
|
39
|
+
...props
|
|
40
|
+
}) => {
|
|
41
|
+
const Component = tag;
|
|
42
|
+
const bp = useBreakpoint();
|
|
43
|
+
let child = children;
|
|
44
|
+
const maxCount = bp === "s" ? mobileMaxCount : _maxCount;
|
|
45
|
+
const maxWidth = bp === "s" ? mobileMaxWidth : _maxWidth;
|
|
46
|
+
if (maxWidth === void 0 && maxCount && typeof children === "string" && children.length > maxCount) {
|
|
47
|
+
child = String.prototype.substr.call(children, 0, maxCount) + "...";
|
|
48
|
+
}
|
|
49
|
+
let textContent = hoverValue || children;
|
|
50
|
+
if (bp === "s" && typeof textContent === "string") {
|
|
51
|
+
const hoverValueMaxCount = outerHoverValueMaxCount || 34;
|
|
52
|
+
let textContentCopy = textContent;
|
|
53
|
+
let newTextContent = [];
|
|
54
|
+
let count = 0;
|
|
55
|
+
while (textContentCopy.length > hoverValueMaxCount) {
|
|
56
|
+
newTextContent.push(
|
|
57
|
+
/* @__PURE__ */ jsx("span", { children: textContentCopy.substr(0, hoverValueMaxCount) }, count)
|
|
58
|
+
);
|
|
59
|
+
newTextContent.push(/* @__PURE__ */ jsx("br", {}, `br${count}`));
|
|
60
|
+
textContentCopy = textContentCopy.substr(hoverValueMaxCount);
|
|
61
|
+
if (count > 3) {
|
|
62
|
+
textContentCopy = textContentCopy.substr(0, hoverValueMaxCount - 3) + "...";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
newTextContent.push(/* @__PURE__ */ jsx("span", { children: textContentCopy }, ++count));
|
|
66
|
+
textContent = newTextContent;
|
|
67
|
+
}
|
|
68
|
+
const tooltipText = !hideTooltip && React.createElement(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
onClick: (e) => {
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
e.stopPropagation();
|
|
74
|
+
selectText(e.currentTarget);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
textContent
|
|
78
|
+
);
|
|
79
|
+
const p = { title: tooltipText };
|
|
80
|
+
return React.createElement(Tooltip, p, [
|
|
81
|
+
/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(
|
|
82
|
+
Component,
|
|
83
|
+
{
|
|
84
|
+
className: clsx(
|
|
85
|
+
"sirius-text truncate vertical-bottom",
|
|
86
|
+
"all-[a]:truncate all-[a]:vertical-bottom all-[a]:cursor-pointer all-[a:hover]:text-#0626ae",
|
|
87
|
+
className
|
|
88
|
+
),
|
|
89
|
+
style: {
|
|
90
|
+
maxWidth,
|
|
91
|
+
display: maxWidth === void 0 ? "inherit" : "inline-block",
|
|
92
|
+
color: getTypeColor(type)
|
|
93
|
+
},
|
|
94
|
+
...props,
|
|
95
|
+
children: child
|
|
96
|
+
}
|
|
97
|
+
) }, "text")
|
|
98
|
+
]);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
export {
|
|
103
|
+
Text
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=chunk-UP54IQOK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Text/index.tsx"],"sourcesContent":["import React from 'react';\nimport clsx from 'clsx';\nimport { Tooltip } from '../Tooltip';\nimport { selectText } from '../../utils';\nimport { useBreakpoint } from '../../utils/media';\n\ntype NormalTypes =\n | 'default'\n | 'secondary'\n | 'success'\n | 'warning'\n | 'error'\n | 'primary';\n\ntype TextProps = {\n children?: React.ReactNode;\n maxWidth?: string;\n mobileMaxWidth?: string;\n maxCount?: number;\n mobileMaxCount?: number;\n hoverValue?: React.ReactNode;\n hoverValueMaxCount?: number;\n tag?: 'p' | 'span';\n type?: NormalTypes;\n hideTooltip?: boolean;\n};\ntype NativeAttrs = Omit<React.HTMLAttributes<any>, keyof TextProps>;\n\nconst getTypeColor = (type: NormalTypes) => {\n const colors: { [key in NormalTypes]: string } = {\n default: 'inherit',\n primary: '#7cd77b',\n secondary: '#666',\n success: '#7cd77b',\n warning: '#ffc438',\n error: '#e15c56',\n };\n\n return colors[type] || colors.default;\n};\n\n// note:\n// 1. maxWidth priority is higher than maxCount\n// 2. maxCount only apply to string\n// 3. if hoverValue is provided, use hoverValue as Tooltip text, otherwise use children\n// if text of prop tooltip is provided, use as Tooltip text\nexport const Text = React.memo(\n ({\n className,\n children,\n maxWidth: _maxWidth,\n mobileMaxWidth = _maxWidth,\n maxCount: _maxCount,\n mobileMaxCount = _maxCount,\n hoverValue,\n hoverValueMaxCount: outerHoverValueMaxCount,\n tag = 'p',\n type = 'default',\n hideTooltip = false,\n ...props\n }: NativeAttrs & TextProps) => {\n const Component = tag;\n const bp = useBreakpoint();\n let child: React.ReactNode = children;\n const maxCount = bp === 's' ? mobileMaxCount : _maxCount;\n const maxWidth = bp === 's' ? mobileMaxWidth : _maxWidth;\n if (\n maxWidth === undefined &&\n maxCount &&\n typeof children === 'string' &&\n children.length > maxCount\n ) {\n child = String.prototype.substr.call(children, 0, maxCount) + '...';\n }\n\n let textContent = hoverValue || children;\n // 控制移动端字符串类型 tooltip 的长度\n // 这里有个问题,就是截断的位置可能是一个完整的单词,暂时没有办法处理,如果为了避免这种情况,需要由外面传入前对内容进行处理,比如设置固定宽度小于 24rem\n // @todo 后续可以试下读取文本长度,动态设置容器宽度值的方式,可以避免截断位置的问题\n if (bp === 's' && typeof textContent === 'string') {\n const hoverValueMaxCount = outerHoverValueMaxCount || 34; // default text count is 36\n let textContentCopy: string = textContent;\n let newTextContent: Array<React.ReactNode> = [];\n let count = 0;\n while (textContentCopy.length > hoverValueMaxCount) {\n newTextContent.push(\n <span key={count}>\n {textContentCopy.substr(0, hoverValueMaxCount)}\n </span>,\n );\n newTextContent.push(<br key={`br${count}`} />);\n textContentCopy = textContentCopy.substr(hoverValueMaxCount);\n // 防止文本过长的情况\n if (count > 3) {\n textContentCopy =\n textContentCopy.substr(0, hoverValueMaxCount - 3) + '...';\n }\n }\n newTextContent.push(<span key={++count}>{textContentCopy}</span>);\n textContent = newTextContent;\n }\n const tooltipText =\n !hideTooltip &&\n React.createElement(\n 'div',\n {\n onClick: e => {\n e.preventDefault();\n e.stopPropagation();\n selectText(e.currentTarget);\n },\n },\n textContent,\n );\n\n const p = { title: tooltipText };\n return React.createElement(Tooltip, p, [\n <span key=\"text\">\n <Component\n className={clsx(\n 'sirius-text truncate vertical-bottom',\n 'all-[a]:truncate all-[a]:vertical-bottom all-[a]:cursor-pointer all-[a:hover]:text-#0626ae',\n className,\n )}\n style={{\n maxWidth,\n display: maxWidth === undefined ? 'inherit' : 'inline-block',\n color: getTypeColor(type),\n }}\n {...props}\n >\n {child}\n </Component>\n </span>,\n ]);\n },\n);\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AAqFP;AA1DV,IAAM,eAAe,CAAC,SAAsB;AAC1C,QAAM,SAA2C;AAAA,IAC/C,SAAS;AAAA,IACT,SAAS;AAAA,IACT,WAAW;AAAA,IACX,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AAEA,SAAO,OAAO,IAAI,KAAK,OAAO;AAChC;AAOO,IAAM,OAAO,MAAM;AAAA,EACxB,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB;AAAA,IACA,oBAAoB;AAAA,IACpB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,cAAc;AAAA,IACd,GAAG;AAAA,EACL,MAA+B;AAC7B,UAAM,YAAY;AAClB,UAAM,KAAK,cAAc;AACzB,QAAI,QAAyB;AAC7B,UAAM,WAAW,OAAO,MAAM,iBAAiB;AAC/C,UAAM,WAAW,OAAO,MAAM,iBAAiB;AAC/C,QACE,aAAa,UACb,YACA,OAAO,aAAa,YACpB,SAAS,SAAS,UAClB;AACA,cAAQ,OAAO,UAAU,OAAO,KAAK,UAAU,GAAG,QAAQ,IAAI;AAAA,IAChE;AAEA,QAAI,cAAc,cAAc;AAIhC,QAAI,OAAO,OAAO,OAAO,gBAAgB,UAAU;AACjD,YAAM,qBAAqB,2BAA2B;AACtD,UAAI,kBAA0B;AAC9B,UAAI,iBAAyC,CAAC;AAC9C,UAAI,QAAQ;AACZ,aAAO,gBAAgB,SAAS,oBAAoB;AAClD,uBAAe;AAAA,UACb,oBAAC,UACE,0BAAgB,OAAO,GAAG,kBAAkB,KADpC,KAEX;AAAA,QACF;AACA,uBAAe,KAAK,oBAAC,UAAQ,KAAK,OAAS,CAAE;AAC7C,0BAAkB,gBAAgB,OAAO,kBAAkB;AAE3D,YAAI,QAAQ,GAAG;AACb,4BACE,gBAAgB,OAAO,GAAG,qBAAqB,CAAC,IAAI;AAAA,QACxD;AAAA,MACF;AACA,qBAAe,KAAK,oBAAC,UAAoB,6BAAV,EAAE,KAAwB,CAAO;AAChE,oBAAc;AAAA,IAChB;AACA,UAAM,cACJ,CAAC,eACD,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,QACE,SAAS,OAAK;AACZ,YAAE,eAAe;AACjB,YAAE,gBAAgB;AAClB,qBAAW,EAAE,aAAa;AAAA,QAC5B;AAAA,MACF;AAAA,MACA;AAAA,IACF;AAEF,UAAM,IAAI,EAAE,OAAO,YAAY;AAC/B,WAAO,MAAM,cAAc,SAAS,GAAG;AAAA,MACrC,oBAAC,UACC;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,UACA,OAAO;AAAA,YACL;AAAA,YACA,SAAS,aAAa,SAAY,YAAY;AAAA,YAC9C,OAAO,aAAa,IAAI;AAAA,UAC1B;AAAA,UACC,GAAG;AAAA,UAEH;AAAA;AAAA,MACH,KAfQ,MAgBV;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useBreakpoint
|
|
3
|
+
} from "./chunk-TOKKKTFG.js";
|
|
4
|
+
import {
|
|
5
|
+
Tooltip
|
|
6
|
+
} from "./chunk-DX5EXIMK.js";
|
|
7
|
+
import {
|
|
8
|
+
selectText
|
|
9
|
+
} from "./chunk-LHMHEG43.js";
|
|
10
|
+
|
|
11
|
+
// src/components/Text/index.tsx
|
|
12
|
+
import React from "react";
|
|
13
|
+
import clsx from "clsx";
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var getTypeColor = (type) => {
|
|
16
|
+
const colors = {
|
|
17
|
+
default: "inherit",
|
|
18
|
+
primary: "#7cd77b",
|
|
19
|
+
secondary: "#666",
|
|
20
|
+
success: "#7cd77b",
|
|
21
|
+
warning: "#ffc438",
|
|
22
|
+
error: "#e15c56"
|
|
23
|
+
};
|
|
24
|
+
return colors[type] || colors.default;
|
|
25
|
+
};
|
|
26
|
+
var Text = React.memo(
|
|
27
|
+
({
|
|
28
|
+
className,
|
|
29
|
+
children,
|
|
30
|
+
maxWidth: _maxWidth,
|
|
31
|
+
mobileMaxWidth = _maxWidth,
|
|
32
|
+
maxCount: _maxCount,
|
|
33
|
+
mobileMaxCount = _maxCount,
|
|
34
|
+
hoverValue,
|
|
35
|
+
hoverValueMaxCount: outerHoverValueMaxCount,
|
|
36
|
+
tag = "p",
|
|
37
|
+
type = "default",
|
|
38
|
+
hideTooltip = false,
|
|
39
|
+
...props
|
|
40
|
+
}) => {
|
|
41
|
+
const Component = tag;
|
|
42
|
+
const bp = useBreakpoint();
|
|
43
|
+
let child = children;
|
|
44
|
+
const maxCount = bp === "s" ? mobileMaxCount : _maxCount;
|
|
45
|
+
const maxWidth = bp === "s" ? mobileMaxWidth : _maxWidth;
|
|
46
|
+
if (maxWidth === void 0 && maxCount && typeof children === "string" && children.length > maxCount) {
|
|
47
|
+
child = String.prototype.substr.call(children, 0, maxCount) + "...";
|
|
48
|
+
}
|
|
49
|
+
let textContent = hoverValue || children;
|
|
50
|
+
if (bp === "s" && typeof textContent === "string") {
|
|
51
|
+
const hoverValueMaxCount = outerHoverValueMaxCount || 34;
|
|
52
|
+
let textContentCopy = textContent;
|
|
53
|
+
let newTextContent = [];
|
|
54
|
+
let count = 0;
|
|
55
|
+
while (textContentCopy.length > hoverValueMaxCount) {
|
|
56
|
+
newTextContent.push(
|
|
57
|
+
/* @__PURE__ */ jsx("span", { children: textContentCopy.substr(0, hoverValueMaxCount) }, count)
|
|
58
|
+
);
|
|
59
|
+
newTextContent.push(/* @__PURE__ */ jsx("br", {}, `br${count}`));
|
|
60
|
+
textContentCopy = textContentCopy.substr(hoverValueMaxCount);
|
|
61
|
+
if (count > 3) {
|
|
62
|
+
textContentCopy = textContentCopy.substr(0, hoverValueMaxCount - 3) + "...";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
newTextContent.push(/* @__PURE__ */ jsx("span", { children: textContentCopy }, ++count));
|
|
66
|
+
textContent = newTextContent;
|
|
67
|
+
}
|
|
68
|
+
const tooltipText = !hideTooltip && React.createElement(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
onClick: (e) => {
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
e.stopPropagation();
|
|
74
|
+
selectText(e.currentTarget);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
textContent
|
|
78
|
+
);
|
|
79
|
+
const p = { title: tooltipText };
|
|
80
|
+
return React.createElement(Tooltip, p, [
|
|
81
|
+
/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(
|
|
82
|
+
Component,
|
|
83
|
+
{
|
|
84
|
+
className: clsx(
|
|
85
|
+
"sirius-text truncate vertical-bottom",
|
|
86
|
+
"all-[a]:truncate all-[a]:vertical-bottom all-[a]:cursor-pointer all-[a:hover]:text-#0626ae",
|
|
87
|
+
className
|
|
88
|
+
),
|
|
89
|
+
style: {
|
|
90
|
+
maxWidth,
|
|
91
|
+
display: maxWidth === void 0 ? "inherit" : "inline-block",
|
|
92
|
+
color: getTypeColor(type)
|
|
93
|
+
},
|
|
94
|
+
...props,
|
|
95
|
+
children: child
|
|
96
|
+
}
|
|
97
|
+
) }, "text")
|
|
98
|
+
]);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
export {
|
|
103
|
+
Text
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=chunk-UUJ5KHJI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Text/index.tsx"],"sourcesContent":["import React from 'react';\nimport clsx from 'clsx';\nimport { Tooltip } from '../Tooltip';\nimport { selectText } from '../../utils';\nimport { useBreakpoint } from '../../utils/media';\n\ntype NormalTypes =\n | 'default'\n | 'secondary'\n | 'success'\n | 'warning'\n | 'error'\n | 'primary';\n\ntype TextProps = {\n children?: React.ReactNode;\n maxWidth?: string;\n mobileMaxWidth?: string;\n maxCount?: number;\n mobileMaxCount?: number;\n hoverValue?: React.ReactNode;\n hoverValueMaxCount?: number;\n tag?: 'p' | 'span';\n type?: NormalTypes;\n hideTooltip?: boolean;\n};\ntype NativeAttrs = Omit<React.HTMLAttributes<any>, keyof TextProps>;\n\nconst getTypeColor = (type: NormalTypes) => {\n const colors: { [key in NormalTypes]: string } = {\n default: 'inherit',\n primary: '#7cd77b',\n secondary: '#666',\n success: '#7cd77b',\n warning: '#ffc438',\n error: '#e15c56',\n };\n\n return colors[type] || colors.default;\n};\n\n// note:\n// 1. maxWidth priority is higher than maxCount\n// 2. maxCount only apply to string\n// 3. if hoverValue is provided, use hoverValue as Tooltip text, otherwise use children\n// if text of prop tooltip is provided, use as Tooltip text\nexport const Text = React.memo(\n ({\n className,\n children,\n maxWidth: _maxWidth,\n mobileMaxWidth = _maxWidth,\n maxCount: _maxCount,\n mobileMaxCount = _maxCount,\n hoverValue,\n hoverValueMaxCount: outerHoverValueMaxCount,\n tag = 'p',\n type = 'default',\n hideTooltip = false,\n ...props\n }: NativeAttrs & TextProps) => {\n const Component = tag;\n const bp = useBreakpoint();\n let child: React.ReactNode = children;\n const maxCount = bp === 's' ? mobileMaxCount : _maxCount;\n const maxWidth = bp === 's' ? mobileMaxWidth : _maxWidth;\n if (\n maxWidth === undefined &&\n maxCount &&\n typeof children === 'string' &&\n children.length > maxCount\n ) {\n child = String.prototype.substr.call(children, 0, maxCount) + '...';\n }\n\n let textContent = hoverValue || children;\n // 控制移动端字符串类型 tooltip 的长度\n // 这里有个问题,就是截断的位置可能是一个完整的单词,暂时没有办法处理,如果为了避免这种情况,需要由外面传入前对内容进行处理,比如设置固定宽度小于 24rem\n // @todo 后续可以试下读取文本长度,动态设置容器宽度值的方式,可以避免截断位置的问题\n if (bp === 's' && typeof textContent === 'string') {\n const hoverValueMaxCount = outerHoverValueMaxCount || 34; // default text count is 36\n let textContentCopy: string = textContent;\n let newTextContent: Array<React.ReactNode> = [];\n let count = 0;\n while (textContentCopy.length > hoverValueMaxCount) {\n newTextContent.push(\n <span key={count}>\n {textContentCopy.substr(0, hoverValueMaxCount)}\n </span>,\n );\n newTextContent.push(<br key={`br${count}`} />);\n textContentCopy = textContentCopy.substr(hoverValueMaxCount);\n // 防止文本过长的情况\n if (count > 3) {\n textContentCopy =\n textContentCopy.substr(0, hoverValueMaxCount - 3) + '...';\n }\n }\n newTextContent.push(<span key={++count}>{textContentCopy}</span>);\n textContent = newTextContent;\n }\n const tooltipText =\n !hideTooltip &&\n React.createElement(\n 'div',\n {\n onClick: e => {\n e.preventDefault();\n e.stopPropagation();\n selectText(e.currentTarget);\n },\n },\n textContent,\n );\n\n const p = { title: tooltipText };\n return React.createElement(Tooltip, p, [\n <span key=\"text\">\n <Component\n className={clsx(\n 'sirius-text truncate vertical-bottom',\n 'all-[a]:truncate all-[a]:vertical-bottom all-[a]:cursor-pointer all-[a:hover]:text-#0626ae',\n className,\n )}\n style={{\n maxWidth,\n display: maxWidth === undefined ? 'inherit' : 'inline-block',\n color: getTypeColor(type),\n }}\n {...props}\n >\n {child}\n </Component>\n </span>,\n ]);\n },\n);\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AAqFP;AA1DV,IAAM,eAAe,CAAC,SAAsB;AAC1C,QAAM,SAA2C;AAAA,IAC/C,SAAS;AAAA,IACT,SAAS;AAAA,IACT,WAAW;AAAA,IACX,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AAEA,SAAO,OAAO,IAAI,KAAK,OAAO;AAChC;AAOO,IAAM,OAAO,MAAM;AAAA,EACxB,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB;AAAA,IACA,oBAAoB;AAAA,IACpB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,cAAc;AAAA,IACd,GAAG;AAAA,EACL,MAA+B;AAC7B,UAAM,YAAY;AAClB,UAAM,KAAK,cAAc;AACzB,QAAI,QAAyB;AAC7B,UAAM,WAAW,OAAO,MAAM,iBAAiB;AAC/C,UAAM,WAAW,OAAO,MAAM,iBAAiB;AAC/C,QACE,aAAa,UACb,YACA,OAAO,aAAa,YACpB,SAAS,SAAS,UAClB;AACA,cAAQ,OAAO,UAAU,OAAO,KAAK,UAAU,GAAG,QAAQ,IAAI;AAAA,IAChE;AAEA,QAAI,cAAc,cAAc;AAIhC,QAAI,OAAO,OAAO,OAAO,gBAAgB,UAAU;AACjD,YAAM,qBAAqB,2BAA2B;AACtD,UAAI,kBAA0B;AAC9B,UAAI,iBAAyC,CAAC;AAC9C,UAAI,QAAQ;AACZ,aAAO,gBAAgB,SAAS,oBAAoB;AAClD,uBAAe;AAAA,UACb,oBAAC,UACE,0BAAgB,OAAO,GAAG,kBAAkB,KADpC,KAEX;AAAA,QACF;AACA,uBAAe,KAAK,oBAAC,UAAQ,KAAK,OAAS,CAAE;AAC7C,0BAAkB,gBAAgB,OAAO,kBAAkB;AAE3D,YAAI,QAAQ,GAAG;AACb,4BACE,gBAAgB,OAAO,GAAG,qBAAqB,CAAC,IAAI;AAAA,QACxD;AAAA,MACF;AACA,qBAAe,KAAK,oBAAC,UAAoB,6BAAV,EAAE,KAAwB,CAAO;AAChE,oBAAc;AAAA,IAChB;AACA,UAAM,cACJ,CAAC,eACD,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,QACE,SAAS,OAAK;AACZ,YAAE,eAAe;AACjB,YAAE,gBAAgB;AAClB,qBAAW,EAAE,aAAa;AAAA,QAC5B;AAAA,MACF;AAAA,MACA;AAAA,IACF;AAEF,UAAM,IAAI,EAAE,OAAO,YAAY;AAC/B,WAAO,MAAM,cAAc,SAAS,GAAG;AAAA,MACrC,oBAAC,UACC;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,UACA,OAAO;AAAA,YACL;AAAA,YACA,SAAS,aAAa,SAAY,YAAY;AAAA,YAC9C,OAAO,aAAa,IAAI;AAAA,UAC1B;AAAA,UACC,GAAG;AAAA,UAEH;AAAA;AAAA,MACH,KAfQ,MAgBV;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ContractAddress,
|
|
3
|
+
ContractCreatedAddress,
|
|
4
|
+
InvalidAddress,
|
|
5
|
+
MyAddress
|
|
6
|
+
} from "./chunk-NSIDPAOP.js";
|
|
7
|
+
import {
|
|
8
|
+
RenderAddress
|
|
9
|
+
} from "./chunk-GYYQP4DT.js";
|
|
10
|
+
import {
|
|
11
|
+
convertCheckSum,
|
|
12
|
+
formatAddress,
|
|
13
|
+
isEvmAddress,
|
|
14
|
+
isZeroAddress
|
|
15
|
+
} from "./chunk-WVIQHL36.js";
|
|
16
|
+
import {
|
|
17
|
+
getLabelInfo
|
|
18
|
+
} from "./chunk-HQQ5ZL6Q.js";
|
|
19
|
+
import {
|
|
20
|
+
getTranslations,
|
|
21
|
+
useGlobalData
|
|
22
|
+
} from "./chunk-DQGLZCIG.js";
|
|
23
|
+
|
|
24
|
+
// src/components/AddressContainer/EVMAddressContainer.tsx
|
|
25
|
+
import { memo } from "react";
|
|
26
|
+
import { withTranslation } from "react-i18next";
|
|
27
|
+
import _ from "lodash";
|
|
28
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
29
|
+
var parseProps = (props, globalData) => {
|
|
30
|
+
const { alias, t, showAddressLabel, showNametag, nametagInfo } = props;
|
|
31
|
+
const value = props.value || "";
|
|
32
|
+
const cfxAddress = formatAddress(value, "hex");
|
|
33
|
+
const translations = getTranslations();
|
|
34
|
+
let aliasLabel = alias;
|
|
35
|
+
if (!alias && isZeroAddress(cfxAddress)) {
|
|
36
|
+
aliasLabel = t(translations.general.zeroAddress);
|
|
37
|
+
}
|
|
38
|
+
let officalNametag = null;
|
|
39
|
+
let addressLabel = null;
|
|
40
|
+
if (cfxAddress && showAddressLabel) {
|
|
41
|
+
const addressLabels = globalData?.["CONFLUX_SCAN_ADDRESS_LABELS" /* addressLabel */];
|
|
42
|
+
const gAddressLabel = addressLabels?.[convertCheckSum(cfxAddress)] || addressLabels?.[cfxAddress.toLowerCase()];
|
|
43
|
+
if (gAddressLabel) {
|
|
44
|
+
const { label } = getLabelInfo(gAddressLabel, "tag");
|
|
45
|
+
addressLabel = label;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (cfxAddress && showNametag) {
|
|
49
|
+
const nametags = nametagInfo?.[convertCheckSum(cfxAddress)] || nametagInfo?.[cfxAddress.toLowerCase()];
|
|
50
|
+
if (nametags) {
|
|
51
|
+
const nametag = nametags?.nametag ?? "";
|
|
52
|
+
const { label } = getLabelInfo(nametag, "nametag");
|
|
53
|
+
officalNametag = label;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
alias: aliasLabel,
|
|
58
|
+
nametag: officalNametag,
|
|
59
|
+
addressLabel,
|
|
60
|
+
cfxAddress
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
var EVMAddressContainer = withTranslation()(
|
|
64
|
+
memo((props) => {
|
|
65
|
+
const { globalData } = useGlobalData();
|
|
66
|
+
if (!props.value && !props.contractCreated) {
|
|
67
|
+
return /* @__PURE__ */ jsx(Fragment, { children: "--" });
|
|
68
|
+
}
|
|
69
|
+
const defaultProps = {
|
|
70
|
+
isFull: false,
|
|
71
|
+
isFullNameTag: false,
|
|
72
|
+
link: true,
|
|
73
|
+
isMe: false,
|
|
74
|
+
showIcon: true,
|
|
75
|
+
verify: false,
|
|
76
|
+
showAddressLabel: true,
|
|
77
|
+
showENSLabel: true,
|
|
78
|
+
showNametag: true
|
|
79
|
+
};
|
|
80
|
+
const mergeDefaultProps = _.assign({}, defaultProps, props);
|
|
81
|
+
const mergeParseProps = _.merge(
|
|
82
|
+
{},
|
|
83
|
+
mergeDefaultProps,
|
|
84
|
+
parseProps(mergeDefaultProps, globalData)
|
|
85
|
+
);
|
|
86
|
+
if (!mergeParseProps.value && mergeParseProps.contractCreated) {
|
|
87
|
+
return ContractCreatedAddress({
|
|
88
|
+
...mergeParseProps,
|
|
89
|
+
outputType: "hex"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (!isEvmAddress(mergeParseProps.value)) {
|
|
93
|
+
return InvalidAddress(mergeParseProps);
|
|
94
|
+
}
|
|
95
|
+
if (mergeParseProps.isContract) {
|
|
96
|
+
return ContractAddress(mergeParseProps);
|
|
97
|
+
}
|
|
98
|
+
if (mergeParseProps.isMe) {
|
|
99
|
+
return MyAddress(mergeParseProps);
|
|
100
|
+
}
|
|
101
|
+
return RenderAddress(mergeParseProps);
|
|
102
|
+
})
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
EVMAddressContainer
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=chunk-VICWI4OU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/EVMAddressContainer.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { WithTranslation, withTranslation } from 'react-i18next';\nimport _ from 'lodash';\nimport {\n formatAddress,\n isEvmAddress,\n isZeroAddress,\n convertCheckSum,\n} from '../../utils/address';\nimport { useGlobalData, getTranslations } from '../../store';\nimport { LOCALSTORAGE_KEYS_MAP } from '../../utils/constants';\nimport { getLabelInfo } from './label';\n\nimport { RenderAddress } from './addressView';\nimport {\n ContractCreatedAddress,\n InvalidAddress,\n ContractAddress,\n MyAddress,\n} from './addressSwitcher';\nimport { GlobalDataType } from 'src/store/types';\nimport { EVMAddressContainerProps } from './types';\n\nconst parseProps = (\n props: EVMAddressContainerProps & WithTranslation,\n globalData: GlobalDataType,\n) => {\n const { alias, t, showAddressLabel, showNametag, nametagInfo } = props;\n const value: string = props.value || '';\n const cfxAddress = formatAddress(value, 'hex');\n\n const translations = getTranslations();\n\n let aliasLabel = alias;\n if (!alias && isZeroAddress(cfxAddress)) {\n aliasLabel = t(translations.general.zeroAddress);\n }\n\n // official name tag\n let officalNametag: React.ReactNode = null;\n // private name tag\n let addressLabel: React.ReactNode = null;\n\n if (cfxAddress && showAddressLabel) {\n // global private name tag\n const addressLabels = globalData?.[LOCALSTORAGE_KEYS_MAP.addressLabel];\n const gAddressLabel =\n addressLabels?.[convertCheckSum(cfxAddress)] ||\n addressLabels?.[cfxAddress.toLowerCase()];\n\n if (gAddressLabel) {\n const { label } = getLabelInfo(gAddressLabel, 'tag');\n addressLabel = label;\n }\n }\n\n if (cfxAddress && showNametag) {\n const nametags =\n nametagInfo?.[convertCheckSum(cfxAddress)] ||\n nametagInfo?.[cfxAddress.toLowerCase()];\n\n if (nametags) {\n const nametag = nametags?.nametag ?? '';\n const { label } = getLabelInfo(nametag, 'nametag');\n officalNametag = label;\n }\n }\n\n return {\n alias: aliasLabel,\n nametag: officalNametag,\n addressLabel,\n cfxAddress,\n };\n};\n\nexport const EVMAddressContainer = withTranslation()(\n memo((props: EVMAddressContainerProps & WithTranslation) => {\n const { globalData } = useGlobalData();\n\n // If a txn receipt has no 'to' address or 'contractCreated', show -- for temp\n if (!props.value && !props.contractCreated) {\n return <>--</>;\n }\n\n const defaultProps = {\n isFull: false,\n isFullNameTag: false,\n link: true,\n isMe: false,\n showIcon: true,\n verify: false,\n showAddressLabel: true,\n showENSLabel: true,\n showNametag: true,\n };\n\n const mergeDefaultProps = _.assign({}, defaultProps, props);\n\n const mergeParseProps = _.merge(\n {},\n mergeDefaultProps,\n parseProps(mergeDefaultProps, globalData),\n );\n\n if (!mergeParseProps.value && mergeParseProps.contractCreated) {\n return ContractCreatedAddress({\n ...mergeParseProps,\n outputType: 'hex',\n });\n }\n\n if (!isEvmAddress(mergeParseProps.value)) {\n return InvalidAddress(mergeParseProps);\n }\n\n if (mergeParseProps.isContract) {\n return ContractAddress(mergeParseProps);\n }\n\n if (mergeParseProps.isMe) {\n return MyAddress(mergeParseProps);\n }\n\n return RenderAddress(mergeParseProps);\n }),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY;AACrB,SAA0B,uBAAuB;AACjD,OAAO,OAAO;AAgFD;AA3Db,IAAM,aAAa,CACjB,OACA,eACG;AACH,QAAM,EAAE,OAAO,GAAG,kBAAkB,aAAa,YAAY,IAAI;AACjE,QAAM,QAAgB,MAAM,SAAS;AACrC,QAAM,aAAa,cAAc,OAAO,KAAK;AAE7C,QAAM,eAAe,gBAAgB;AAErC,MAAI,aAAa;AACjB,MAAI,CAAC,SAAS,cAAc,UAAU,GAAG;AACvC,iBAAa,EAAE,aAAa,QAAQ,WAAW;AAAA,EACjD;AAGA,MAAI,iBAAkC;AAEtC,MAAI,eAAgC;AAEpC,MAAI,cAAc,kBAAkB;AAElC,UAAM,gBAAgB,6DAA+C;AACrE,UAAM,gBACJ,gBAAgB,gBAAgB,UAAU,CAAC,KAC3C,gBAAgB,WAAW,YAAY,CAAC;AAE1C,QAAI,eAAe;AACjB,YAAM,EAAE,MAAM,IAAI,aAAa,eAAe,KAAK;AACnD,qBAAe;AAAA,IACjB;AAAA,EACF;AAEA,MAAI,cAAc,aAAa;AAC7B,UAAM,WACJ,cAAc,gBAAgB,UAAU,CAAC,KACzC,cAAc,WAAW,YAAY,CAAC;AAExC,QAAI,UAAU;AACZ,YAAM,UAAU,UAAU,WAAW;AACrC,YAAM,EAAE,MAAM,IAAI,aAAa,SAAS,SAAS;AACjD,uBAAiB;AAAA,IACnB;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;AAEO,IAAM,sBAAsB,gBAAgB;AAAA,EACjD,KAAK,CAAC,UAAsD;AAC1D,UAAM,EAAE,WAAW,IAAI,cAAc;AAGrC,QAAI,CAAC,MAAM,SAAS,CAAC,MAAM,iBAAiB;AAC1C,aAAO,gCAAE,gBAAE;AAAA,IACb;AAEA,UAAM,eAAe;AAAA,MACnB,QAAQ;AAAA,MACR,eAAe;AAAA,MACf,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,kBAAkB;AAAA,MAClB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAEA,UAAM,oBAAoB,EAAE,OAAO,CAAC,GAAG,cAAc,KAAK;AAE1D,UAAM,kBAAkB,EAAE;AAAA,MACxB,CAAC;AAAA,MACD;AAAA,MACA,WAAW,mBAAmB,UAAU;AAAA,IAC1C;AAEA,QAAI,CAAC,gBAAgB,SAAS,gBAAgB,iBAAiB;AAC7D,aAAO,uBAAuB;AAAA,QAC5B,GAAG;AAAA,QACH,YAAY;AAAA,MACd,CAAC;AAAA,IACH;AAEA,QAAI,CAAC,aAAa,gBAAgB,KAAK,GAAG;AACxC,aAAO,eAAe,eAAe;AAAA,IACvC;AAEA,QAAI,gBAAgB,YAAY;AAC9B,aAAO,gBAAgB,eAAe;AAAA,IACxC;AAEA,QAAI,gBAAgB,MAAM;AACxB,aAAO,UAAU,eAAe;AAAA,IAClC;AAEA,WAAO,cAAc,eAAe;AAAA,EACtC,CAAC;AACH;","names":[]}
|