onchain 1.3.5 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/onchain/sweeper.rb +14 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f97f703fb5014f03ff2396d8d1d5b86bef410733
4
- data.tar.gz: a07dcebcc42c255d501ec1c2b2891c58a785853b
3
+ metadata.gz: 1ef2b547fa4d6a22c2f25316fc38c4c33c81a12f
4
+ data.tar.gz: 79cc4f5dc8fc2ffad0f0a3f105c6c6915ae60137
5
5
  SHA512:
6
- metadata.gz: b3a3cf891cb74cace09d4dd30d9f659cf1ea578e3313f0d645d276c27037bb39714813ed23811c763d6a64e4dde3505b3e9fdeebdb76a373de4c08e5af1a9b4e
7
- data.tar.gz: 59f6652377b1cd185b5242fc73e67849c6f929fc9faede954ba3b12cb7ef59ff7c2a2eb2fe19251f86dcce5393ae7e0893705e06ef587397eac7a71006a4ca07
6
+ metadata.gz: f4eab868831a2a29667a19b14c57b34556622c44d2dc2d026398db1f6253d026adafe0d4fe1a50cc2d31ad658c0d7d946a24755bc73b47eed6e00970f6dc7271
7
+ data.tar.gz: d2f99924c6bd866ff7d561c7d3c9632f2547a171b4eee1ec401f473d9a9b8401cfcff8b799cf5b5852d24abbbd7826cafc20a46c900de8229516aab8ee2ad778
@@ -125,7 +125,6 @@ class OnChain::Sweeper
125
125
  return "Not enough coins to create a transaction."
126
126
  end
127
127
 
128
-
129
128
  # Add an output and we're done.
130
129
  txout = Bitcoin::Protocol::TxOut.new(total_amount,
131
130
  Bitcoin::Script.to_address_script(destination_address))
@@ -137,8 +136,20 @@ class OnChain::Sweeper
137
136
  return OnChain.bin_to_hex(tx.to_payload), paths
138
137
  end
139
138
 
140
- def post_tx_for_signing(tx_hex, meta)
141
- RestClient.post 'https://onchain.io/api/v1/transaction', :tx => tx_hex, :meta_data => meta
139
+ def post_tx_for_signing(tx_hex, paths)
140
+
141
+ meta = ''
142
+ if paths != nil
143
+ paths.each do |path|
144
+ meta = meta + path
145
+ end
146
+ end
147
+
148
+
149
+ res = RestClient.post 'https://onchain.io/api/v1/transaction', :tx => tx_hex,
150
+ :meta_data => meta,
151
+ :user_email => ENV['ONCHAIN_EMAIL'],
152
+ :user_token => ENV['ONCHAIN_TOKEN']
142
153
  end
143
154
 
144
155
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onchain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Purton