Match inputs with query types

This commit is contained in:
Serkan Reis 2023-10-07 12:50:45 +03:00
parent 51acae6a78
commit 3325a93edb
2 changed files with 12 additions and 6 deletions

View File

@ -203,7 +203,7 @@ export const RoyaltyRegistry = (client: SigningCosmWasmClient, txSigner: string)
txSigner,
contractAddress,
{
set_collection_royalty_default: { collection, recipient, share: share / 100 },
set_collection_royalty_default: { collection, recipient, share: (share / 100).toString() },
},
'auto',
)
@ -223,7 +223,7 @@ export const RoyaltyRegistry = (client: SigningCosmWasmClient, txSigner: string)
update_collection_royalty_default: {
collection,
recipient,
share_delta: shareDelta ? shareDelta / 100 : undefined,
share_delta: shareDelta ? (shareDelta / 100).toString() : undefined,
decrement,
},
},
@ -242,7 +242,7 @@ export const RoyaltyRegistry = (client: SigningCosmWasmClient, txSigner: string)
txSigner,
contractAddress,
{
set_collection_royalty_protocol: { collection, protocol, recipient, share: share / 100 },
set_collection_royalty_protocol: { collection, protocol, recipient, share: (share / 100).toString() },
},
'auto',
)
@ -264,7 +264,7 @@ export const RoyaltyRegistry = (client: SigningCosmWasmClient, txSigner: string)
collection,
protocol,
recipient,
share_delta: shareDelta ? shareDelta / 100 : undefined,
share_delta: shareDelta ? (shareDelta / 100).toString() : undefined,
decrement,
},
},

View File

@ -124,10 +124,16 @@ const RoyaltyRegistryQueryPage: NextPage = () => {
))}
</select>
</FormControl>
<Conditional test={type === 'collection_royalty_default'}>
<Conditional
test={
type === 'collection_royalty_default' ||
type === 'royalty_payment' ||
type === 'collection_royalty_protocol'
}
>
<AddressInput {...collectionAddressState} />
</Conditional>
<Conditional test={type === 'collection_royalty_protocol'}>
<Conditional test={type === 'collection_royalty_protocol' || type === 'royalty_payment'}>
<AddressInput {...protocolAddressState} />
</Conditional>
</div>