paxful_engine-rails 0.9.0 → 0.9.1

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: d2d1a02a0cb8692da174f85cc87d3ce606f053ea601db8639871a9c9fcdaa303
4
- data.tar.gz: 45ca9095d7a1e3d7c3ffb049a8c6724b83efb58b6c7e4f4f2a98606277dfaea9
3
+ metadata.gz: 6bf1b3bb282e90310c4c06163a3d0b0fbd7362b08608490811271abf7f7e89f8
4
+ data.tar.gz: 68d2cb65f3051c6fefa6c5c209fca6d826b695886ef4663d204fca4a3b3df376
5
5
  SHA512:
6
- metadata.gz: b4ec07d8f1120d59d4586240bca493b93adf3da56a83501a7c3e62f5d6c3986d52e8ecd650a4a4bf647fc38102796777cdf99716e75e5138a952abb77e70509b
7
- data.tar.gz: d9615d1975e2f2d02985f65421ecfe3d057e4368b84c006657cd7a44f6d750470e583b1b437b741f40a4436438ce4c70ef222d22e5f5a926b5afe6b6a1d99abc
6
+ metadata.gz: a5b79681193267cc5b095b7b26249d11aa2fc4c36ae67c77d88c9d8d9ad5f2c4986c4f5ee10c83af54b113da4efb1d7240b11b198f070f93af2b5eae4cb03759
7
+ data.tar.gz: 83e3ac9112667ead30807ed1d16a12d503517f8f29fd6a58671849e9b90b30fac47b142cc649611fb6987e2a5cb5c0f9fdf52248f115c94e303ea0bcfb0331db
@@ -6,5 +6,10 @@ module PaxfulEngine
6
6
  status == "successful" ? "text-success" : "text-danger"
7
7
  end
8
8
 
9
+ def format_datetime(datetime, timezone = "Asia/Manila")
10
+ return "-" if datetime.nil?
11
+ datetime.in_time_zone(timezone).strftime("%m/%d/%Y %I:%M%p")
12
+ end
13
+
9
14
  end
10
15
  end
@@ -32,7 +32,7 @@
32
32
 
33
33
  <% @trades.each do |trade| %>
34
34
  <tr scope="row">
35
- <td> <%= trade.completed_at&.strftime("%m/%d/%Y %I:%M%p") || "-" %> </td>
35
+ <td> <%= format_datetime(trade.completed_at) %> </td>
36
36
  <td> <%= trade.trade_hash %> </td>
37
37
  <td> <%= number_to_currency(trade.fiat_amount_requested, unit: "#{trade.fiat_currency_code} ") %> </td>
38
38
  <td> <%= trade.crypto_currency_code %> <%= trade.base_crypto_requested %> </td>
@@ -28,9 +28,18 @@
28
28
  <hr />
29
29
 
30
30
  <div>
31
- <div> <strong>Started at:</strong> <%= @trade.started_at.strftime("%m/%d/%Y %I:%M%p") %> </div>
32
- <div> <strong>Ended at:</strong> <%= @trade.ended_at.strftime("%m/%d/%Y %I:%M%p") %> </div>
33
- <div> <strong>Completed at:</strong> <%= @trade.completed_at&.strftime("%m/%d/%Y %I:%M%p") %> </div>
31
+ <div>
32
+ <strong>Started at:</strong>
33
+ <%= format_datetime(@trade.started_at) %>
34
+ </div>
35
+ <div>
36
+ <strong>Ended at:</strong>
37
+ <%= format_datetime(@trade.ended_at) %>
38
+ </div>
39
+ <div>
40
+ <strong>Completed at:</strong>
41
+ <%= format_datetime(@trade.completed_at) %>
42
+ </div>
34
43
  </div>
35
44
 
36
45
  <hr />
@@ -1,3 +1,3 @@
1
1
  module PaxfulEngine
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paxful_engine-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Chavez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-11 00:00:00.000000000 Z
11
+ date: 2020-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_config