diff --git a/cmd/goal/application.go b/cmd/goal/application.go index 84f398355f..a3204020ae 100644 --- a/cmd/goal/application.go +++ b/cmd/goal/application.go @@ -402,6 +402,10 @@ var createAppCmd = &cobra.Command{ if err != nil { reportErrorf("Cannot construct transaction: %s", err) } + explicitFee := cmd.Flags().Changed("fee") + if explicitFee { + tx.Fee = basics.MicroAlgos{Raw: fee} + } if outFilename == "" { // Broadcast @@ -480,6 +484,10 @@ var updateAppCmd = &cobra.Command{ if err != nil { reportErrorf("Cannot construct transaction: %s", err) } + explicitFee := cmd.Flags().Changed("fee") + if explicitFee { + tx.Fee = basics.MicroAlgos{Raw: fee} + } // Broadcast or write transaction to file if outFilename == "" { @@ -553,6 +561,10 @@ var optInAppCmd = &cobra.Command{ if err != nil { reportErrorf("Cannot construct transaction: %s", err) } + explicitFee := cmd.Flags().Changed("fee") + if explicitFee { + tx.Fee = basics.MicroAlgos{Raw: fee} + } // Broadcast or write transaction to file if outFilename == "" { @@ -626,6 +638,10 @@ var closeOutAppCmd = &cobra.Command{ if err != nil { reportErrorf("Cannot construct transaction: %s", err) } + explicitFee := cmd.Flags().Changed("fee") + if explicitFee { + tx.Fee = basics.MicroAlgos{Raw: fee} + } // Broadcast or write transaction to file if outFilename == "" { @@ -699,6 +715,10 @@ var clearAppCmd = &cobra.Command{ if err != nil { reportErrorf("Cannot construct transaction: %s", err) } + explicitFee := cmd.Flags().Changed("fee") + if explicitFee { + tx.Fee = basics.MicroAlgos{Raw: fee} + } // Broadcast or write transaction to file if outFilename == "" { @@ -772,6 +792,10 @@ var callAppCmd = &cobra.Command{ if err != nil { reportErrorf("Cannot construct transaction: %s", err) } + explicitFee := cmd.Flags().Changed("fee") + if explicitFee { + tx.Fee = basics.MicroAlgos{Raw: fee} + } // Broadcast or write transaction to file if outFilename == "" { @@ -845,6 +869,10 @@ var deleteAppCmd = &cobra.Command{ if err != nil { reportErrorf("Cannot construct transaction: %s", err) } + explicitFee := cmd.Flags().Changed("fee") + if explicitFee { + tx.Fee = basics.MicroAlgos{Raw: fee} + } // Broadcast or write transaction to file if outFilename == "" { diff --git a/cmd/goal/asset.go b/cmd/goal/asset.go index 047949c0be..ef0d8db44f 100644 --- a/cmd/goal/asset.go +++ b/cmd/goal/asset.go @@ -22,6 +22,7 @@ import ( "github.com/spf13/cobra" + "github.com/algorand/go-algorand/data/basics" "github.com/algorand/go-algorand/libgoal" ) @@ -214,6 +215,10 @@ var createAssetCmd = &cobra.Command{ 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) @@ -289,6 +294,10 @@ var destroyAssetCmd = &cobra.Command{ 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) @@ -378,6 +387,10 @@ var configAssetCmd = &cobra.Command{ 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) @@ -447,6 +460,10 @@ 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) @@ -524,6 +541,10 @@ var freezeAssetCmd = &cobra.Command{ 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) diff --git a/cmd/goal/interact.go b/cmd/goal/interact.go index 498320c3d4..b46f6b8b76 100644 --- a/cmd/goal/interact.go +++ b/cmd/goal/interact.go @@ -601,6 +601,10 @@ var appExecuteCmd = &cobra.Command{ 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)