Commit 43c22d00 authored by linj's avatar linj Committed by vipwzw

deal with withdraw first

parent 61b6973a
...@@ -29,14 +29,14 @@ func CreateRawTx(cmd *cobra.Command, to string, amount float64, note string, isW ...@@ -29,14 +29,14 @@ func CreateRawTx(cmd *cobra.Command, to string, amount float64, note string, isW
} }
var tx *types.Transaction var tx *types.Transaction
transfer := &tokenty.TokenAction{} transfer := &tokenty.TokenAction{}
if !isWithdraw { if isWithdraw {
v := &tokenty.TokenAction_Transfer{Transfer: &types.AssetsTransfer{Cointoken: tokenSymbol, Amount: amountInt64, Note: []byte(note), To: to}}
transfer.Value = v
transfer.Ty = tokenty.ActionTransfer
} else {
v := &tokenty.TokenAction_Withdraw{Withdraw: &types.AssetsWithdraw{Cointoken: tokenSymbol, Amount: amountInt64, Note: []byte(note), To: to}} v := &tokenty.TokenAction_Withdraw{Withdraw: &types.AssetsWithdraw{Cointoken: tokenSymbol, Amount: amountInt64, Note: []byte(note), To: to}}
transfer.Value = v transfer.Value = v
transfer.Ty = tokenty.ActionWithdraw transfer.Ty = tokenty.ActionWithdraw
} else {
v := &tokenty.TokenAction_Transfer{Transfer: &types.AssetsTransfer{Cointoken: tokenSymbol, Amount: amountInt64, Note: []byte(note), To: to}}
transfer.Value = v
transfer.Ty = tokenty.ActionTransfer
} }
execer := []byte(getRealExecName(paraName, "token")) execer := []byte(getRealExecName(paraName, "token"))
if paraName == "" { if paraName == "" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment