istox 0.1.42.12 → 0.1.42.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52e830eb70d5949ee02ff0825cb0f9ec30ad498a54d126e33249537e27f06daf
4
- data.tar.gz: 6109d2755687a50b6160ed6699b7eee5e477eb1f3b73298dee14b89556eee221
3
+ metadata.gz: 84a3351f5113b9ebe9841ba2f7d967a126a72b14d216867a065a2b09d7c502a6
4
+ data.tar.gz: 82fc0f108d6e11c4ac9ac4f80669c0e3702b17bef640708c2698a8f0c27751ab
5
5
  SHA512:
6
- metadata.gz: 87b922a1c395fe1ea2bb3df20b181a25e7c1f36e733d4845589846566bf2f633cc54c5ae59918366f8617f23c10ce8894bc3d28baa60d1acf9a9eed42fc4fc74
7
- data.tar.gz: 83c88cc0912327937135583ec462b61fedede8870069d87354ed60ca706bc7f36ccf3ee4c332a9e4c1d821a0de46c3d80c08b40e84b90f05cffbeabdafbcb6c8
6
+ metadata.gz: cb1ca522bcffc7cccb91da0d230baf4b03ba383c99f5ff672bdd657fccfb669263077de95dd68595e5c3b84f8081904db01eea8bc68061cc205f016d5738a5d0
7
+ data.tar.gz: 279f34fc4eb6a9d43b54f72d24436578fedcbef08456fbf3e89641fa766fa965db0963427bbc462f40c0712edd259c57b25649dda559258a29db2206ada6afe4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.1.42.11)
4
+ istox (0.1.42.12)
5
5
  bunny (>= 2.12.0)
6
6
  graphlient
7
7
  gruf
@@ -42,7 +42,7 @@ module Istox
42
42
  private
43
43
 
44
44
  def allowed_statuses?(transaction)
45
- return %w[failed confirmed reverted].include?(transaction[:status])
45
+ return %w[failed confirmed].include?(transaction[:status])
46
46
  end
47
47
 
48
48
  def get_receipt_list(resource, resource_name)
@@ -18,14 +18,6 @@ module Istox
18
18
  result = client.query(query, variables)
19
19
  end
20
20
 
21
- # def parse(host_type, query)
22
- # client = @@hosts[host_type]
23
-
24
- # raise "Please make sure you have initialised graphql cient for host #{host_type}" if !client
25
-
26
- # return client.parse(query)
27
- # end
28
-
29
21
  private
30
22
 
31
23
  def init_host(host_type, url)
@@ -1,19 +1,7 @@
1
1
  module Istox
2
2
  module BlockchainReceiptQuery
3
3
  extend ActiveSupport::Concern
4
-
5
- # BLOCK_TRANSACTIONS_QUERY = Istox::GraphqlClient.parse("chainhub",
6
- # <<-'GRAPHQL'
7
- # query($ids: [String!]) {
8
- # blockTransactions(hashes: $ids) {
9
- # txid
10
- # state
11
- # }
12
- # }
13
- # GRAPHQL
14
- # )
15
- BLOCK_TRANSACTIONS_QUERY = 123
16
-
4
+
17
5
  #overrideable, when blockchain transaction has confirmed
18
6
  def handle_confirm(resource_action)
19
7
  self
@@ -65,7 +53,15 @@ module Istox
65
53
  end
66
54
 
67
55
  def get_block_transactions(txids)
68
- Istox::GraphqlClient.query("chainhub", BLOCK_TRANSACTIONS_QUERY, { ids: txids }).data.block_transactions
56
+ query = <<-'GRAPHQL'
57
+ query($ids: [String!]!) {
58
+ blockTransactions(hashes: $ids) {
59
+ txid
60
+ }
61
+ }
62
+ GRAPHQL
63
+
64
+ Istox::GraphqlClient.query("chainhub", query, { ids: txids }).data.block_transactions
69
65
  end
70
66
 
71
67
  end
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = "0.1.42.12"
2
+ VERSION = "0.1.42.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.42.12
4
+ version: 0.1.42.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng