app/models/solidus_me/preferences.rb in solidus_me-1.0.6 vs app/models/solidus_me/preferences.rb in solidus_me-1.0.7
- old
+ new
@@ -7,10 +7,10 @@
@preferences = store.preferences[:melhor_envio]
check
end
def check
- return if @preferences[:client_id].nil? || @preferences[:client_secret].nil? || @preferences[:refresh_token].nil?
+ return if @preferences[:client_id].blank? || @preferences[:client_secret].blank? || @preferences[:refresh_token].blank?
return if (@preferences[:token_expires_in]&.to_datetime - 1.day) > DateTime.now
refresh
end
def refresh