stellar_base-rails 0.9.3 → 0.9.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daf57d4638bce982bb6b23643076ff41a55736075cc25f2d63aaa017734aee75
|
4
|
+
data.tar.gz: 109f46abe1d4ad4d67eed41da9f9aea91fe58dd4ef304f7766c752173c2b48eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d5e0a3825cb8d458d3a3c0809c2bb2fcc1cef1d5b8f57d02c00e563bc8c6888c715679a36d7742877f4622567031335537d39148fff9a59e74816db79954c1e
|
7
|
+
data.tar.gz: 2270ff9426d82c80d32e6fcffefde2c120cffc63b3fa849d8387eaccad177fb149be300471015d568f5377b3159bf0ed69daf51f15e0f189dccc2b3a1e80aa19
|
@@ -13,12 +13,13 @@ module StellarBase
|
|
13
13
|
|
14
14
|
address = c.account_subscription.address
|
15
15
|
|
16
|
-
c.cursor = c.stellar_sdk_client.horizon
|
17
|
-
account(account_id: address)
|
18
|
-
operations(order: "desc", limit: 1).records.first.id
|
16
|
+
c.cursor = c.stellar_sdk_client.horizon
|
17
|
+
.account(account_id: address)
|
18
|
+
.operations(order: "desc", limit: 1).records.first.id
|
19
19
|
|
20
20
|
rescue Faraday::ClientError => e
|
21
|
-
c.fail_and_return! "Skipping fetching cursor of #{address}
|
21
|
+
c.fail_and_return! "Skipping fetching cursor of #{address} " \
|
22
|
+
"due to #{e.inspect}"
|
22
23
|
end
|
23
24
|
|
24
25
|
end
|
@@ -12,9 +12,17 @@ module StellarBase
|
|
12
12
|
promises :operations
|
13
13
|
|
14
14
|
executed do |c|
|
15
|
-
c.operations = c.stellar_sdk_client.horizon
|
16
|
-
account(account_id: c.account_subscription.address)
|
17
|
-
operations(order: "asc", limit: c.operation_limit).records
|
15
|
+
c.operations = c.stellar_sdk_client.horizon
|
16
|
+
.account(account_id: c.account_subscription.address)
|
17
|
+
.operations(order: "asc", limit: c.operation_limit).records
|
18
|
+
|
19
|
+
if c.operations.empty?
|
20
|
+
c.fail_and_return! "No operations found " \
|
21
|
+
"for #{c.account_subscription.address}"
|
22
|
+
end
|
23
|
+
rescue Faraday::ClientError => e
|
24
|
+
c.fail_and_return! "Skipping fetching operations of #{address} " \
|
25
|
+
"due to #{e.inspect}"
|
18
26
|
end
|
19
27
|
|
20
28
|
end
|
@@ -5,10 +5,13 @@ module StellarBase
|
|
5
5
|
OPERATION_LIMIT = 200
|
6
6
|
|
7
7
|
def self.call(account_subscription, operation_limit: OPERATION_LIMIT)
|
8
|
-
with(
|
8
|
+
result = with(
|
9
9
|
account_subscription: account_subscription,
|
10
10
|
operation_limit: operation_limit,
|
11
11
|
).reduce(actions)
|
12
|
+
|
13
|
+
Rails.logger.warn result.message if result.failure?
|
14
|
+
result
|
12
15
|
end
|
13
16
|
|
14
17
|
def self.actions
|
@@ -19,8 +22,8 @@ module StellarBase
|
|
19
22
|
iterate(:operations, [
|
20
23
|
AccountSubscriptions::GetTx,
|
21
24
|
AccountSubscriptions::ExecuteCallback,
|
22
|
-
AccountSubscriptions::SaveCursor,
|
23
25
|
]),
|
26
|
+
AccountSubscriptions::SaveCursor,
|
24
27
|
]
|
25
28
|
end
|
26
29
|
|
data/lib/stellar_base/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stellar_base-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ace Subido
|
@@ -463,7 +463,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
463
463
|
version: '0'
|
464
464
|
requirements: []
|
465
465
|
rubyforge_project:
|
466
|
-
rubygems_version: 2.7.
|
466
|
+
rubygems_version: 2.7.6
|
467
467
|
signing_key:
|
468
468
|
specification_version: 4
|
469
469
|
summary: Mountable Stellar API Endpoints for Rails
|