This commit is contained in:
aozhiwei 2023-07-22 21:20:26 +08:00
parent 0f4e6cc563
commit 45a6698115
2 changed files with 20 additions and 0 deletions

View File

@ -38,6 +38,7 @@ class Transfer extends BaseEventProcess {
this.getContractName(),
tokenId
);
await this.update721NftOwner(tokenId, this.getContractAddress(), to);
await this.markOk();
}

View File

@ -350,6 +350,25 @@ class BaseEventProcess {
}
}
async update721NftOwner(tokenId, contractAddress, ownerAddress) {
const logHead = this.genLogHead(' update721NftOwner ');
const {err} = await this.bcNftDbConn(
'update',
't_nft',
[
['token_id', tokenId],
['net_id', this.getNetId()],
['contract_address', contractAddress],
],
[
['owner_address', bcutils.toNormalAddress(ownerAddress)],
]
);
if (err) {
this.throwError(logHead + err);
}
}
}
module.exports = BaseEventProcess;