diff --git a/src/@utils/dispenser.ts b/src/@utils/dispenser.ts index e4eec5056..f963bc85a 100644 --- a/src/@utils/dispenser.ts +++ b/src/@utils/dispenser.ts @@ -9,17 +9,18 @@ export async function setMinterToPublisher( ): Promise { const datatokenInstance = new Datatoken(signer) - const response = await datatokenInstance.removeMinter( + const removeMinterTx = await datatokenInstance.removeMinter( datatokenAddress, accountId, accountId ) + await removeMinterTx.wait() - if (!response) { + if (!removeMinterTx) { setError('Updating DDO failed.') LoggerInstance.error('Failed at cancelMinter') } - return response + return removeMinterTx } export async function setMinterToDispenser( @@ -30,14 +31,14 @@ export async function setMinterToDispenser( ): Promise { const datatokenInstance = new Datatoken(signer) - const response = await datatokenInstance.addMinter( + const addMinterTx = await datatokenInstance.addMinter( datatokenAddress, accountId, accountId ) - if (!response) { + if (!addMinterTx) { setError('Updating DDO failed.') LoggerInstance.error('Failed at makeMinter') } - return response + return addMinterTx } diff --git a/src/@utils/nft.ts b/src/@utils/nft.ts index b5f23b0db..f25db52c3 100644 --- a/src/@utils/nft.ts +++ b/src/@utils/nft.ts @@ -213,6 +213,7 @@ export async function setNFTMetadataAndTokenURI( accountId, metadataAndTokenURI ) + await setMetadataAndTokenURITx.wait() return setMetadataAndTokenURITx }