bitsy-bitcoin 0.7.1 → 0.8.0
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/app/services/bitsy/check_for_payments.rb +2 -1
- data/app/services/bitsy/check_payment_depots_transactions.rb +2 -2
- data/app/services/bitsy/fetch_payment_depots_for_manual_checking.rb +12 -0
- data/app/services/bitsy/get_latest_block_if_payment_depots.rb +15 -0
- data/lib/bitsy/version.rb +1 -1
- metadata +4 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 53818d7ef85b17d1a16ec1edb3dbe28a19a7e270
         | 
| 4 | 
            +
              data.tar.gz: 469e4c1c376b51e046ba9f63d996cfe5dfa471dd
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: bc27016c49ba72f66ddb091f97f2bc36dd002d2824be86cc4b990ff3b40420e3c45bc3df6619f3a4acaaa4b40d272935bd36a6ab6862c7c1fd0b424044aae548
         | 
| 7 | 
            +
              data.tar.gz: b217e9704c65a7bcd1d9037bdbce8644b5f2f2b883b1c0d61bd192645b6c3733345c467067c6998f58344a77f48f2729bf50f58fffa531dcba2c0134692e8a29
         | 
| @@ -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 | 
            -
                   | 
| 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,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
         | 
    
        data/lib/bitsy/version.rb
    CHANGED
    
    
    
        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. | 
| 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- | 
| 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
         |