Use transfer handler for "call" to EoA
@@ -38,9 +38,16 @@ func (cm *contractManager) GetSystemScore(contentID string, cc contract.CallCont
}
func (cm *contractManager) GetHandler(from, to module.Address, value *big.Int, ctype int, data []byte) (contract.ContractHandler, error) {
- if ctype == contract.CTypeTransfer && !to.IsContract() {
+ switch ctype {
+ case contract.CTypeTransfer:
+ if !to.IsContract() {
return newTransferHandler(from, to, value, data, cm.log), nil
}
+ case contract.CTypeCall:
+ if !to.IsContract() {
+ return newTransferHandler(from, to, value, data, cm.log), nil
+ }
+ }
return cm.ContractManager.GetHandler(from, to, value, ctype, data)
}
