Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop into testnet #1379

Merged
merged 15 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/constants/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,4 +489,12 @@ export const TestnetContractHashTags: ContractHashTag[] = [
tag: 'omni_lock v2',
category: 'lock',
},
{
codeHashes: ['0xd23761b364210735c19c60561d213fb3beae2fd6172743719eff6920e020baac'],
txHashes: ['0x4dcf3f3b09efac8995d6cbee87c5345e812d310094651e0c3d9a730f32dc9263-0'],
depType: 'dep_group',
hashType: 'type',
tag: 'JoyID',
category: 'lock',
},
]
35 changes: 16 additions & 19 deletions src/pages/ScriptList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ const ScriptList: FC = () => {
<div className={styles.container}>
{[...scripts].map(([label, meta]) => {
const script = scriptDataList.find(s => s.tag === label)
if (!script) return null
return (
<details key={label} id={label} open={label === defaultOpenLabel}>
<summary data-deprecated={!!meta.deprecated} title={meta.deprecated ? 'Deprecated' : undefined}>
Expand All @@ -226,22 +227,19 @@ const ScriptList: FC = () => {
</a>
) : null,
)}
{script ? (
<a
href={`/script/${script.codeHashes[0]}/${script.hashType}`}
target="_blank"
rel="noopener noreferrer"
>
{t('script_list.link.detail')}
</a>
) : null}
<a
href={`/script/${script.codeHashes[0]}/${script.hashType}`}
target="_blank"
rel="noopener noreferrer"
>
{t('script_list.link.detail')}
</a>
</div>
{script ? (
<>
<h3>{`${t(`script_list.on_chain_data`)}:`}</h3>
{script.codeHashes.map((codeHash: string, idx: number) => (
<pre key={codeHash}>
{`{
<>
<h3>{`${t(`script_list.on_chain_data`)}:`}</h3>
{script.codeHashes.map((codeHash: string, idx: number) => (
<pre key={codeHash}>
{`{
"code_hash": "${codeHash}",
"hash_type": "${script.hashType}",
"out_point": {
Expand All @@ -250,10 +248,9 @@ const ScriptList: FC = () => {
},
"dep_type": "${script.depType}"
}`}
</pre>
))}
</>
) : null}
</pre>
))}
</>
</div>
</details>
)
Expand Down