ethereum 0.4.36 → 0.4.37

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
  SHA1:
3
- metadata.gz: 6b892efd7bf7edd063df9f5cf7752e3b025bcda8
4
- data.tar.gz: 1ac4e39c77224ac2b6d59b99c9c034af33f52dd1
3
+ metadata.gz: cfd525de7fc31db259cdc41bcf64888e04246042
4
+ data.tar.gz: 0509aa5518988eca4df6e6e734bf4f271a81d501
5
5
  SHA512:
6
- metadata.gz: 8a1c63289a23926be5c8488524de18d4f89f31b4561189595d97d8091208eeaf6c3e0a0ac0dcb288aeaff8ffd5297994505ad48c416d911ea75371fcb2c92c67
7
- data.tar.gz: 2ef9fb844c27fe236268655d1e5c4545dda4e54c1e9f1d5223afd856439f73968aa70533e39d9f16c03fb547201061436a6cdd960044df0c521a756266f936b5
6
+ metadata.gz: 99ea33ff270853cb36e2dc5064c7e136ff071c96dd95d7ea07256431b03b486d982b6d85ba8200ef261fd5d6d26ba2fe2bbdd62d64b10991941eda3ee5dc0675
7
+ data.tar.gz: 7eb07c33c6bbe09b45b8fb97d5cd99cfc34e1dd085f9ce1fef06822a489c193f9771673f5ebd0e316b12460c6c31a31e122ced0812797c7dc862722ac60da037
@@ -58,11 +58,11 @@ module Ethereum
58
58
  end
59
59
 
60
60
  def to_wei(amount, unit)
61
- BigDecimal.new(UNITS[unit.to_sym] * amount, 16).to_s.to_i
61
+ BigDecimal.new(UNITS[unit.to_sym] * amount, 16).to_s.to_i rescue nil
62
62
  end
63
63
 
64
64
  def from_wei(amount, unit)
65
- (BigDecimal.new(amount, 16) / BigDecimal.new(UNITS[unit.to_sym], 16)).to_s
65
+ (BigDecimal.new(amount, 16) / BigDecimal.new(UNITS[unit.to_sym], 16)).to_s rescue nil
66
66
  end
67
67
 
68
68
  def from_address(address)
@@ -1,3 +1,3 @@
1
1
  module Ethereum
2
- VERSION = "0.4.36"
2
+ VERSION = "0.4.37"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethereum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.36
4
+ version: 0.4.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - DigixGlobal Pte Ltd (https://dgx.io)