onchain 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/onchain/sweeper.rb +14 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ef2b547fa4d6a22c2f25316fc38c4c33c81a12f
|
4
|
+
data.tar.gz: 79cc4f5dc8fc2ffad0f0a3f105c6c6915ae60137
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4eab868831a2a29667a19b14c57b34556622c44d2dc2d026398db1f6253d026adafe0d4fe1a50cc2d31ad658c0d7d946a24755bc73b47eed6e00970f6dc7271
|
7
|
+
data.tar.gz: d2f99924c6bd866ff7d561c7d3c9632f2547a171b4eee1ec401f473d9a9b8401cfcff8b799cf5b5852d24abbbd7826cafc20a46c900de8229516aab8ee2ad778
|
data/lib/onchain/sweeper.rb
CHANGED
@@ -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,
|
141
|
-
|
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
|