coin-address-validators 0.0.3 → 0.0.4

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: 56edfdfd7d5f1a470161a6b023912670965de8d8
4
- data.tar.gz: 9d11bd8bec9a018592e5fa10ad59e92133c2b74b
3
+ metadata.gz: 638fba2600d5e49cc76c26aeed7da323568e0064
4
+ data.tar.gz: f9741d00c2fbbf8d75d5d2d8da6a8e9128f3a9a0
5
5
  SHA512:
6
- metadata.gz: 120653700405dc6acef33ea0dda46c1e68fe77ee923d480d516ed1535bc1f25fa9a5da73f33b4fa3f6a42f5719875ec41fe9263b9e2d028f762c51884734cc54
7
- data.tar.gz: 018b1bf5ad16408657d32d444b0d7cd5fe76a068c059a9794386d2c24d7ee30981041946ad1711f1b289b96e2040d196e581d7880495529dc7f8adfa46f7497a
6
+ metadata.gz: 6d3c7763b04e3c769e20be2080c31adcc21fcdda26fa8553a1c2be99233cc6c1b833f2788aaf5d0113a52b952b2b6abdf669f25f543d8aacfde5e40fce57ece9
7
+ data.tar.gz: 97985c8319560e90f7614c26aa524d2528632884c483303a6d597a98c2427acd09d9e3dc26f07908e3871e6cc2dcf34406f9e145f4ee4b1459a2e726715faad1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coin-address-validators (0.0.2)
4
+ coin-address-validators (0.0.4)
5
5
  base_x
6
6
  bitcoin-ruby
7
7
  cashaddress
@@ -77,7 +77,7 @@ class CoinAddressValidators
77
77
  else
78
78
  [Cashaddress.to_legacy("bitcoincash:#{address}"), true]
79
79
  end
80
- rescue Cashaddress::Error
80
+ rescue Cashaddress::Error, TypeError
81
81
  [nil, false]
82
82
  end
83
83
 
@@ -1,3 +1,3 @@
1
1
  class CoinAddressValidators
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -56,5 +56,15 @@ RSpec.describe CoinAddressValidators do
56
56
  end
57
57
  end
58
58
  end
59
- end
60
59
 
60
+ describe "BchValidator" do
61
+ describe "#parse_cash_addr" do
62
+ context "invalid address" do
63
+ it "handles gracefully" do
64
+ legacy_address, ok = CoinAddressValidators["bch"].parse_cash_addr("ABC")
65
+ expect(ok).to be_falsey
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coin-address-validators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phuong Nguyen