stellar_base-rails 3.0.0 → 3.0.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: 205c8a74625acc0c63b8d7cebccce557f28eeaaeecdd2e01c0a89f13858246b4
4
- data.tar.gz: 03b3cd8048c9281b7c68e3b7c6c4f04698647e19c6e12e5473aedecaa2f13aba
3
+ metadata.gz: dd04e0a80166c2240b0758ebaa6eae6cefab1304a57062ea349613e0698339f4
4
+ data.tar.gz: 45b0f0c8323a6229b421b5baba5fab3d44cbf034396263f4ef56458ff7f9db6c
5
5
  SHA512:
6
- metadata.gz: e7d5ea815097938ac7334b4b727a6bacbf6e30c1a42db21889b3cd9d11c0081bdd60344f600aa369790a87203d17fb2531a924ac0b0a57c2c5e2e29abcdd6d8c
7
- data.tar.gz: 5ecb3a37a9ca87c75b20bf0dc4a9025150ff067c0e021896ef2a456f03fad7bb809072518215b93bac27bb99d636945335ad86d0ebe823f75390fde7a55a76ad
6
+ metadata.gz: 29006920d37951497ce155702bef8c6f0537a69ccf105a7a0ada4beafcc585fb090d06b5dbfbafd012c56e7c9ff32a350bf8667b9015b6fe94800ab882d457f1
7
+ data.tar.gz: ddb54313dad9a7fa4299f4a062edd5042f234e9673d51872f7b7bad64dc494b86294918ab03b636df0ace59884400dcc3974ca02696d5cd98cd45e2f2f6a85d0
@@ -13,9 +13,15 @@ module StellarBase
13
13
 
14
14
  address = c.account_subscription.address
15
15
 
16
- c.cursor = c.stellar_sdk_client.horizon.
16
+ operation_records = c.stellar_sdk_client.horizon.
17
17
  account(account_id: address).
18
- operations(order: "desc", limit: 1).records.first.id
18
+ operations(order: "desc", limit: 1).records
19
+
20
+ if operation_records.empty?
21
+ c.fail_and_return!("No operations available")
22
+ end
23
+
24
+ c.cursor = operation_records.first.id
19
25
 
20
26
  c.account_subscription.update_attributes!(cursor: c.cursor)
21
27
  rescue Faraday::ClientError => e
@@ -1,3 +1,3 @@
1
1
  module StellarBase
2
- VERSION = "3.0.0".freeze
2
+ VERSION = "3.0.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: 3.0.0
4
+ version: 3.0.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: 2019-02-15 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: disposable