istox 0.1.88 → 0.1.89
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/istox/helpers/order_book_prorate.rb +7 -4
- data/lib/istox/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: 659ab060b5c086465c6675d00bcbdd5a6af93563e5f7e18d537e51d16acb64ab
|
4
|
+
data.tar.gz: 6059d8e4dcbeb56031770fb83b95e68be8eb0a902abb1357e1e2a92baf3a2262
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9519f71cc54e12bf1f02b5f7219d56dc25f987a6d8c08474f9ece34c672d1cf5aad7e90691e6a9fba0baaa1eb72e9633e8e006229da9acfb834a654a37e2b002
|
7
|
+
data.tar.gz: 124913a00fb1820ce830407d6b9fea72b3005def98c736c1bc6f2f6e4b8951ffe20c50db084e8973b67fd8665adbd9bb6e4c1669fb1f7a39e422638b84b360df
|
data/Gemfile.lock
CHANGED
@@ -22,13 +22,16 @@ module Istox
|
|
22
22
|
# prorate the interests
|
23
23
|
interests = interests.each_with_index.map do |interest, i|
|
24
24
|
investment = if i < max_allowed_investor
|
25
|
-
::Istox::FMath.round_down(::Istox::FMath.mul(::Istox::FMath.div(interest[:fiat_amount], total_interests),
|
25
|
+
result = ::Istox::FMath.round_down(::Istox::FMath.mul(::Istox::FMath.div(interest[:fiat_amount], total_interests),
|
26
|
+
hard_cap), 0)
|
27
|
+
result = result.to_d - result.to_d.modulo(invest_step.to_s.to_d)
|
28
|
+
|
29
|
+
result = min_investment.to_d if result < min_investment.to_d
|
30
|
+
|
31
|
+
result
|
26
32
|
else
|
27
33
|
::BigDecimal.new('0').to_s
|
28
34
|
end
|
29
|
-
investment = investment.to_d - investment.to_d.modulo(invest_step.to_s.to_d)
|
30
|
-
|
31
|
-
investment = min_investment.to_d if investment < min_investment.to_d
|
32
35
|
|
33
36
|
{
|
34
37
|
id: interest[:id],
|
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.
|
4
|
+
version: 0.1.89
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siong Leng
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|