File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ export const MainnetContractHashTags: ContractHashTag[] = [
268
268
depType : 'code' ,
269
269
hashType : 'data1' ,
270
270
tag : 'xUDT' ,
271
- category : 'lock ' ,
271
+ category : 'type ' ,
272
272
} ,
273
273
{
274
274
codeHashes : [ '0x4a4dce1df3dffff7f8b2cd7dff7303df3b6150c9788cb75dcf6747247132b9f5' ] ,
@@ -660,15 +660,15 @@ export const TestnetContractHashTags: ContractHashTag[] = [
660
660
depType : 'code' ,
661
661
hashType : 'type' ,
662
662
tag : 'xUDT(final_rls)' ,
663
- category : 'lock ' ,
663
+ category : 'type ' ,
664
664
} ,
665
665
{
666
666
codeHashes : [ '0x50bd8d6680b8b9cf98b73f3c08faf8b2a21914311954118ad6609be6e78a1b95' ] ,
667
667
txHashes : [ '0xbf6fb538763efec2a70a6a3dcb7242787087e1030c4e7d86585bc63a9d337f5f-0' ] ,
668
668
depType : 'code' ,
669
669
hashType : 'data1' ,
670
670
tag : 'xUDT' ,
671
- category : 'lock ' ,
671
+ category : 'type ' ,
672
672
} ,
673
673
{
674
674
codeHashes : [
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ import { ReactComponent as EditIcon } from '../../assets/edit.svg'
30
30
import XUDTTokenIcon from '../../assets/sudt_token.png'
31
31
import { ReactComponent as OpenSourceIcon } from '../../assets/open-source.svg'
32
32
import { scripts } from '../ScriptList'
33
+ import { IS_MAINNET } from '../../constants/common'
34
+ import { MainnetContractHashTags , TestnetContractHashTags } from '../../constants/scripts'
35
+
36
+ const scriptDataList = IS_MAINNET ? MainnetContractHashTags : TestnetContractHashTags
33
37
34
38
const IssuerContent : FC < { address : string } > = ( { address } ) => {
35
39
const { t } = useTranslation ( )
@@ -185,6 +189,9 @@ export const UDTOverviewCard = ({
185
189
)
186
190
187
191
const tags = xudt ?. xudtTags ?? [ ]
192
+ const isOpenSourceXudt = xudt
193
+ ? scriptDataList . some ( s => s . tag . startsWith ( 'xUDT' ) && s . codeHashes . includes ( xudt ?. typeScript . codeHash ) )
194
+ : false
188
195
189
196
return (
190
197
< >
@@ -203,7 +210,7 @@ export const UDTOverviewCard = ({
203
210
{ tags . map ( tag => (
204
211
< XUDTTag tagName = { tag } to = "/xudts" tooltip />
205
212
) ) }
206
- { xudtCodeUrl ? (
213
+ { isOpenSourceXudt && xudtCodeUrl ? (
207
214
< Link className = { styles . openSource } to = { xudtCodeUrl } >
208
215
{ t ( 'scripts.open_source_script' ) }
209
216
< OpenSourceIcon />
You can’t perform that action at this time.
0 commit comments