Skip to content

Commit

Permalink
do not need to check receipt
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhson1085 committed Apr 3, 2020
1 parent 8c35c92 commit 2870a9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
15 changes: 2 additions & 13 deletions issuer.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,7 @@ class IssuerJS {
tokenAddress,
txParams
)
const receipt = await this.provider.getTransactionReceipt(result.hash || '')
if (receipt.status) {
return result
} else {
throw new Error('Something went wrong \n txHash: ' + result.hash || '')
}
return result
}
} catch (error) {
throw error
Expand Down Expand Up @@ -338,13 +333,7 @@ class IssuerJS {
txParams
)

const receipt = await this.provider.getTransactionReceipt(result.hash || '')

if (receipt.status) {
return result
} else {
throw new Error('Something went wrong \n txHash: ' + result.hash || '')
}
return result
}
} catch (error) {
throw error
Expand Down
3 changes: 1 addition & 2 deletions tomo-cli
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,10 @@ function run() {
.command('issuer-apply-tomox')
.description('deposit token pooling fee')
.requiredOption('-t, --tokenAddress <tokenAddress>', 'Token address')
.requiredOption('-a, --amount <amount>', 'Deposit amount')
.action(async (params) => {
await issuerjs.applyTomoX({
tokenAddress: params.tokenAddress,
amount: params.amount
amount: 1000
}).then(data => {
console.log(data)
}).catch(e => console.log(e.message ? e.message : e))
Expand Down

0 comments on commit 2870a9e

Please sign in to comment.