stellar_base-rails 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: 9984061158609a2ece395e4b1da289274c610862e518c9f5230153ffe56508ec
4
- data.tar.gz: 702cdfe31899188c796aef0728ef98ca274e6e48aadf068d56f2c688576b6881
3
+ metadata.gz: 27818079d5562f323c5c62d8c702d2af4b5703ccfaa453f0a52af5c4f9360685
4
+ data.tar.gz: 1d6fe22f727fe4e3aea9322c073d14cd4ffa1744df3a04af98968009bbe63a54
5
5
  SHA512:
6
- metadata.gz: 26806d26021794d5afb66b2dce8a72f6664e7b9aeddb7ecf75ad673b23fd21d8790a534b45abca45f906fea79acecc44d660a863e5b86d7d2846255dc5b344ac
7
- data.tar.gz: f823873a8e6239c54b14fd9eadec7f0ee1c5c4d628953bb19b86310789617bfc6e007d651da3a3b9779ad21ad6f4df5f90f0f8548fc3c2b5068266f9683d19ee
6
+ metadata.gz: 72efd8d9b9a6f79c832f202b87e5fbea59f2c209c1ba229aa08ee7c83d27b2f8334995529db1abd9a58a3f673745f79baa8d13a0d6613fc369bb1b99d7dc9d6a
7
+ data.tar.gz: ad78ce108acf09454553c3e04511f14c2a2afbc8278d39836d15b530e51b2ebefdd63787417217b15a46d4f6c3998603777526e5bd6a18045b2a80a2e14c47e2
@@ -3,10 +3,10 @@ module StellarBase
3
3
  class ExecuteCallback
4
4
 
5
5
  extend LightService::Action
6
- expects :account_subscription, :tx, :operation
6
+ expects :account_subscription, :tx, :operation, :on_account_event
7
7
 
8
8
  executed do |c|
9
- StellarBase.configuration.on_account_event.(
9
+ c.on_account_event.(
10
10
  c.account_subscription.address,
11
11
  c.tx,
12
12
  c.operation,
@@ -17,11 +17,9 @@ module StellarBase
17
17
  c.operations = c.stellar_sdk_client
18
18
  .horizon
19
19
  .account(account_id: address)
20
- .operations(order: "asc", limit: c.operation_limit)
20
+ .operations(order: "asc", cursor: c.cursor, limit: c.operation_limit)
21
21
  .records
22
- .map do |op|
23
- StellarOperation.new(op)
24
- end
22
+ .map { |op| StellarOperation.new(raw: op) }
25
23
 
26
24
  if c.operations.empty?
27
25
  c.fail_and_return! "No operations found for #{address}"
@@ -4,10 +4,15 @@ module StellarBase
4
4
  extend LightService::Organizer
5
5
  OPERATION_LIMIT = 200
6
6
 
7
- def self.call(account_subscription, operation_limit: OPERATION_LIMIT)
7
+ def self.call(
8
+ account_subscription,
9
+ operation_limit: OPERATION_LIMIT,
10
+ on_account_event: StellarBase.configuration.on_account_event
11
+ )
8
12
  result = with(
9
13
  account_subscription: account_subscription,
10
14
  operation_limit: operation_limit,
15
+ on_account_event: on_account_event,
11
16
  ).reduce(actions)
12
17
 
13
18
  Rails.logger.warn result.message if result.failure?
@@ -1,3 +1,3 @@
1
1
  module StellarBase
2
- VERSION = "1.1.0".freeze
2
+ VERSION = "1.1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stellar_base-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Subido
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-14 00:00:00.000000000 Z
11
+ date: 2018-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: disposable
@@ -530,7 +530,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
530
530
  version: '0'
531
531
  requirements: []
532
532
  rubyforge_project:
533
- rubygems_version: 2.7.6
533
+ rubygems_version: 2.7.7
534
534
  signing_key:
535
535
  specification_version: 4
536
536
  summary: Mountable Stellar API Endpoints for Rails