istox 0.1.84 → 0.1.85.pre.test1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dcd810577ffd0c7b57c7727b3f1eff90af5adf4d51f6a7a5e7b6579b05dded9
|
4
|
+
data.tar.gz: c7687fc0a5d2598cf353c843b8b5801299bf3c792465764963158f3af2f5b9d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9790119d241a18a535aff32c2102fae262e4ac694b55652c9aef41be53932639af17188fd835638e5b76a4e92e5ab9bfb87caa49d0e5b4fb1e131771f64d12e8
|
7
|
+
data.tar.gz: 589078155df41802b63561f887c3e8ad1742243afb659069e91e50ab138f433a7d4ae9b6ea336b49ea8aa22207d2299b5b7f6439931bf906869de7b12fd36c4b
|
data/Gemfile.lock
CHANGED
data/lib/istox.rb
CHANGED
@@ -28,8 +28,8 @@ module Istox
|
|
28
28
|
require 'istox/models/blockchain_receipt'
|
29
29
|
require 'istox/models/concerns/blockchain_receipt_query'
|
30
30
|
require 'istox/consumers/blockchain_status_handler'
|
31
|
-
require 'istox/
|
31
|
+
require 'istox/inherited_migrations/create_blockchain_receipts'
|
32
32
|
require 'istox/logging/hash_logging'
|
33
33
|
require 'istox/logging/log_formatter'
|
34
|
-
require
|
34
|
+
require 'istox/quant/bond'
|
35
35
|
end
|
@@ -30,6 +30,8 @@ module Istox
|
|
30
30
|
resource_action: action
|
31
31
|
)
|
32
32
|
|
33
|
+
chainhub_processing = true
|
34
|
+
|
33
35
|
::ActiveRecord::Base.transaction do
|
34
36
|
# execute before proc, and get the model that blockchain receipt should bind to
|
35
37
|
model = before.call(uuid)
|
@@ -41,8 +43,20 @@ module Istox
|
|
41
43
|
@receipt.update!(resource_id: model.id, resource_name: model.class.name)
|
42
44
|
|
43
45
|
# execute the actual call to chainhub
|
44
|
-
execute.call(uuid)
|
46
|
+
result = execute.call(uuid)
|
47
|
+
|
48
|
+
# no need to create a receipt if txn count is zero
|
49
|
+
if result.respond_to?('txn_count')
|
50
|
+
count = result.send('txn_count')
|
51
|
+
|
52
|
+
if count.to_i <= 0
|
53
|
+
@receipt&.destroy!
|
54
|
+
chainhub_processing = false
|
55
|
+
end
|
56
|
+
end
|
45
57
|
end
|
58
|
+
|
59
|
+
chainhub_processing
|
46
60
|
rescue StandardError => e
|
47
61
|
@receipt&.destroy
|
48
62
|
raise e
|
File without changes
|
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.85.pre.test1
|
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-09-
|
11
|
+
date: 2019-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -302,10 +302,10 @@ files:
|
|
302
302
|
- lib/istox/helpers/order_book.rb
|
303
303
|
- lib/istox/helpers/publisher.rb
|
304
304
|
- lib/istox/helpers/vault.rb
|
305
|
+
- lib/istox/inherited_migrations/create_blockchain_receipts.rb
|
305
306
|
- lib/istox/interfaces/chainhub/transaction.rb
|
306
307
|
- lib/istox/logging/hash_logging.rb
|
307
308
|
- lib/istox/logging/log_formatter.rb
|
308
|
-
- lib/istox/migrations/create_blockchain_receipts.rb
|
309
309
|
- lib/istox/models/blockchain_receipt.rb
|
310
310
|
- lib/istox/models/concerns/blockchain_receipt_query.rb
|
311
311
|
- lib/istox/quant/bond.rb
|
@@ -324,9 +324,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
324
324
|
version: '0'
|
325
325
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
326
326
|
requirements:
|
327
|
-
- - "
|
327
|
+
- - ">"
|
328
328
|
- !ruby/object:Gem::Version
|
329
|
-
version:
|
329
|
+
version: 1.3.1
|
330
330
|
requirements: []
|
331
331
|
rubygems_version: 3.0.6
|
332
332
|
signing_key:
|