Skip to content

Commit

Permalink
move txn template filler above fee setting (algorand#3592)
Browse files Browse the repository at this point in the history
* move txn template filler above fee setting

* move note/lease to just below make txn, similar to others
  • Loading branch information
barnjamin authored Feb 9, 2022
1 parent 14fa6d0 commit c8c6fb7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmd/goal/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,6 @@ var sendAssetCmd = &cobra.Command{
if err != nil {
reportErrorf("Cannot construct transaction: %s", err)
}
explicitFee := cmd.Flags().Changed("fee")
if explicitFee {
tx.Fee = basics.MicroAlgos{Raw: fee}
}

tx.Note = parseNoteField(cmd)
tx.Lease = parseLease(cmd)
Expand All @@ -541,11 +537,17 @@ var sendAssetCmd = &cobra.Command{
if err != nil {
reportErrorf("Cannot determine last valid round: %s", err)
}

tx, err = client.FillUnsignedTxTemplate(sender, firstValid, lastValid, fee, tx)
if err != nil {
reportErrorf("Cannot construct transaction: %s", err)
}

explicitFee := cmd.Flags().Changed("fee")
if explicitFee {
tx.Fee = basics.MicroAlgos{Raw: fee}
}

if outFilename == "" {
wh, pw := ensureWalletHandleMaybePassword(dataDir, walletName, true)
signedTxn, err := client.SignTransactionWithWallet(wh, pw, tx)
Expand Down

0 comments on commit c8c6fb7

Please sign in to comment.