diff --git a/cli/wallet/wallet.go b/cli/wallet/wallet.go index b6cfb7f9a..2abcadf01 100644 --- a/cli/wallet/wallet.go +++ b/cli/wallet/wallet.go @@ -48,6 +48,10 @@ var ( Name: "rpc, r", Usage: "RPC node address", } + r14Flag = cli.StringFlag{ + Name: "remark14", + Usage: "Remark14 field", + } timeoutFlag = cli.DurationFlag{ Name: "timeout, t", Usage: "Timeout for the operation", @@ -188,6 +192,7 @@ func NewCommands() []cli.Command { Flags: []cli.Flag{ walletPathFlag, rpcFlag, + r14Flag, timeoutFlag, outFlag, fromAddrFlag, @@ -487,6 +492,8 @@ func transferAsset(ctx *cli.Context) error { return cli.NewExitError(fmt.Errorf("wallet contains no account for '%s'", from), 1) } + remark14 := ctx.String("remark14") + asset, err := getAssetID(ctx.String("asset")) if err != nil { return cli.NewExitError(fmt.Errorf("invalid asset id: %v", err), 1) @@ -517,6 +524,13 @@ func transferAsset(ctx *cli.Context) error { return cli.NewExitError(err, 1) } + if remark14 != "" { + tx.Attributes = append(tx.Attributes, transaction.Attribute{ + Usage: transaction.Remark14, + Data: []byte(remark14), + }) + } + toFlag := ctx.Generic("to").(*flags.Address) if !toFlag.IsSet { return cli.NewExitError("'to' address was not provided", 1)