rename seckey to prikey

This commit is contained in:
Luk Lu
2022-08-14 15:51:24 +08:00
parent 8cf67bf90c
commit 76deb199a5
2 changed files with 8 additions and 8 deletions

View File

@@ -14,12 +14,12 @@ const MOM = DAD.prototype
MOM.__proto__ = Action.prototype
// MOM._table=DAD.name // 注释掉从而继承父类Action的数据库表格名
MOM.signMe = async function (seckey) {
MOM.signMe = async function (prikey) {
// 由前端调用,后台不该进行签名
let json = this.getJson({
exclude: ['hash', 'blockHash', 'actorSignature', 'json']
}) // 是前端用户发起事务时签字这时候还不知道进入哪个区块所以不能计入blockHash
this.actorSignature = await ticc.sign_easy({ data: json, seckey })
this.actorSignature = await ticc.sign_easy({ data: json, prikey })
return this
}
@@ -61,7 +61,7 @@ MOM.packMe = async function (keypair) {
this.actorAddress = ticc.pubkey_to_address({ pubkey: keypair.pubkey })
this.timestamp = new Date()
await this.signMe(keypair.seckey)
await this.signMe(keypair.prikey)
this.hashMe()
return this
}