istox 0.1.60.4 → 0.1.60.5

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: 1f7eac7d7eff3efacf8e0f8187a398b71f2cb09e0333f551032c77b069d8af89
4
- data.tar.gz: c749f17e523317a7558ea4122c0c4b4d881419e3b19a0bb6c84e37d956391536
3
+ metadata.gz: c307c9b81b85cc265c521853ce4bd540e281b45b3f16020e74247d73e32675d9
4
+ data.tar.gz: 0d3ba881da02b940a706b827c36bb49958f7059e7f5f888d3cba9bb290ae5242
5
5
  SHA512:
6
- metadata.gz: 751a870cb1fe0b1b4a4ee68c20a86340dcfb51cd6e8f79bb36e24a7d78d5aa65b213ab3578deeda9bc3e7687a2c5e8e7c113ff380f7951341f9fe2a68e24bae8
7
- data.tar.gz: a750e2371cd02a0d94f8ca00fd8b3f415edc5f16bb057a0a32a1da2f7a60dca6a105463b273ad0bdca87056f1f099b4feaf26e515f5c5c413d8b5ce9af2bbe2d
6
+ metadata.gz: 15df9e5beace3307bacaff3d3a981a8834f0db22901ed77b0d243f41b03f85863d9ccb65cf5da70bc932e95d2aab249126048e67766506c82af1a61d9e4ac28d
7
+ data.tar.gz: 985eda3f477887ef3ae7e8c5420b12c77df3e872223657f9d3934de5514895b845d1bf2969e9e61f862a14e36087c08b2e959617ffb8bd7169b7f63804997422
@@ -6,7 +6,7 @@ module Istox
6
6
  found_txns = transactions.map do |transaction|
7
7
  receipt = ::Istox::BlockchainReceipt.where(txid: transaction.uuid).first
8
8
  if !receipt.blank?
9
- handling_receipt = ::Istox::BlockchainReceipt.where(txhash: transaction.id).first
9
+ handling_receipt = ::Istox::BlockchainReceipt.where(txhash: transaction.id, txid: transaction.uuid).first
10
10
  raise 'Unable to find receipt' if handling_receipt.blank?
11
11
  transaction
12
12
  else
@@ -16,7 +16,7 @@ module Istox
16
16
  end.compact
17
17
 
18
18
  found_txns.each do |transaction|
19
- receipt = ::Istox::BlockchainReceipt.where(txhash: transaction.id).first
19
+ receipt = ::Istox::BlockchainReceipt.where(txhash: transaction.id, txid: transaction.uuid).first
20
20
 
21
21
  next if !(%w[failed confirmed pending].include?(transaction.status))
22
22
  receipt.update!(status: transaction.status)
@@ -13,9 +13,11 @@ module Istox
13
13
  klass = ::Istox::BlockchainReceiptService.blockchain_receipt_class
14
14
  uuid = SecureRandom.uuid
15
15
 
16
- klass.create!({
17
- txid: uuid
18
- })
16
+ ActiveRecord::Base.transaction do
17
+ klass.create!({
18
+ txid: uuid
19
+ })
20
+ end
19
21
 
20
22
  uuid
21
23
  end
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = "0.1.60.4"
2
+ VERSION = "0.1.60.5"
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.60.4
4
+ version: 0.1.60.5
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-07-09 00:00:00.000000000 Z
11
+ date: 2019-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny