pochette 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 232aedff3f83a84ce22d5c17d27cfb9663b8d2a5
4
- data.tar.gz: f53d4c8ddef9552dc4be39640dbb6d2ae0c429f7
3
+ metadata.gz: c67a840f37e1c8a8e29560276521c6a10a2edfe6
4
+ data.tar.gz: 5b38f917803fb98e70387de1db5753c505b3c03a
5
5
  SHA512:
6
- metadata.gz: bc2996d2eece872696c85d2bb2ef1a72f7b703ead2c945ae114e6c201eeb8b40a5f16c51ed8d960e793227d673afee28ca1ccfa9a04ea7c1b718fc6dc0600ffb
7
- data.tar.gz: 88c8709b576c2e68d7a1b2689fc193c7c94679100df7d0913d342173853952eb4b3c99187027277381b254590ddb0c83df2e71dcccec555c2bb7b5e24433d6e6
6
+ metadata.gz: 2e91fae50ed18c182a165e8020e71be01b630baa81b89d0c1f0644e91a661b743cc44a9dbe80ed7e65a599745b07504e56551586747d90d6dc1748fa73f3af05
7
+ data.tar.gz: baabb89ac0dde0290553376df3ebfa818454791496854050e292ec6684d80da120ca29666a306d695076fafb582d592296dac2fc1d4a95c0914ba1d66f8586b8
@@ -47,9 +47,9 @@ class Pochette::TransactionBuilder
47
47
  })]
48
48
  def as_hash
49
49
  return nil unless valid?
50
- { input_total: inputs_amount,
51
- output_total: outputs_amount,
52
- fee: inputs_amount - outputs_amount,
50
+ { input_total: inputs_amount.to_i,
51
+ output_total: outputs_amount.to_i,
52
+ fee: (inputs_amount - outputs_amount).to_i,
53
53
  inputs: inputs,
54
54
  outputs: outputs,
55
55
  utxos_to_blacklist: inputs.collect{|i| [i[1], i[2]] },
@@ -137,7 +137,7 @@ protected
137
137
  minimum_fee(fee_for_bytes(output_size))
138
138
  change_address = options[:change_address] || addresses.first
139
139
  if change > dust_size
140
- outputs << [change_address, change]
140
+ outputs << [change_address, change.to_i]
141
141
  add_output_fee
142
142
  end
143
143
  end
@@ -118,7 +118,7 @@ protected
118
118
  def build_trezor_outputs
119
119
  self.trezor_outputs = outputs.collect do |address, amount|
120
120
  type = Bitcoin.address_type(address) == :hash160 ? 'PAYTOADDRESS' : 'PAYTOSCRIPTHASH'
121
- { script_type: type, address: address, amount: amount }
121
+ { script_type: type, address: address, amount: amount.to_i }
122
122
  end
123
123
  end
124
124
 
@@ -1,3 +1,3 @@
1
1
  module Pochette
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pochette
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nubis
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-12-03 00:00:00.000000000 Z
12
+ date: 2015-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport