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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d1b17fe305b72f8d35e448eb525bdd25c85083e8b94cfd281ab3d8526e80c5e
4
- data.tar.gz: 97e9b54f5ffc65545ef0dc355fd18576ad5737f9711ab5fd8cdeda0bc7df08a4
3
+ metadata.gz: 659ab060b5c086465c6675d00bcbdd5a6af93563e5f7e18d537e51d16acb64ab
4
+ data.tar.gz: 6059d8e4dcbeb56031770fb83b95e68be8eb0a902abb1357e1e2a92baf3a2262
5
5
  SHA512:
6
- metadata.gz: edb8a2a41e7a97125f3389ccf7cb59870f9645a67ccd618be956166c36ac39e5bd6c344a19a37250f30a5f1d4544f3714575c233a3019bcf03e0f047c603fa11
7
- data.tar.gz: 4239d49e2f1c8cca6260f9627a74c5b0e86821015882eea190d276f9b923472d5722e5bfdbe5520fe7799a628c99f2e572c0537956997b5f7a94a4f83fa8620a
6
+ metadata.gz: 9519f71cc54e12bf1f02b5f7219d56dc25f987a6d8c08474f9ece34c672d1cf5aad7e90691e6a9fba0baaa1eb72e9633e8e006229da9acfb834a654a37e2b002
7
+ data.tar.gz: 124913a00fb1820ce830407d6b9fea72b3005def98c736c1bc6f2f6e4b8951ffe20c50db084e8973b67fd8665adbd9bb6e4c1669fb1f7a39e422638b84b360df
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.1.87)
4
+ istox (0.1.88)
5
5
  binding_of_caller
6
6
  bunny (>= 2.12.0)
7
7
  graphlient
@@ -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), hard_cap), 0)
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
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.88'.freeze
2
+ VERSION = '0.1.89'.freeze
3
3
  end
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.88
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-27 00:00:00.000000000 Z
11
+ date: 2019-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny