ci_block_io 1.5.0 → 1.6.0
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/ci_block_io.rb +5 -2
- data/lib/ci_block_io/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6560fed50f1495eba73cfb84738e3b5cdc454ca92336c7bda99046eb3bae01a
|
|
4
|
+
data.tar.gz: 93101230893cc5bf106dbb03b9742d2bd941d370baf3b46bfcde99dd62eb152c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
|
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']
|
data/lib/ci_block_io/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2018-09-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|