ci_block_io 1.5.0 → 1.6.0

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
  SHA256:
3
- metadata.gz: 83fdcd87e092d1077f6304e11b9dbb6c14717bd26ccb9db8a155a70e2cbdf883
4
- data.tar.gz: 7bdd8da3b2866a12ab1d3b821ac5b38bc9aab38ff4e4768a476ec48902ebac51
3
+ metadata.gz: f6560fed50f1495eba73cfb84738e3b5cdc454ca92336c7bda99046eb3bae01a
4
+ data.tar.gz: 93101230893cc5bf106dbb03b9742d2bd941d370baf3b46bfcde99dd62eb152c
5
5
  SHA512:
6
- metadata.gz: d77eeffe882e8f0966467fab42f1a1546d6c352e816b423c351a914207fb5d1c63d2d9be4e9036d45f60693a99ce89e382ea96eb65e72dfed96573ed11c71b71
7
- data.tar.gz: a804cc22e6f9b1aac6996b4fd51fda0b148c41d4459aa1dce5910e60f94aa3b11f69492613a41c5bb16273455932cfd8836edce92e8692a773cb87ca05480eae
6
+ metadata.gz: dae77e55a5612a90446205f0585472c3923f64033a090a179d2a63bc090c959c06242038800c8e88edb11177d7f9c970d2900dbd1a25ee7be4d3a7dff5b63555
7
+ data.tar.gz: 0d495b1f51ffab04711f9727bd97c3497279032faf425eff91b891f8c482490bc1bf4b2dfea57639314ff84c67ea3f14e9583fbbf3700d8bc00ae6662ca3b092
data/lib/ci_block_io.rb CHANGED
@@ -8,6 +8,9 @@ require 'pbkdf2'
8
8
  require 'securerandom'
9
9
  require 'base64'
10
10
 
11
+ class CiBlockIoWithdrawException < Exception
12
+ end
13
+
11
14
  module CiBlockIo
12
15
 
13
16
  @api_key = nil
@@ -62,7 +65,7 @@ module CiBlockIo
62
65
  def self.withdraw(args = {}, method_name = 'withdraw')
63
66
  # validate arguments for withdrawal of funds TODO
64
67
 
65
- raise Exception.new("PIN not set. Use BlockIo.set_options(:api_key=>'API KEY',:pin=>'SECRET PIN',:version=>'API VERSION')") if @pin.nil?
68
+ raise CiBlockIoWithdrawException.new("PIN not set. Use BlockIo.set_options(:api_key=>'API KEY',:pin=>'SECRET PIN',:version=>'API VERSION')") if @pin.nil?
66
69
 
67
70
  params = get_params(args)
68
71
 
@@ -79,7 +82,7 @@ module CiBlockIo
79
82
  # let's get our private key
80
83
  key = Helper.extractKey(encrypted_passphrase, @encryptionKey)
81
84
 
82
- raise Exception.new('Public key mismatch for requested signer and ourselves. Invalid Secret PIN detected.') if key.public_key != response['data']['encrypted_passphrase']['signer_public_key']
85
+ raise CiBlockIoWithdrawException.new('Public key mismatch for requested signer and ourselves. Invalid Secret PIN detected.') if key.public_key != response['data']['encrypted_passphrase']['signer_public_key']
83
86
 
84
87
  # let's sign all the inputs we can
85
88
  inputs = response['data']['inputs']
@@ -1,3 +1,3 @@
1
1
  module CiBlockIo
2
- VERSION = "1.5.0"
2
+ VERSION = "1.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci_block_io
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atsuhiro Tsuruta feat. Atif Nazir
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-20 00:00:00.000000000 Z
11
+ date: 2018-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler