Skip to content

Commit

Permalink
remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaimoiseanu committed Mar 7, 2024
1 parent 43f1f29 commit 89766c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/mangopay/authorization_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ def get_token
token = storage.get
env_key = get_environment_key_for_token
if token.nil? || token['timestamp'].nil? || token['timestamp'] <= Time.now || token['environment_key'] != env_key
headers = {}
token = MangoPay.request(:post, "/#{MangoPay.version_code}/oauth/token", {}, {}, headers, Proc.new do |req|
token = MangoPay.request(:post, "/#{MangoPay.version_code}/oauth/token", {}, {}, {}, Proc.new do |req|
cfg = MangoPay.configuration
req.basic_auth cfg.client_id, cfg.client_apiKey
req.body = 'grant_type=client_credentials'
Expand Down Expand Up @@ -74,7 +73,7 @@ def get
end

def store(token)
File.open(file_path, File::RDWR|File::CREAT, 0644) do |f|
File.open(file_path, File::RDWR | File::CREAT, 0644) do |f|
f.flock(File::LOCK_EX)
f.truncate(0)
f.rewind
Expand Down

0 comments on commit 89766c1

Please sign in to comment.