mixin_bot 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e4d9bbcd0cbf08f07745ac8efa3b587b2d99c45a47958f627261d15fca38a08
4
- data.tar.gz: 1e0cc216622ff4cae2cb3ce9c5c58c213cde40648df8f2ad1f138f27471ef65a
3
+ metadata.gz: ff1380a5f8ac4dfc43535c076c71d5cf56bb33c6397678b2fec9f8ee57363856
4
+ data.tar.gz: 57f9a232369a358340bd2f631590436290aa53d86ca48a23083e1257a0a20792
5
5
  SHA512:
6
- metadata.gz: 10cbd356be328955dc03ec9c99d5cc9b0736004b5b120f75658555b7cb332112faff6f554f7d7055dc74ceced4cc1b3fb598d6b0e49127e315b7e2196e14bb15
7
- data.tar.gz: f49139e817460192aba74027af8228cdf97bb8a4e2d7caf71adc3e4c9838f21b5a3a1029f9b8a02ca04c84b5e8770e4d8875605aeb40e0a212e510daf8414050
6
+ metadata.gz: 7611839592fcc990af4de58b12760863d647b4d12dd411901313e5bf58f4b459e14ef4d39e4f020e663c1c2d243c7a97b62cb32c20892f299fe49d70f4985675
7
+ data.tar.gz: a7fb7e2b860623e48d13b380ad7aa94346840ca04d809b36cdeb35d967462986a638e3e110eb31229eef39aacce7f263d6ec1e26cbfb67b516cf0ed69ee5b040
@@ -160,12 +160,12 @@ module MixinBot
160
160
 
161
161
  raise 'access_token required!' if access_token.nil? && !senders.include?(client_id)
162
162
 
163
- amount = amount.to_f.round(8)
163
+ amount = amount.to_f.floor(8)
164
164
  input_amount = utxos.map(
165
165
  &lambda { |utxo|
166
166
  utxo['amount'].to_f
167
167
  }
168
- ).sum.round(8)
168
+ ).sum.floor(8)
169
169
 
170
170
  if input_amount < amount
171
171
  raise format(
@@ -199,7 +199,7 @@ module MixinBot
199
199
  output1 = build_output(
200
200
  receivers: senders,
201
201
  index: 1,
202
- amount: (input_amount - amount),
202
+ amount: (input_amount - amount).floor(8),
203
203
  threshold: senders_threshold,
204
204
  hint: hint
205
205
  )
@@ -223,7 +223,7 @@ module MixinBot
223
223
  def build_output(receivers:, index:, amount:, threshold:, hint: nil)
224
224
  _output = create_output receivers: receivers, index: index, hint: hint
225
225
  {
226
- amount: amount.to_f.round(8).to_s,
226
+ amount: amount.to_f.floor(8).to_s,
227
227
  script: build_threshold_script(threshold),
228
228
  mask: _output['mask'],
229
229
  keys: _output['keys']
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MixinBot
4
- VERSION = '0.7.2'
4
+ VERSION = '0.7.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixin_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - an-lee