stellar_base-rails 0.7.0 → 0.7.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41b8211660e2ba9849bf8f5a247fd388339864a234c564633b3d8c285060b3fb
|
4
|
+
data.tar.gz: 9c7acced470d828762a303873c9d22e6b14161320ccf09b09da1b14a51faeebb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 064d30d29693383dc5a63a70a64ee2218ca58ddfd6f1965c9f3564e5784edd880b7d60e841c5048193d51b0f55edcfff22c5e06ea847fdb318984ed3ef1f6772
|
7
|
+
data.tar.gz: 76ab21c6ac5bc40dda0f2ded2a3e1cd5cf65398be344e41608df1856acea0f58cb575476e1dba5185b52f7ecae5b6063398925ad40430eb929691b93d325948f
|
@@ -3,7 +3,42 @@ module StellarBase
|
|
3
3
|
|
4
4
|
include Virtus.model
|
5
5
|
|
6
|
-
attribute :
|
6
|
+
attribute :ACCOUNTS, Array
|
7
|
+
attribute :AUTH_SERVER, String
|
8
|
+
attribute :CURRENCIES, Array
|
9
|
+
attribute :DESIRED_BASE_FEE, Integer
|
10
|
+
attribute :DESIRED_MAX_TX_PER_LEDGER, Integer
|
11
|
+
attribute :FEDERATION_SERVER, String
|
12
|
+
attribute :HISTORY, Array
|
13
|
+
attribute :KNOWN_PEERS, Array
|
14
|
+
attribute :NODE_NAMES, Array
|
15
|
+
attribute :OUR_VALIDATORS, Array
|
16
|
+
attribute :QUORUM_SET, Array
|
17
|
+
attribute :SIGNING_KEY, String
|
18
|
+
attribute :TRANSFER_SERVER, String
|
19
|
+
|
20
|
+
ATTRIBUTES = %w[
|
21
|
+
ACCOUNTS
|
22
|
+
AUTH_SERVER
|
23
|
+
CURRENCIES
|
24
|
+
DESIRED_BASE_FEE
|
25
|
+
DESIRED_MAX_TX_PER_LEDGER
|
26
|
+
FEDERATION_SERVER
|
27
|
+
HISTORY
|
28
|
+
KNOWN_PEERS
|
29
|
+
NODE_NAMES
|
30
|
+
OUR_VALIDATORS
|
31
|
+
QUORUM_SET
|
32
|
+
SIGNING_KEY
|
33
|
+
TRANSFER_SERVER
|
34
|
+
].freeze
|
35
|
+
|
36
|
+
def to_hash
|
37
|
+
ATTRIBUTES.each_with_object({}) do |attr, hash|
|
38
|
+
value = send(attr)
|
39
|
+
hash[attr] = send(attr) if value.present?
|
40
|
+
end
|
41
|
+
end
|
7
42
|
|
8
43
|
end
|
9
44
|
end
|
@@ -24,15 +24,20 @@ module StellarBase
|
|
24
24
|
|
25
25
|
Rails.logger.info(msg)
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
begin
|
28
|
+
response = c.stellar_sdk_client.send_payment(
|
29
|
+
from: c.distribution_account,
|
30
|
+
to: c.recipient_account,
|
31
|
+
amount: c.stellar_amount,
|
32
|
+
memo: c.deposit_request.memo,
|
33
|
+
)
|
34
34
|
|
35
|
-
|
35
|
+
c.stellar_tx_id = response.to_hash["hash"]
|
36
|
+
rescue Faraday::ClientError => e
|
37
|
+
c.fail!
|
38
|
+
c.skip_remaining! "Error sending the asset. " \
|
39
|
+
"Faraday::ClientError: #{e.message}"
|
40
|
+
end
|
36
41
|
end
|
37
42
|
|
38
43
|
end
|
data/lib/stellar_base/engine.rb
CHANGED
@@ -9,8 +9,9 @@ module StellarBase
|
|
9
9
|
end
|
10
10
|
|
11
11
|
initializer "register.mime_types" do
|
12
|
-
|
13
|
-
|
12
|
+
if Mime::Type.lookup_by_extension("toml").blank?
|
13
|
+
Mime::Type.register "application/toml", :toml
|
14
|
+
end
|
14
15
|
end
|
15
16
|
|
16
17
|
config.generators do |g|
|
data/lib/stellar_base/version.rb
CHANGED