Skip to content

Commit

Permalink
satisfy rubocop and version bump to 3.14
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Stachyra committed Jul 29, 2021
1 parent 1d90c44 commit 7d90a65
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Expand Up @@ -22,3 +22,4 @@ Metrics/CyclomaticComplexity:

Metrics/ParameterLists:
Max: 10
MaxOptionalParameters: 10
5 changes: 2 additions & 3 deletions lib/cardano_wallet/byron.rb
Expand Up @@ -210,7 +210,6 @@ def random(wid, payments)
# Byron transactions
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postByronTransactionFee
class Transactions < Base

# Construct transaction
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/constructByronTransaction
# @param wid [String] source wallet id
Expand All @@ -237,8 +236,8 @@ def construct(wid, payments = nil, metadata = nil, mint = nil, validity_interval
# @param passphrase [String] CBOR transaction data
def sign(wid, passphrase, transaction)
payload = {
"passphrase" => passphrase,
"transaction" => transaction
'passphrase' => passphrase,
'transaction' => transaction
}

self.class.post("/byron-wallets/#{wid}/transactions-sign",
Expand Down
13 changes: 9 additions & 4 deletions lib/cardano_wallet/shelley.rb
Expand Up @@ -258,7 +258,6 @@ def random_deleg(wid, deleg_action)
# API for Transactions
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#tag/Transactions
class Transactions < Base

# Construct transaction
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/constructTransaction
# @param wid [String] source wallet id
Expand All @@ -268,7 +267,13 @@ class Transactions < Base
# @param mint [Array of Hashes] mint object
# @param delegations [Array of Hashes] delegations object
# @param validity_interval [Hash] validity_interval object
def construct(wid, payments = nil, withdrawal = nil, metadata = nil, delegations = nil, mint = nil, validity_interval = nil)
def construct(wid,
payments = nil,
withdrawal = nil,
metadata = nil,
delegations = nil,
mint = nil,
validity_interval = nil)
payload = {}
payload[:payments] = payments if payments
payload[:withdrawal] = withdrawal if withdrawal
Expand All @@ -289,8 +294,8 @@ def construct(wid, payments = nil, withdrawal = nil, metadata = nil, delegations
# @param passphrase [String] CBOR transaction data
def sign(wid, passphrase, transaction)
payload = {
"passphrase" => passphrase,
"transaction" => transaction
'passphrase' => passphrase,
'transaction' => transaction
}

self.class.post("/wallets/#{wid}/transactions-sign",
Expand Down
2 changes: 1 addition & 1 deletion lib/cardano_wallet/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module CardanoWallet
VERSION = '0.3.12'
VERSION = '0.3.14'
end

0 comments on commit 7d90a65

Please sign in to comment.