stellar_base-rails 0.6.0 → 0.6.1
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/concepts/stellar_base/application_operation.rb +0 -2
- data/app/concepts/stellar_base/deposit_requests/operations/create.rb +1 -1
- data/app/concepts/stellar_base/withdrawal_requests/operations/create.rb +0 -1
- data/app/controllers/stellar_base/deposit_controller.rb +15 -1
- data/app/controllers/stellar_base/withdraw_controller.rb +14 -1
- data/lib/stellar_base/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f634660d3aa8e4f2c16dbde0657f5b5be1d23f881911e863350a8800f1e6b5e
|
4
|
+
data.tar.gz: e4d0e9d9ff41c4cdb82f195935b4423181ef3b3631f8238b96498839a1dc6f6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8104f50041913ea06f3ff64be43d1a0b428494077239899683c4a5f662641707c85e81099b3dc2e8f2354ab1cbe857ccb4a8664ab82a0706630fc4f6908a18bd
|
7
|
+
data.tar.gz: 3277b1888a740c362b9789daa9c2adc3835841c360c5f2e4fb87eae8b1e8a329a8c51105f536e185b75fded1f8044559625a627201c4aeaf863c6d524400e7ac
|
@@ -42,7 +42,7 @@ module StellarBase
|
|
42
42
|
def determine_max_amount!(options, params:, **)
|
43
43
|
details = params[:deposit_asset_details]
|
44
44
|
options["model"].max_amount =
|
45
|
-
ConfiguredClassRunner.(details[:max_amount_from])
|
45
|
+
ConfiguredClassRunner.(details[:max_amount_from]) || 0
|
46
46
|
end
|
47
47
|
|
48
48
|
def set_defaults!(options, params:, **)
|
@@ -2,7 +2,8 @@ module StellarBase
|
|
2
2
|
class DepositController < ApplicationController
|
3
3
|
|
4
4
|
def create
|
5
|
-
op = DepositRequests::Operations::Create
|
5
|
+
op = DepositRequests::Operations::Create
|
6
|
+
.(deposit_request: deposit_params)
|
6
7
|
|
7
8
|
respond_to do |f|
|
8
9
|
f.json do
|
@@ -20,5 +21,18 @@ module StellarBase
|
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
24
|
+
private
|
25
|
+
|
26
|
+
def deposit_params
|
27
|
+
params.permit(
|
28
|
+
:account,
|
29
|
+
:asset_code,
|
30
|
+
:memo,
|
31
|
+
:memo_type,
|
32
|
+
:type,
|
33
|
+
:email_address,
|
34
|
+
).to_hash.with_indifferent_access
|
35
|
+
end
|
36
|
+
|
23
37
|
end
|
24
38
|
end
|
@@ -2,7 +2,8 @@ module StellarBase
|
|
2
2
|
class WithdrawController < ApplicationController
|
3
3
|
|
4
4
|
def create
|
5
|
-
op = WithdrawalRequests::Operations::Create
|
5
|
+
op = WithdrawalRequests::Operations::Create
|
6
|
+
.(withdrawal_request: withdraw_params)
|
6
7
|
|
7
8
|
respond_to do |f|
|
8
9
|
f.json do
|
@@ -20,5 +21,17 @@ module StellarBase
|
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
24
|
+
private
|
25
|
+
|
26
|
+
def withdraw_params
|
27
|
+
params.permit(
|
28
|
+
:asset_code,
|
29
|
+
:dest,
|
30
|
+
:dest_extra,
|
31
|
+
:fee_network,
|
32
|
+
:type,
|
33
|
+
).to_hash.with_indifferent_access
|
34
|
+
end
|
35
|
+
|
23
36
|
end
|
24
37
|
end
|
data/lib/stellar_base/version.rb
CHANGED
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: 0.6.
|
4
|
+
version: 0.6.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-09-
|
11
|
+
date: 2018-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: disposable
|