bitsy-bitcoin 0.7.1 → 0.8.0

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: 6d5b039fc91c6f09e4a500db7a110f4741d68aaa
4
- data.tar.gz: 16c38e374670e1bed10d219391779b2a7d604297
3
+ metadata.gz: 53818d7ef85b17d1a16ec1edb3dbe28a19a7e270
4
+ data.tar.gz: 469e4c1c376b51e046ba9f63d996cfe5dfa471dd
5
5
  SHA512:
6
- metadata.gz: 1f9c83f0c335597e422ef0ee6bcd817167a0b911979d5063f63ec44099dcc7a38b2a60e510636634555a5bd4b0b781a383eba81b9c6c7b0df306ccac5a8ebe2e
7
- data.tar.gz: ae93a6e7e89cea9c91f90d123474226660ae81d08113f37c16e7398bfe62843397bccb010a83b72c920bd7e23b230bd28de900c77e252657e1aea78096e24a92
6
+ metadata.gz: bc27016c49ba72f66ddb091f97f2bc36dd002d2824be86cc4b990ff3b40420e3c45bc3df6619f3a4acaaa4b40d272935bd36a6ab6862c7c1fd0b424044aae548
7
+ data.tar.gz: b217e9704c65a7bcd1d9037bdbce8644b5f2f2b883b1c0d61bd192645b6c3733345c467067c6998f58344a77f48f2729bf50f58fffa531dcba2c0134692e8a29
@@ -5,7 +5,8 @@ module Bitsy
5
5
 
6
6
  def self.execute
7
7
  reduce(
8
- GetLatestBlock,
8
+ FetchPaymentDepotsForManualChecking,
9
+ GetLatestBlockIfPaymentDepots,
9
10
  CheckPaymentDepotsTransactions,
10
11
  )
11
12
  end
@@ -2,10 +2,10 @@ module Bitsy
2
2
  class CheckPaymentDepotsTransactions
3
3
 
4
4
  include LightService::Action
5
- expects :latest_block
5
+ expects :latest_block, :payment_depots
6
6
 
7
7
  executed do |ctx|
8
- PaymentDepot.for_manual_checking.find_each do |payment_depot|
8
+ ctx.payment_depots.find_each do |payment_depot|
9
9
  CheckPaymentDepotTransactions.execute(
10
10
  payment_depot: payment_depot,
11
11
  latest_block: ctx.latest_block,
@@ -0,0 +1,12 @@
1
+ module Bitsy
2
+ class FetchPaymentDepotsForManualChecking
3
+
4
+ include LightService::Action
5
+ promises :payment_depots
6
+
7
+ executed do |ctx|
8
+ ctx.payment_depots = PaymentDepot.for_manual_checking
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ module Bitsy
2
+ class GetLatestBlockIfPaymentDepots
3
+
4
+ include LightService::Action
5
+ expects :payment_depots
6
+ promises :latest_block
7
+
8
+ executed do |ctx|
9
+ ctx.latest_block = if ctx.payment_depots.any?
10
+ Blockchain.get_latest_block
11
+ end
12
+ end
13
+
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module Bitsy
2
- VERSION = "0.7.1"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitsy-bitcoin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-14 00:00:00.000000000 Z
11
+ date: 2014-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -332,9 +332,11 @@ files:
332
332
  - app/services/bitsy/check_payment_depots_transactions.rb
333
333
  - app/services/bitsy/compute_amount_for_splitting.rb
334
334
  - app/services/bitsy/create_payment_depot.rb
335
+ - app/services/bitsy/fetch_payment_depots_for_manual_checking.rb
335
336
  - app/services/bitsy/forward_payments.rb
336
337
  - app/services/bitsy/forward_tax_calculator.rb
337
338
  - app/services/bitsy/get_latest_block.rb
339
+ - app/services/bitsy/get_latest_block_if_payment_depots.rb
338
340
  - app/services/bitsy/instantiate_blockchain_wallet.rb
339
341
  - app/services/bitsy/log_send_many.rb
340
342
  - app/services/bitsy/process_blockchain_blockexplorer_transaction.rb