Skip to content

Commit

Permalink
Merge pull request #275 from jamesvan2019/main
Browse files Browse the repository at this point in the history
fix txdecode panic
  • Loading branch information
dindinw authored Nov 9, 2022
2 parents 2ecad78 + a0c7aeb commit d651db1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qx/handle_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ func TxSign(privkeyStrs []string, rawTxStr string, network string) (string, erro
param = &params.PrivNetParams
case "mixnet":
param = &params.MixNetParams
default:
ErrExit(fmt.Errorf("invalid network (mainnet|testnet|privnet|mixnet)"))
}

if len(rawTxStr)%2 != 0 {
Expand Down Expand Up @@ -200,6 +202,8 @@ func TxDecode(network string, rawTxStr string) {
param = &params.PrivNetParams
case "mixnet":
param = &params.MixNetParams
default:
ErrExit(fmt.Errorf("invalid network (mainnet|testnet|privnet|mixnet)"))
}
strArr := strings.Split(rawTxStr, MTX_STR_SEPERATE)
rawTxStr = strArr[0]
Expand Down

0 comments on commit d651db1

Please sign in to comment.