mixin_bot 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mixin_bot/api/multisig.rb +4 -4
- data/lib/mixin_bot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff1380a5f8ac4dfc43535c076c71d5cf56bb33c6397678b2fec9f8ee57363856
|
4
|
+
data.tar.gz: 57f9a232369a358340bd2f631590436290aa53d86ca48a23083e1257a0a20792
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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']
|
data/lib/mixin_bot/version.rb
CHANGED