重命名 ActTransfer 为 ActionTransfer;
删除 ling 目录,把 Action*.js 迁移到上级根目录。
This commit is contained in:
parent
c18b412c1b
commit
73ca4df3db
@ -1,9 +1,9 @@
|
||||
const Action = require('./Action.js')
|
||||
|
||||
const DAD = module.exports = function ActTransfer (prop) {
|
||||
this._class = 'ActTransfer'
|
||||
this.setProp(prop) // 没有定义 ActTransfer.prototype._model,因此继承了上级Action.prototype._model,因此通过this.setProp,继承了上级Action定义的实例自有数据。另一个方案是,调用 Action.call(this, prop)
|
||||
this.type = 'ActTransfer'
|
||||
const DAD = module.exports = function ActionTransfer (prop) {
|
||||
this._class = 'ActionTransfer'
|
||||
this.setProp(prop) // 没有定义 ActionTransfer.prototype._model,因此继承了上级Action.prototype._model,因此通过this.setProp,继承了上级Action定义的实例自有数据。另一个方案是,调用 Action.call(this, prop)
|
||||
this.type = 'ActionTransfer'
|
||||
}
|
||||
DAD.__proto__ = Action
|
||||
const MOM = DAD.prototype
|
||||
@ -12,7 +12,7 @@ MOM.__proto__ = Action.prototype
|
||||
DAD.validate = async function (action) {
|
||||
// if (sender && sender.type !== 'multisig' && action.toAddress != action.actorAddress && sender.balance >= action.amount + action.fee){
|
||||
let sender = await wo.Store.getBalance(action.actorAddress)
|
||||
return action.actorAddress && action.toAddress && action.toAddress != action.actorAddress && action.amount && action.amount > 0 && sender >= action.amount + action.fee && action.fee >= wo.Config.MIN_FEE_ActTransfer
|
||||
return action.actorAddress && action.toAddress && action.toAddress != action.actorAddress && action.amount && action.amount > 0 && sender >= action.amount + action.fee && action.fee >= wo.Config.MIN_FEE_ActionTransfer
|
||||
}
|
||||
|
||||
DAD.execute = async function (action) {
|
Loading…
Reference in New Issue
Block a user