RecordsKeeperRubyLib 0.2.0 → 0.3.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/Gemfile.lock +1 -1
- data/lib/RecordsKeeperRubyLib/assets.rb +8 -3
- data/lib/RecordsKeeperRubyLib/transaction.rb +5 -0
- data/lib/RecordsKeeperRubyLib/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: d54ade47103d4e10a794850a9538281345fe4f52d981b04532b5db24fcf60b8c
|
|
4
|
+
data.tar.gz: c25fd4bde17d3ea3a99606a55537d72629f5d6c60b0d622d5413fd76892b87fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e0f0c1920a06c1527e0706a86df22ffd8abffb3015955468b20c8274e8f0ab6fff878d99c563c1e0815d094da40eb23c7507276cbf33473ef8542c46b21ddb4b
|
|
7
|
+
data.tar.gz: 3f3ce0846ca1bdbe26b81808e68a66859c84130a130da945776e3248cb4a2a6fb9a92a91b53b589594453ce5451a78fa7961d428dd87d8fc21b1bcd14797130b
|
data/Gemfile.lock
CHANGED
|
@@ -38,7 +38,7 @@ module RecordsKeeperRubyLib
|
|
|
38
38
|
out = response.parsed_response
|
|
39
39
|
check = out[0]['result']
|
|
40
40
|
if check == nil
|
|
41
|
-
txid =
|
|
41
|
+
txid = out[0]['error']['message']
|
|
42
42
|
else
|
|
43
43
|
txid = out[0]['result']
|
|
44
44
|
end
|
|
@@ -64,7 +64,7 @@ module RecordsKeeperRubyLib
|
|
|
64
64
|
issue_id.push(out[0]['result'][i]['issuetxid']) # Returns issue id
|
|
65
65
|
issue_qty.push(out[0]['result'][i]['issueraw']) # Returns issue quantity
|
|
66
66
|
end
|
|
67
|
-
retrieve = {:
|
|
67
|
+
retrieve = {:asset_name => asset_name,:issue_id => issue_id,:issue_qty => issue_qty,:asset_count => asset_count}
|
|
68
68
|
retrievedinfo = JSON.generate retrieve
|
|
69
69
|
return retrievedinfo
|
|
70
70
|
end
|
|
@@ -79,9 +79,14 @@ module RecordsKeeperRubyLib
|
|
|
79
79
|
}
|
|
80
80
|
response = HTTParty.get(@url, options)
|
|
81
81
|
out = response.parsed_response
|
|
82
|
-
|
|
82
|
+
if out[0]['result'].nil?
|
|
83
|
+
txid = out[0]['error']['message']
|
|
84
|
+
else
|
|
85
|
+
txid = out[0]['result']
|
|
86
|
+
end
|
|
83
87
|
return txid; # Variable to store send asset transaction id
|
|
84
88
|
end
|
|
85
89
|
|
|
86
90
|
end
|
|
91
|
+
|
|
87
92
|
end
|
|
@@ -73,7 +73,11 @@ module RecordsKeeperRubyLib
|
|
|
73
73
|
}
|
|
74
74
|
response = HTTParty.get(@url, options)
|
|
75
75
|
out = response.parsed_response
|
|
76
|
+
if out[0]['result']['complete']
|
|
76
77
|
signedHex = out[0]['result']['hex']
|
|
78
|
+
else
|
|
79
|
+
signedHex = "Transaction has not been signed."
|
|
80
|
+
end
|
|
77
81
|
return signedHex;
|
|
78
82
|
end
|
|
79
83
|
|
|
@@ -172,6 +176,7 @@ module RecordsKeeperRubyLib
|
|
|
172
176
|
fees = balance_amount.abs - sent_amount
|
|
173
177
|
return fees; #returns fees
|
|
174
178
|
end
|
|
179
|
+
|
|
175
180
|
|
|
176
181
|
end
|
|
177
182
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: RecordsKeeperRubyLib
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yusra Qureshi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-06-
|
|
11
|
+
date: 2018-06-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|