fix(api): fix invalid tx sig when tx to is nil

This commit is contained in:
Alexader 2020-12-23 10:37:14 +08:00
parent d26cec7a9b
commit 9f702db5ed
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ func (cbs *ChainBrokerService) checkTransaction(tx *pb.Transaction) error {
return fmt.Errorf("tx from address is nil")
}
if tx.To == nil {
tx.To = &types.Address{}
return fmt.Errorf("tx to address is nil")
}
emptyAddress := &types.Address{}