Add WL info for OE collections on the collection list
This commit is contained in:
parent
0354131ad1
commit
0958b0db94
@ -60,6 +60,12 @@ const CollectionList: NextPage = () => {
|
||||
if (minterConfig?.whitelist) collection.whitelist = minterConfig.whitelist
|
||||
setMyStandardCollections((prevState) => [...prevState, collection])
|
||||
} else if (contractType?.includes('open-edition')) {
|
||||
const minterConfig = await (await wallet.getCosmWasmClient())
|
||||
.queryContractSmart(collection.minter, { config: {} })
|
||||
.catch(() => {
|
||||
console.log('Unable to retrieve minter config')
|
||||
})
|
||||
if (minterConfig?.whitelist) collection.whitelist = minterConfig.whitelist
|
||||
setMyOpenEditionCollections((prevState) => [...prevState, collection])
|
||||
}
|
||||
})
|
||||
@ -429,6 +435,31 @@ const CollectionList: NextPage = () => {
|
||||
</Tooltip>
|
||||
</span>
|
||||
</div>
|
||||
<Conditional test={collection.whitelist}>
|
||||
<div className="flex flex-row items-center space-x-3">
|
||||
Whitelist:
|
||||
<span className="ml-2">
|
||||
<Tooltip
|
||||
backgroundColor="bg-blue-500"
|
||||
label="Click to copy the whitelist contract address"
|
||||
>
|
||||
<button
|
||||
className="group flex space-x-2 font-mono text-base text-white/80 hover:underline"
|
||||
onClick={() => void copy(collection.whitelist as string)}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
{truncateMiddle(
|
||||
collection.whitelist ? (collection.whitelist as string) : '',
|
||||
36,
|
||||
)}
|
||||
</span>
|
||||
<FaCopy className="opacity-0 group-hover:opacity-100" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
</span>
|
||||
</div>
|
||||
</Conditional>
|
||||
</td>
|
||||
<th className="bg-black">
|
||||
<div className="flex items-center space-x-8">
|
||||
@ -445,6 +476,14 @@ const CollectionList: NextPage = () => {
|
||||
>
|
||||
<FaRocket />
|
||||
</Anchor>
|
||||
<Conditional test={collection.whitelist}>
|
||||
<Anchor
|
||||
className="text-xl text-white"
|
||||
href={`/contracts/whitelist/execute/?contractAddress=${collection.whitelist}`}
|
||||
>
|
||||
<FaList />
|
||||
</Anchor>
|
||||
</Conditional>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user