Merge PR #3674: Remove password/keybase from REST Client
This commit is contained in:
committed by
Jack Zampolin
parent
6967de1073
commit
e39debd359
@@ -56,8 +56,10 @@ type (
|
||||
)
|
||||
|
||||
// Withdraw delegator rewards
|
||||
func withdrawDelegatorRewardsHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext,
|
||||
queryRoute string) http.HandlerFunc {
|
||||
func withdrawDelegatorRewardsHandlerFn(
|
||||
cdc *codec.Codec, cliCtx context.CLIContext, queryRoute string,
|
||||
) http.HandlerFunc {
|
||||
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req withdrawRewardsReq
|
||||
if !rest.ReadRESTReq(w, r, cdc, &req) {
|
||||
@@ -81,12 +83,7 @@ func withdrawDelegatorRewardsHandlerFn(cdc *codec.Codec, cliCtx context.CLIConte
|
||||
return
|
||||
}
|
||||
|
||||
if req.BaseReq.GenerateOnly {
|
||||
clientrest.WriteGenerateStdTxResponse(w, cdc, cliCtx, req.BaseReq, msgs)
|
||||
return
|
||||
}
|
||||
|
||||
clientrest.CompleteAndBroadcastTxREST(w, cliCtx, req.BaseReq, msgs, cdc)
|
||||
clientrest.WriteGenerateStdTxResponse(w, cdc, cliCtx, req.BaseReq, msgs)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,12 +118,7 @@ func withdrawDelegationRewardsHandlerFn(cdc *codec.Codec, cliCtx context.CLICont
|
||||
return
|
||||
}
|
||||
|
||||
if req.BaseReq.GenerateOnly {
|
||||
clientrest.WriteGenerateStdTxResponse(w, cdc, cliCtx, req.BaseReq, []sdk.Msg{msg})
|
||||
return
|
||||
}
|
||||
|
||||
clientrest.CompleteAndBroadcastTxREST(w, cliCtx, req.BaseReq, []sdk.Msg{msg}, cdc)
|
||||
clientrest.WriteGenerateStdTxResponse(w, cdc, cliCtx, req.BaseReq, []sdk.Msg{msg})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,12 +148,7 @@ func setDelegatorWithdrawalAddrHandlerFn(cdc *codec.Codec, cliCtx context.CLICon
|
||||
return
|
||||
}
|
||||
|
||||
if req.BaseReq.GenerateOnly {
|
||||
clientrest.WriteGenerateStdTxResponse(w, cdc, cliCtx, req.BaseReq, []sdk.Msg{msg})
|
||||
return
|
||||
}
|
||||
|
||||
clientrest.CompleteAndBroadcastTxREST(w, cliCtx, req.BaseReq, []sdk.Msg{msg}, cdc)
|
||||
clientrest.WriteGenerateStdTxResponse(w, cdc, cliCtx, req.BaseReq, []sdk.Msg{msg})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,12 +179,7 @@ func withdrawValidatorRewardsHandlerFn(cdc *codec.Codec, cliCtx context.CLIConte
|
||||
return
|
||||
}
|
||||
|
||||
if req.BaseReq.GenerateOnly {
|
||||
clientrest.WriteGenerateStdTxResponse(w, cdc, cliCtx, req.BaseReq, msgs)
|
||||
return
|
||||
}
|
||||
|
||||
clientrest.CompleteAndBroadcastTxREST(w, cliCtx, req.BaseReq, msgs, cdc)
|
||||
clientrest.WriteGenerateStdTxResponse(w, cdc, cliCtx, req.BaseReq, msgs)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user