Merge pull request #252 from public-awesome/collection-actions-no-wallet-issue
Fix: Collection actions no wallet issue
This commit is contained in:
commit
b41b927632
@ -66,7 +66,7 @@ export const JsonPreview = ({
|
|||||||
</div>
|
</div>
|
||||||
{show && (
|
{show && (
|
||||||
<div className="overflow-auto p-2 font-mono text-sm">
|
<div className="overflow-auto p-2 font-mono text-sm">
|
||||||
<pre>{JSON.stringify(content, null, 2).trim()}</pre>
|
<pre>{content ? JSON.stringify(content, null, 2).trim() : '{}'}</pre>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -337,8 +337,11 @@ export const CollectionActions = ({
|
|||||||
const { isLoading, mutate } = useMutation(
|
const { isLoading, mutate } = useMutation(
|
||||||
async (event: FormEvent) => {
|
async (event: FormEvent) => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
if (!wallet.isWalletConnected) {
|
||||||
|
throw new Error('Please connect your wallet first.')
|
||||||
|
}
|
||||||
if (!type) {
|
if (!type) {
|
||||||
throw new Error('Please select an action!')
|
throw new Error('Please select an action.')
|
||||||
}
|
}
|
||||||
if (minterContractAddress === '' && sg721ContractAddress === '') {
|
if (minterContractAddress === '' && sg721ContractAddress === '') {
|
||||||
throw new Error('Please enter minter and sg721 contract addresses!')
|
throw new Error('Please enter minter and sg721 contract addresses!')
|
||||||
|
Loading…
Reference in New Issue
Block a user