diff --git a/package.json b/package.json index 73a1dcb..08bb97c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "idriss-crypto", - "version": "1.9.0", + "version": "1.9.1", "main": "./lib/index.js", "module": "./lib/esnext/index.js", "exports": { diff --git a/src/baseIdrissCrypto.ts b/src/baseIdrissCrypto.ts index 7481feb..25e8188 100644 --- a/src/baseIdrissCrypto.ts +++ b/src/baseIdrissCrypto.ts @@ -1102,25 +1102,19 @@ export abstract class BaseIdrissCrypto { console.log('Could not estimate gas:', error); } } - try { - const approval = await contract.sendTransaction({ - method: { - name: 'approve', - args: [ - contractToAuthorize, - BigNumber.from(asset.amount).toString(), - ], - }, - transactionOptions: { - ...transactionOptions, - from: transactionOptions.from ?? signer, - }, - }); - delete transactionOptions.gas; - return approval; - } catch (error) { - console.log(error); - } + + const approval = await contract.sendTransaction({ + method: { + name: 'approve', + args: [contractToAuthorize, BigNumber.from(asset.amount).toString()], + }, + transactionOptions: { + ...transactionOptions, + from: transactionOptions.from ?? signer, + }, + }); + delete transactionOptions.gas; + return approval; } return true;