1
This commit is contained in:
parent
2392c44402
commit
c416d1b7c2
@ -17,13 +17,19 @@ class Redeem721 extends BaseEventProcess {
|
|||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
const returnValues = this.getReturnValues();
|
const returnValues = this.getReturnValues();
|
||||||
|
const blockData = this.getBlockData();
|
||||||
|
const redeemTime = blockData['timestamp'];
|
||||||
|
if (redeemTime) {
|
||||||
|
this.throwError('Redeem721 blockData error:' + blockData);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
'c': 'Callback',
|
'c': 'Callback',
|
||||||
'a': 'dispatch',
|
'a': 'dispatch',
|
||||||
'action': 'redeem721',
|
'action': 'redeem721',
|
||||||
'data': utils.jsonEncode(returnValues),
|
'data': utils.jsonEncode(returnValues),
|
||||||
'redeem_time': utils.getUtcTime(),
|
'redeem_time': redeemTime,
|
||||||
'txhash': this.getTxHash(),
|
'txhash': this.getTxHash(),
|
||||||
'net_id': this.getNetId()
|
'net_id': this.getNetId()
|
||||||
};
|
};
|
||||||
|
@ -19,6 +19,7 @@ class BaseEventProcess {
|
|||||||
this.eventProc = proc;
|
this.eventProc = proc;
|
||||||
this.eventDb = eventDb;
|
this.eventDb = eventDb;
|
||||||
this.returnValues = utils.jsonDecode(this.getEventDb()['return_values']);
|
this.returnValues = utils.jsonDecode(this.getEventDb()['return_values']);
|
||||||
|
this.blockData = utils.jsonDecode(this.getEventDb()['block_data']);
|
||||||
this.txHash = this.getEventDb()['txhash'];
|
this.txHash = this.getEventDb()['txhash'];
|
||||||
this.bcEventConn = null;
|
this.bcEventConn = null;
|
||||||
this.bcNftConn = null;
|
this.bcNftConn = null;
|
||||||
@ -76,6 +77,10 @@ class BaseEventProcess {
|
|||||||
return this.returnValues;
|
return this.returnValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBlockData() {
|
||||||
|
return this.blockData;
|
||||||
|
}
|
||||||
|
|
||||||
getTxHash() {
|
getTxHash() {
|
||||||
return this.txHash;
|
return this.txHash;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user