OSDN Git Service

Merge pull request #41 from Bytom/dev
[bytom/vapor.git] / api / transact.go
index a4acb34..2b11215 100644 (file)
@@ -34,7 +34,7 @@ func (a *API) actionDecoder(action string) (func([]byte) (txbuilder.Action, erro
                "retire":                       txbuilder.DecodeRetireAction,
                "spend_account":                a.wallet.AccountMgr.DecodeSpendAction,
                "spend_account_unspent_output": a.wallet.AccountMgr.DecodeSpendUTXOAction,
-               "dpos_address":                 a.wallet.AccountMgr.DecodeDposAction,
+               "dpos":                         a.wallet.AccountMgr.DecodeDposAction,
                "ipfs_data":                    txbuilder.DecodeIpfsDataAction,
        }
        decoder, ok := decoders[action]
@@ -49,7 +49,7 @@ func onlyHaveInputActions(req *BuildRequest) (bool, error) {
                if !ok {
                        return false, errors.WithDetailf(ErrBadActionType, "no action type provided on action %d", i)
                }
-               if strings.HasPrefix(actionType, "dpos_address") {
+               if strings.HasPrefix(actionType, "dpos") {
                        dpos = true
                }
                if strings.HasPrefix(actionType, "spend") || actionType == "issue" {