istox 0.1.157.11.t3 → 0.1.157.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.rubocop.yml +0 -0
- data/.solargraph.yml +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/lib/istox/constants/error.rb +0 -0
- data/lib/istox/helpers/common_helper.rb +0 -0
- data/lib/istox/helpers/f_math.rb +0 -0
- data/lib/istox/helpers/formatter.rb +2 -0
- data/lib/istox/helpers/graphql_client.rb +0 -0
- data/lib/istox/helpers/grpc_client.rb +1 -6
- data/lib/istox/helpers/gruf_listener_hook.rb +0 -0
- data/lib/istox/helpers/my_open_struct.rb +0 -0
- data/lib/istox/helpers/order_book_price_time.rb +0 -0
- data/lib/istox/helpers/order_book_prorate.rb +0 -0
- data/lib/istox/helpers/rate_limit.rb +0 -0
- data/lib/istox/helpers/regex_helper.rb +0 -0
- data/lib/istox/helpers/result_handler.rb +0 -0
- data/lib/istox/helpers/sns_publisher.rb +9 -2
- data/lib/istox/helpers/vault.rb +0 -0
- data/lib/istox/interfaces/chainhub/transaction.rb +0 -0
- data/lib/istox/models/blockchain_receipt.rb +0 -0
- data/lib/istox/models/concerns/blockchain_receipt_query.rb +0 -0
- data/lib/istox/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d067ecdccbccbfda95b176b7fcaf3629810dc30d3c7b2f45d820ed861695bac
|
4
|
+
data.tar.gz: 7ac2412f8eae5bc934970d4db789fc2cd3b67dac13a27a9164a4b97817ad46cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 600c82875347e54e1aa6bd919e98a61aebd9322656e4f9dc086870f4e4bd7102bd38c33bf48719f1d61f8e03a74a644b6b75e91e3d2b47d881a295c2735ee0d3
|
7
|
+
data.tar.gz: 9bb9ca6578621d84697f170511ba8d5d4fb591189eb9ccaf02e2657b4b6ad4323d1554be239142ea70069ff88b163743d1c7030838a6c849aaee7c95930ecbb8
|
data/.gitignore
CHANGED
File without changes
|
data/.rubocop.yml
CHANGED
File without changes
|
data/.solargraph.yml
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/lib/istox/helpers/f_math.rb
CHANGED
File without changes
|
@@ -18,6 +18,8 @@ module Istox
|
|
18
18
|
|
19
19
|
# format a money, eg. 20000.134 > SGD 20,000.14, position can be :front or :behind, abs_num: whether to absolute the number
|
20
20
|
def money(input, round_mode: :half_up, precision: 2, currency:, position: :front, abs_num: false)
|
21
|
+
precision = 0 if currency&.downcase == 'jpy'
|
22
|
+
|
21
23
|
result = number(input, round_mode: round_mode, precision: precision, abs_num: abs_num)
|
22
24
|
|
23
25
|
return currency + ' ' + result if position == :front
|
File without changes
|
@@ -82,12 +82,7 @@ module Istox
|
|
82
82
|
|
83
83
|
log.info 'Reinitiating to grpc host at ' + host_url
|
84
84
|
t1 = Time.now
|
85
|
-
|
86
|
-
if ENV.fetch('GRPC_SSL_CERTIFICATE', false)
|
87
|
-
log.info '[INFO] Using SSL connection...'
|
88
|
-
grpc_options[:ssl_certificate] = ENV['GRPC_SSL_CERTIFICATE']
|
89
|
-
end
|
90
|
-
@@services[get_key(host_type, service)] = ::Gruf::Client.new(service: service, options: grpc_options, client_options: client_options)
|
85
|
+
@@services[get_key(host_type, service)] = ::Gruf::Client.new(service: service, options: { hostname: host_url }, client_options: client_options)
|
91
86
|
log.info "Time taken for reinitiating grpc host: #{Time.now - t1} seconds"
|
92
87
|
end
|
93
88
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -28,8 +28,15 @@ module Istox
|
|
28
28
|
def sns_client
|
29
29
|
return @sns_client if @sns_client.present?
|
30
30
|
|
31
|
-
|
32
|
-
|
31
|
+
access_key = ENV.fetch('AWS_STS_ACCESS_KEY_ID', nil)
|
32
|
+
|
33
|
+
if access_key.present?
|
34
|
+
credentials = Aws::Credentials.new(ENV.fetch('AWS_STS_ACCESS_KEY_ID', nil), ENV.fetch('AWS_STS_SECRET_ACCESS_KEY', nil))
|
35
|
+
Aws.config.update(region: ENV.fetch('AWS_REGION', 'ap-southeast-1'),
|
36
|
+
credentials: credentials)
|
37
|
+
else
|
38
|
+
Aws.config.update(region: ENV.fetch('AWS_REGION', 'ap-southeast-1'))
|
39
|
+
end
|
33
40
|
|
34
41
|
@sns_client = Aws::SNS::Client.new(region: ENV.fetch('AWS_REGION', 'ap-southeast-1'))
|
35
42
|
end
|
data/lib/istox/helpers/vault.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/istox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: istox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.157.11.
|
4
|
+
version: 0.1.157.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siong Leng
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|
@@ -542,11 +542,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
542
542
|
version: '0'
|
543
543
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
544
544
|
requirements:
|
545
|
-
- - "
|
545
|
+
- - ">="
|
546
546
|
- !ruby/object:Gem::Version
|
547
|
-
version:
|
547
|
+
version: '0'
|
548
548
|
requirements: []
|
549
|
-
rubygems_version: 3.
|
549
|
+
rubygems_version: 3.1.3
|
550
550
|
signing_key:
|
551
551
|
specification_version: 4
|
552
552
|
summary: istox backend shared gem
|