istox 0.1.43.12 → 0.1.44
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d284e11ec21a267732521aa16f60cefc5d7d1efa69cf3b96bed1cc7ced004014
|
4
|
+
data.tar.gz: 236be580fa06fc556dab64853fd8e48dc1b05c988b75d00a535c2be3a077fd37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ad5ad56023548b15ee8172ec7c03982f60d15c74ecc71c616e04a7ed6d46e642306d1761c6f8be2ea099c7be82d3f9d4ffd3b8ad65f9cac4560ffd757177423
|
7
|
+
data.tar.gz: 417cf3903c36b166abce744be293dff76ad32c18293fc508e7c0bf42003e5d3b8f2050706387912d1ff68bfa174a7e9e5e851abf0f5af7c142734992747dd3f5
|
@@ -1,17 +1,18 @@
|
|
1
1
|
module Istox
|
2
2
|
class BlockchainHashHandler
|
3
3
|
class << self
|
4
|
-
def hash_generated(data)
|
5
|
-
|
6
|
-
|
7
|
-
if receipt.nil?
|
8
|
-
puts 'Transaction not found, skipping...'
|
4
|
+
def hash_generated(data, payload_target, target)
|
5
|
+
if payload_target != target
|
6
|
+
puts 'Transaction doesnt belong to this target, skipping...'
|
9
7
|
return
|
10
8
|
end
|
11
|
-
|
9
|
+
|
10
|
+
receipt = ::Istox::BlockchainReceipt.where(txid: data.uuid, txhash: nil).first
|
11
|
+
if receipt.nil?
|
12
|
+
raise 'Unable to find receipt, will retry later.'
|
13
|
+
end
|
12
14
|
receipt.update!(txhash: data.txnHash)
|
13
15
|
end
|
14
|
-
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
@@ -1,15 +1,22 @@
|
|
1
1
|
module Istox
|
2
2
|
class BlockchainStatusHandler
|
3
3
|
class << self
|
4
|
-
def txn_status_changed(transactions)
|
4
|
+
def txn_status_changed(transactions, payload_target, target)
|
5
|
+
if payload_target != target
|
6
|
+
puts 'Transaction doesnt belong to this target, skipping...'
|
7
|
+
return
|
8
|
+
end
|
9
|
+
|
10
|
+
# pre check all transaction does exists
|
5
11
|
transactions.each do |transaction|
|
6
|
-
|
7
12
|
receipt = ::Istox::BlockchainReceipt.where(txhash: transaction.id).first
|
8
|
-
|
9
13
|
if receipt.nil?
|
10
|
-
|
11
|
-
next
|
14
|
+
raise 'Unable to find receipt, will retry later.'
|
12
15
|
end
|
16
|
+
end
|
17
|
+
|
18
|
+
transactions.each do |transaction|
|
19
|
+
receipt = ::Istox::BlockchainReceipt.where(txhash: transaction.id).first
|
13
20
|
|
14
21
|
find_resource(transaction) do |receipt, resource_name, resource_id, resource_action, sid|
|
15
22
|
resource = begin
|
data/lib/istox/version.rb
CHANGED
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.
|
4
|
+
version: 0.1.44
|
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-
|
11
|
+
date: 2019-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|