istox 0.1.43.4 → 0.1.43.5

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: a641abdedffd3d7553282d9271ebb0dfbb1aafca39f4c2d6b3d08509c2766255
4
- data.tar.gz: 3d97c1960502cc8aebe01e59db97f3ccfae248009f33429b33f7ccc5c1aeb052
3
+ metadata.gz: 873652650589e72b87e1075fe0d9d8cd9a45d4200f3dc70a3f3031a9b3b5328c
4
+ data.tar.gz: ca4393b4677f90454ad43b13f2aa024057c85351887bd1520f67bd009d48b0f6
5
5
  SHA512:
6
- metadata.gz: 972165b81ec0ab0a303a568e3a07cb3dc3ecd4a55324662a060892fcea23b5056958cd983caa81cea335577e2c8829d5dde1e9f6a7d7b649be89dd404b619a3b
7
- data.tar.gz: ee44bc96eb41df5c15e6985eec4b48905558c3f2b6054df13448ce8509e842ef666a6b73d29f4a24b1bc1cc37165f1d64ab6e3c8cbd8aa5b26e3fc427773c524
6
+ metadata.gz: 794173dfeaff1cca5d316f348d3666f094fd1ad7513876be10ea7800bea93d3bc57d66310dcb2a0f22cdcaeaaee19a67ac9dc628eee51adb333813dd6360bf3c
7
+ data.tar.gz: b5685a68b187b9dae2eebfca3c9e02b0604c62719715408bc4810ce9f9ac4755662c03f201248e8e885460169a5f586b2a81b6c833881a55b32260c058b4c3da
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.1.43.3)
4
+ istox (0.1.43.4)
5
5
  bunny (>= 2.12.0)
6
6
  graphlient
7
7
  gruf
@@ -4,7 +4,7 @@ module Istox
4
4
  def txn_status_changed(transactions)
5
5
  transactions.each do |transaction|
6
6
 
7
- receipt = ::Istox::BlockchainReceipt.where(txid: transaction[:id]).first
7
+ receipt = ::Istox::BlockchainReceipt.where(txhash: transaction.id).first
8
8
 
9
9
  if receipt.nil?
10
10
  puts 'Transaction not found, skipping...'
@@ -45,7 +45,7 @@ module Istox
45
45
  private
46
46
 
47
47
  def allowed_statuses?(transaction)
48
- return %w[failed confirmed].include?(transaction[:status])
48
+ return %w[failed confirmed].include?(transaction.status)
49
49
  end
50
50
 
51
51
  def get_receipt_list(resource, resource_name)
@@ -79,11 +79,11 @@ module Istox
79
79
  end
80
80
 
81
81
  def failed?(transaction)
82
- transaction[:status] == 'failed' || transaction[:status] == 'reverted'
82
+ transaction.status == 'failed' || transaction.status == 'reverted'
83
83
  end
84
84
 
85
85
  def confirmed?(transaction)
86
- transaction[:status] == 'confirmed'
86
+ transaction.status == 'confirmed'
87
87
  end
88
88
 
89
89
  def update_receipts(receipt_list)
@@ -93,7 +93,8 @@ module Istox
93
93
  end
94
94
 
95
95
  def find_resource(transaction)
96
- receipt = ::Istox::BlockchainReceipt.find_by_txid(transaction[:id])
96
+ receipt = ::Istox::BlockchainReceipt.find_by_txhash(transaction.id)
97
+
97
98
  yield(receipt, receipt.resource_name, receipt.resource_id, receipt.resource_action, receipt.sid)
98
99
  end
99
100
 
@@ -50,7 +50,7 @@ module Istox
50
50
  $channel.ack(delivery_info.delivery_tag) if manual_ack
51
51
  rescue Exception => e
52
52
  Rails.logger.error(e)
53
- channel.nack(delivery_info.delivery_tag, false, true)
53
+ $channel.nack(delivery_info.delivery_tag, false, true)
54
54
  end
55
55
  end
56
56
  end
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = "0.1.43.4"
2
+ VERSION = "0.1.43.5"
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.43.4
4
+ version: 0.1.43.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng