Merge pull request #299 from meshplus/fix/nil-to-address

fix(api): fix invalid tx sig when tx to is nil
This commit is contained in:
jzhe 2020-12-23 11:14:27 +08:00 committed by GitHub
commit 62366d6e95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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{}