stellar_base-rails 0.9.0 → 0.9.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: 3405c7d14d3c903049b198c76bc9e2471bcbd618863b08c3cfb75726b7fd6e7b
4
- data.tar.gz: 4bbfa18d9fdd47afe88a680e7eff2e5aef81d58731ae5220a5ad4b1e69201c1a
3
+ metadata.gz: ba94268ed3cf21f32e31859c59878a8dc3d73fac87241d290471399aa99ebe4f
4
+ data.tar.gz: 2acaf72f4d04354136c285a938b2e49872862dc05ec6778a8b4be7e99458f7c6
5
5
  SHA512:
6
- metadata.gz: f0b18e782f78fbf08e89759497e10a6d4a9472aca377a0315c40f2ffd601e4974cb8fe5562fd710768e264827ebef1fcaec1c5e8eb36820834a034bcf33dce6c
7
- data.tar.gz: e6e6ed3ac11bd4a620b61eeb767877fc285ef1867b38eb7d8f60f5d3683a26c0dee651db9d70f76c32bad3f336ae04e802971ca070bbc3595165c41db1875182
6
+ metadata.gz: 4cc02aca5da89bdaeef9d0f24eac89e93484e43f7f521f7201e47b66391e4d7e2463f31f9d8f41984c40c5a6a2d8f096085de94df9c5fb79513d8729b7715627
7
+ data.tar.gz: 7a7fa63b416679d352d4407750c2cf16573a0929b029db3ccc454cec3f11ee6a48bbbc7533ea2689b8d15aff62aa679ec997f782276898e831642e3bbc09a803
@@ -36,7 +36,7 @@ module StellarBase
36
36
  def determine_how!(options, params:, **)
37
37
  details = params[:deposit_asset_details]
38
38
  options["model"].deposit_address =
39
- ConfiguredClassRunner.(details[:how_from])
39
+ DetermineHow.(details[:how_from], params[:deposit_request])
40
40
  end
41
41
 
42
42
  def determine_max_amount!(options, params:, **)
@@ -67,6 +67,7 @@ module StellarBase
67
67
  return GenMemoFor.(DepositRequest) if params[:memo].blank?
68
68
  params[:memo]
69
69
  end
70
+
70
71
  end
71
72
  end
72
73
  end
@@ -1,12 +1,14 @@
1
1
  module StellarBase
2
- class SaveCursor
2
+ module AccountSubscriptions
3
+ class SaveCursor
3
4
 
4
- extend LightService::Action
5
- expects :account_subscription, :operations
5
+ extend LightService::Action
6
+ expects :account_subscription, :operations
6
7
 
7
- executed do |c|
8
- c.account_subscription.update_attributes!(cursor: c.operations.last.id)
9
- end
8
+ executed do |c|
9
+ c.account_subscription.update!(cursor: c.operations.last.id)
10
+ end
10
11
 
12
+ end
11
13
  end
12
14
  end
@@ -0,0 +1,21 @@
1
+ module StellarBase
2
+ module DepositRequests
3
+ class DetermineHow
4
+
5
+ DEFAULT = nil
6
+
7
+ def self.call(class_name, params)
8
+ # TODO: how do we handle errors
9
+ if class_name.present?
10
+ unless class_name.constantize.method(:call).arity.zero?
11
+ return class_name.constantize.send(:call, params)
12
+ end
13
+
14
+ return class_name.constantize.send(:call)
15
+ end
16
+ DEFAULT
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -1,3 +1,3 @@
1
1
  module StellarBase
2
- VERSION = "0.9.0".freeze
2
+ VERSION = "0.9.1".freeze
3
3
  end
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.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Subido
@@ -395,6 +395,7 @@ files:
395
395
  - app/services/stellar_base/bridge_callbacks/verify_mac_payload.rb
396
396
  - app/services/stellar_base/configured_class_runner.rb
397
397
  - app/services/stellar_base/deposit_requests/create_deposit.rb
398
+ - app/services/stellar_base/deposit_requests/determine_how.rb
398
399
  - app/services/stellar_base/deposit_requests/find_config.rb
399
400
  - app/services/stellar_base/deposit_requests/find_deposit.rb
400
401
  - app/services/stellar_base/deposit_requests/find_deposit_request.rb
@@ -462,7 +463,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
462
463
  version: '0'
463
464
  requirements: []
464
465
  rubyforge_project:
465
- rubygems_version: 2.7.7
466
+ rubygems_version: 2.7.6
466
467
  signing_key:
467
468
  specification_version: 4
468
469
  summary: Mountable Stellar API Endpoints for Rails