istox 0.1.157.11.7 → 0.2.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: daad77968adcfb93af925ac10dcce8e2c5aea6320ff15fc965de447a159dbe43
4
- data.tar.gz: bbad1acc6bf763ccde104f6ea426cf4d094212de19e0da03f3d295ebb827fa8e
3
+ metadata.gz: 177c19f4e1837c38552a01345f4df0ed0b6d75489c3ff7ac7cee4e6ae5300e9d
4
+ data.tar.gz: bc1e0d56a7c66ebbbb11f2408e8dfbbec8fad3bb056eafd08ca89aa3b7af712c
5
5
  SHA512:
6
- metadata.gz: cb7a8b451b28f166df88585182226e17056d433a31bf26a253e3551a6794d220c4c035a3a2f92442fbc1c320b75d39b058beb23f8241a7e71594a95809ccc405
7
- data.tar.gz: 8efd5aad68d20d572bf850ba17d25ac4f1faf8f8ce534e2720c72728e5cfa945d873cd3770ef1235e6997836500dc63248ad9bc91373827a89216aad3191e41c
6
+ metadata.gz: 3b4c6ea1b0f4dade5ce454996d6d72c454560d641a4bba722385db12da19e8531bc6fcab904cb372b664ec3952047510942b92da16bf3ab3dcc28bbde685d603
7
+ data.tar.gz: 5d5e23ac455354401407c93507526fb616e4d7fba272e4883f7a142c86f0bff8c282101aec833b63ae810e90f914c8a273825306673de9c40f6e96908a6123fd
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
File without changes
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  module Istox
2
2
  class OrderBookPriceTime
3
3
  class << self
4
- def allocation(soft_cap, total_supply, investments)
4
+ def allocation(soft_cap, total_supply, investments, decimal_place: 2)
5
5
  # sort by token price desc, and id asc
6
6
  investments = investments.sort do |a, b|
7
7
  [b[:token_price], a[:id]] <=> [a[:token_price], b[:id]]
@@ -15,7 +15,7 @@ module Istox
15
15
  total_allocated = 0.0
16
16
  total_unallocated = 0.0
17
17
  total_investment = 0.0
18
- cutoff_price = ::Istox::FMath.round_up(::Istox::FMath.div(soft_cap, total_supply), 2)
18
+ cutoff_price = ::Istox::FMath.round_up(::Istox::FMath.div(soft_cap, total_supply), decimal_place)
19
19
  is_cutoff = false
20
20
 
21
21
  # return result immediately if no interest
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.157.11.7'.freeze
2
+ VERSION = '0.2.1'.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.157.11.7
4
+ version: 0.2.1
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-02-27 00:00:00.000000000 Z
11
+ date: 2021-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print
@@ -546,7 +546,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
546
546
  - !ruby/object:Gem::Version
547
547
  version: '0'
548
548
  requirements: []
549
- rubygems_version: 3.2.11
549
+ rubygems_version: 3.0.6
550
550
  signing_key:
551
551
  specification_version: 4
552
552
  summary: istox backend shared gem