zold 0.9.7 → 0.9.8
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 +4 -4
- data/lib/zold/commands/pay.rb +2 -2
- data/lib/zold/version.rb +1 -1
- data/test/commands/test_pay.rb +21 -0
- data/wp/logo.pdf +0 -0
- data/wp/wp.pdf +0 -0
- data/wp/wp.tex +1 -1
- metadata +3 -3
- data/wp/logo.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1fe0556c59991b4873cb362661f1219a802045a
|
4
|
+
data.tar.gz: 9161e7ea2aaf095a0aef9786976e4945374eecae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c64ca5bcc066626a4284f1c7d2a862bf4cac4c0f2e47a1389d41627514f5f3a41051461c3a0d22bc65a443579af6db10884573d10dabc1422dd845e8ee85628
|
7
|
+
data.tar.gz: 4f84a775746b409d45e2c36f7c67afe9a8b6696ab8ba78a7afafa0e29c7aa265ad465d9563a9bce18a4dc0f5daf2e5018771a98a29bd3d3454c9aa6e0180ad70
|
data/lib/zold/commands/pay.rb
CHANGED
@@ -82,8 +82,8 @@ Available options:"
|
|
82
82
|
unless opts.force?
|
83
83
|
raise 'The amount can\'t be zero' if amount.zero?
|
84
84
|
raise "The amount can't be negative: #{amount}" if amount.negative?
|
85
|
-
if !from.root? && from.balance <
|
86
|
-
raise "There is not enough funds in #{from} to send #{amount}, only #{
|
85
|
+
if !from.root? && from.balance < amount
|
86
|
+
raise "There is not enough funds in #{from} to send #{amount}, only #{from.balance} left"
|
87
87
|
end
|
88
88
|
end
|
89
89
|
key = Zold::Key.new(file: opts['private-key'])
|
data/lib/zold/version.rb
CHANGED
data/test/commands/test_pay.rb
CHANGED
@@ -61,4 +61,25 @@ class TestPay < Minitest::Test
|
|
61
61
|
assert_equal(amount * -1, source.balance)
|
62
62
|
end
|
63
63
|
end
|
64
|
+
|
65
|
+
def test_sends_from_normal_wallet
|
66
|
+
FakeHome.new.run do |home|
|
67
|
+
source = home.create_wallet
|
68
|
+
target = home.create_wallet
|
69
|
+
amount = Zold::Amount.new(zld: 14.95)
|
70
|
+
source.add(
|
71
|
+
Zold::Txn.new(
|
72
|
+
1, Time.now, amount,
|
73
|
+
'NOPREFIX', Zold::Id.new, '-'
|
74
|
+
)
|
75
|
+
)
|
76
|
+
Zold::Pay.new(wallets: home.wallets, remotes: home.remotes, log: $log).run(
|
77
|
+
[
|
78
|
+
'pay', '--private-key=fixtures/id_rsa',
|
79
|
+
source.id.to_s, target.id.to_s, amount.to_zld, 'here is the refund'
|
80
|
+
]
|
81
|
+
)
|
82
|
+
assert_equal(Zold::Amount::ZERO, source.balance)
|
83
|
+
end
|
84
|
+
end
|
64
85
|
end
|
data/wp/logo.pdf
ADDED
Binary file
|
data/wp/wp.pdf
CHANGED
Binary file
|
data/wp/wp.tex
CHANGED
@@ -27,7 +27,7 @@
|
|
27
27
|
\setlength{\parindent}{0pt} % indent first line
|
28
28
|
\setlength{\parskip}{6pt} % before par
|
29
29
|
|
30
|
-
\title{\includegraphics[scale=0.
|
30
|
+
\title{\includegraphics[scale=0.3]{logo.pdf}\\Zold: A Fast Cryptocurrency for Micro Payments}
|
31
31
|
\author{Yegor Bugayenko\\\texttt{yegor256@gmail.com}}
|
32
32
|
|
33
33
|
\begin{document}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
@@ -355,7 +355,7 @@ files:
|
|
355
355
|
- test/test_zold.rb
|
356
356
|
- wp/.gitignore
|
357
357
|
- wp/Makefile
|
358
|
-
- wp/logo.
|
358
|
+
- wp/logo.pdf
|
359
359
|
- wp/main.bib
|
360
360
|
- wp/wp.pdf
|
361
361
|
- wp/wp.tex
|
@@ -429,7 +429,7 @@ test_files:
|
|
429
429
|
- test/test_zold.rb
|
430
430
|
- wp/.gitignore
|
431
431
|
- wp/Makefile
|
432
|
-
- wp/logo.
|
432
|
+
- wp/logo.pdf
|
433
433
|
- wp/main.bib
|
434
434
|
- wp/wp.pdf
|
435
435
|
- wp/wp.tex
|
data/wp/logo.png
DELETED
Binary file
|