zold 0.9.7 → 0.9.8

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
  SHA1:
3
- metadata.gz: c7c1b5e4219998688aaec4f6ca49d4f417d472fd
4
- data.tar.gz: 1773d14213af2c9aa5548c3a98ae255243978432
3
+ metadata.gz: a1fe0556c59991b4873cb362661f1219a802045a
4
+ data.tar.gz: 9161e7ea2aaf095a0aef9786976e4945374eecae
5
5
  SHA512:
6
- metadata.gz: e39ad8edca90cf93a11f6fddc204175491b42ec1f3f1e178c744a2f9bd1393f28d6ee29476d84f31bd80e087d06a76a047e580cf7b07d82d906c606b32fefeca
7
- data.tar.gz: b2ab87529c40fc152e7a9cb4d87a8d911723161040185606173e50a95a0e793091dd4cc39399e7d82c76751ec7a9908110061c3704b18660d16235dcdfbb6d10
6
+ metadata.gz: 4c64ca5bcc066626a4284f1c7d2a862bf4cac4c0f2e47a1389d41627514f5f3a41051461c3a0d22bc65a443579af6db10884573d10dabc1422dd845e8ee85628
7
+ data.tar.gz: 4f84a775746b409d45e2c36f7c67afe9a8b6696ab8ba78a7afafa0e29c7aa265ad465d9563a9bce18a4dc0f5daf2e5018771a98a29bd3d3454c9aa6e0180ad70
@@ -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 < @amount
86
- raise "There is not enough funds in #{from} to send #{amount}, only #{payer.balance} left"
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
@@ -23,5 +23,5 @@
23
23
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
24
24
  # License:: MIT
25
25
  module Zold
26
- VERSION = '0.9.7'.freeze
26
+ VERSION = '0.9.8'.freeze
27
27
  end
@@ -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.05]{logo.png}\\Zold: A Fast Cryptocurrency for Micro Payments}
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.7
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.png
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.png
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