1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

stop execution on publish if user rejects approval tokens (#1173)

This commit is contained in:
EnzoVezzaro 2022-03-09 12:06:55 -04:00 committed by GitHub
parent cfd31905dd
commit 1eacf9d93e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,6 +260,12 @@ export async function createTokensAndPricing(
)
LoggerInstance.log('[publish] pool.approve tx', txApprove, nftFactory)
if (!txApprove) {
throw new Error(
'MetaMask Approve TX Signature: User denied transaction signature'
)
}
const result = await nftFactory.createNftErc20WithPool(
accountId,
nftCreateData,