Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix txdecode panic #275

Merged
merged 1 commit into from
Nov 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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