lib/lunanode/api.rb in lunanode-0.3.0 vs lib/lunanode/api.rb in lunanode-0.3.1
- old
+ new
@@ -145,13 +145,14 @@
end
# Clean empty request parameters
def clean_params(params)
params.each_with_object({}) do |(param, value), acc|
+ next if param.nil? || value.nil?
next unless param.respond_to?(:to_sym) && value.respond_to?(:to_s)
acc[param.to_sym] = value.to_s
end
- end # :reek:ManualDispatch
+ end # :reek:NilCheck :reek:ManualDispatch
# Create signed request data
def auth_request_formdata(handler_path, params)
req_msg = raw_request_message(params)
nonce = gen_nonce