mixin_bot 0.7.3 → 0.7.4
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 +5 -5
- data/lib/mixin_bot/version.rb +1 -1
- data/lib/mixin_bot.rb +2 -0
- 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: 8518e345e340ad9210d201ef9222ac8255e8d2410bef2de528a01972b23c2293
|
4
|
+
data.tar.gz: 542b6d177762c88e43897880febb1bf05b781901ec7306278a70e0ddbe9cb16b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26728ebf17156617342ed7672a0efb54b243d9f0ecc7b724c72050a03260cf4df01b011de0dc4be3ec57a322e8eca2f411647ff842b0976470c76b6ab43a755c
|
7
|
+
data.tar.gz: 552a1ab0c82ea8ce605484c19dfacb866d3b7205f3631670752f17014f2e48cff441b3022a85fed5106f7c770344a84745caaba08032f75fe27ee8c6e86a5d69
|
@@ -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.
|
163
|
+
amount = amount.to_d.round(8)
|
164
164
|
input_amount = utxos.map(
|
165
165
|
&lambda { |utxo|
|
166
|
-
utxo['amount'].
|
166
|
+
utxo['amount'].to_d
|
167
167
|
}
|
168
|
-
).sum
|
168
|
+
).sum
|
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:
|
202
|
+
amount: input_amount - amount,
|
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.
|
226
|
+
amount: amount.to_d.round(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
data/lib/mixin_bot.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixin_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- an-lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|