RecordsKeeperRubyLib 0.2.0 → 0.3.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: 111feaaa57157ea2426943932aeb13e49488838f9854f041b487482462f73470
4
- data.tar.gz: 566e3a1fda8d5566c502e881b328e77e0e068ee01090424f85651f44d3ad4d7a
3
+ metadata.gz: d54ade47103d4e10a794850a9538281345fe4f52d981b04532b5db24fcf60b8c
4
+ data.tar.gz: c25fd4bde17d3ea3a99606a55537d72629f5d6c60b0d622d5413fd76892b87fb
5
5
  SHA512:
6
- metadata.gz: bb61b66e17ff9abdedf79d6d0471b01b9c5b07b4f49f8cb15b3c9581d6872b8ee778988cea2f0f080d43ecd20fa935521fb2c62c3616d896931084d2ba24eb6c
7
- data.tar.gz: 9271bc6cf4291d1664fbaa02f151585121e145589677cb79e7f7787a9f732d919f395f79b34c260dcf6be02ef2d42eb95e413ad79cf8dcfcfa1650b16b8cc485
6
+ metadata.gz: e0f0c1920a06c1527e0706a86df22ffd8abffb3015955468b20c8274e8f0ab6fff878d99c563c1e0815d094da40eb23c7507276cbf33473ef8542c46b21ddb4b
7
+ data.tar.gz: 3f3ce0846ca1bdbe26b81808e68a66859c84130a130da945776e3248cb4a2a6fb9a92a91b53b589594453ce5451a78fa7961d428dd87d8fc21b1bcd14797130b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RecordsKeeperRubyLib (0.2.0)
4
+ RecordsKeeperRubyLib (0.3.0)
5
5
  binary_parser (~> 1.3.0)
6
6
  hex_string (~> 1.0.1)
7
7
  httparty (~> 0.16.2)
@@ -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 = "Asset or stream with this name already exists"
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 = {:assert_name => assert_name,:issue_id => issue_id,:issue_qty => issue_qty,:asset_count => asset_count}
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
- txid = out[0]['result']
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
 
@@ -1,3 +1,3 @@
1
1
  module RecordsKeeperRubyLib
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.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-27 00:00:00.000000000 Z
11
+ date: 2018-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler