Add ExecuteBatchAfterCheck method to NFT interface for pre-checking and executing batch commands
This commit is contained in:
@@ -104,6 +104,13 @@ func (n *nft) Command() contract.Command {
|
||||
return n.command
|
||||
}
|
||||
|
||||
func (n *nft) ExecuteBatchAfterCheck(batch contract.Batch) error {
|
||||
if err := batch.Check(n.command); err != nil {
|
||||
return err
|
||||
}
|
||||
return n.command.Run(batch.Args()...)
|
||||
}
|
||||
|
||||
func (n *nft) ExecuteBatch(batch contract.Batch) error {
|
||||
return n.command.Run(batch.Args()...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user