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

Goal: Add check for signer passed in the case of logic sig rekeyed account #3773

Merged
merged 4 commits into from
Mar 18, 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
10 changes: 9 additions & 1 deletion cmd/goal/clerk.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ var signCmd = &cobra.Command{
}

var lsig transactions.LogicSig

var authAddr basics.Address
var client libgoal.Client
var wh []byte
var pw []byte
Expand All @@ -743,6 +743,11 @@ var signCmd = &cobra.Command{
dataDir := ensureSingleDataDir()
client = ensureKmdClient(dataDir)
wh, pw = ensureWalletHandleMaybePassword(dataDir, walletName, true)
} else if signerAddress != "" {
authAddr, err = basics.UnmarshalChecksumAddress(signerAddress)
if err != nil {
reportErrorf("Signer invalid (%s): %v", signerAddress, err)
}
}

var outData []byte
Expand Down Expand Up @@ -790,6 +795,9 @@ var signCmd = &cobra.Command{
for _, txn := range txnGroups[group] {
if lsig.Logic != nil {
txn.Lsig = lsig
if signerAddress != "" {
txn.AuthAddr = authAddr
}
}
txnGroup = append(txnGroup, *txn)
}
Expand Down