istox 0.1.69 → 0.1.70

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: c0a1605ce516af6a72a8b8a38b874c5439e0105275ea4ed45eba776e39a6f7b9
4
- data.tar.gz: 76152def28c709a7f791f6014805675309c8db0430ae88d65eca4bf61a1989d2
3
+ metadata.gz: 89b3db415a5272d141d30a598022f9e6158fef4ed9b487d673a603f3c8791a01
4
+ data.tar.gz: 1a9af111874d3be165e6e26d723a7be408167abcaa31b2c847d83e84c9dea2a6
5
5
  SHA512:
6
- metadata.gz: ea5fa4fdc59c63dc41e499dc4881a59b3a16f1ce32b579e8d8d27131311f4b83c657064bf4d8a455375ccf26535aa11b4d921bd8aafc9076b05bb26744fd0378
7
- data.tar.gz: 1865756b7146558a7b70f9979edaa9c38ba757ffa678a80b72371fc40aea325e761281d479e38f9c4126e7dbe7a1f8db9c227f3aa6404c74b3d95f23e239f204
6
+ metadata.gz: f3f5901e1d8e8d9a4bce640c37cf4a1266648a9cd2f59c10a3904ec1cb36687a925915e37e22e623cd6e97b335697ed1939d7822e69facce3458c619a772d249
7
+ data.tar.gz: 0561fad0e9f67602cc9a6bee7e884bb3a81473c0f9f39c9b2d362b7e4696cb0257d7182d32e34ae2b1bb4ecaf8df051b2b17a1c9652d98d8ed920f5fcc57927b
@@ -2,19 +2,17 @@ module Istox
2
2
  class BlockchainHashHandler
3
3
  class << self
4
4
  def hash_generated(data, payload_target)
5
- ActiveRecord::Base.transaction do
6
- receipt = ::Istox::BlockchainReceipt.where(txid: data.uuid).first
7
- if receipt.nil?
8
- puts 'Transaction doesnt belong here, skipping...'
9
- return
10
- end
11
-
12
- # sid cannot be nil
13
- update_receipt = ::Istox::BlockchainReceipt.where(txid: data.uuid, txhash: nil).where.not(sid: nil).first
14
- raise "Unable to find receipt to update" if update_receipt.blank?
5
+ receipt = ::Istox::BlockchainReceipt.where(txid: data.uuid).first
6
+ if receipt.nil?
7
+ puts 'Transaction doesnt belong here, skipping...'
8
+ return
9
+ end
15
10
 
16
- update_receipt.update!(txhash: data.txnHash)
17
- end
11
+ # sid cannot be nil
12
+ update_receipt = ::Istox::BlockchainReceipt.where(txid: data.uuid, txhash: nil).where.not(sid: nil).first
13
+ raise "Unable to find receipt to update" if update_receipt.blank?
14
+
15
+ update_receipt.update!(txhash: data.txnHash)
18
16
  end
19
17
  end
20
18
  end
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = "0.1.69"
2
+ VERSION = "0.1.70"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.69
4
+ version: 0.1.70
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-15 00:00:00.000000000 Z
11
+ date: 2019-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny