Skip to content

Commit

Permalink
chore: reset mint sent log
Browse files Browse the repository at this point in the history
  • Loading branch information
fpChan committed May 11, 2021
1 parent 784ba1b commit f92c763
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions offchain-modules/src/packages/handlers/ckb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ export class CkbHandler {
const rawTx = await generator.mint(await account.getLockscript(), records);
const signedTx = this.ckb.signTransaction(this.PRI_KEY)(rawTx);
const mintTxHash = await this.ckb.rpc.sendTransaction(signedTx);
logger.info(
`CkbHandler handleMintRecords Mint Transaction has been sent, ckbTxHash ${mintTxHash}, mintIds:${mintIds}`,
);
const txStatus = await this.waitUntilCommitted(mintTxHash, 200);
if (txStatus.txStatus.status === 'committed') {
mintRecords.map((r) => {
Expand All @@ -295,9 +298,6 @@ export class CkbHandler {
`CkbHandler handleMintRecords mint execute failed txStatus:${txStatus.txStatus.status}, mintIds:${mintIds}`,
);
}
logger.info(
`CkbHandler handleMintRecords Mint Transaction has been sent, ckbTxHash ${mintTxHash}, mintIds:${mintIds}`,
);
await this.db.updateCkbMint(mintRecords);
logger.info('CkbHandler handleMintRecords mint execute completed, mintIds:', mintIds);
} catch (e) {
Expand Down

0 comments on commit f92c763

Please sign in to comment.