paxful_engine-rails 0.8.1 → 0.9.0

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: dfbab6d68b7693a8c295309e0823548df1c26288ad50b838d482629cc9f63ce6
4
- data.tar.gz: 25f5ef6962c35d9f13427118cf7c3b2b4dfad29e1a461ff442f3d9f0a693df15
3
+ metadata.gz: d2d1a02a0cb8692da174f85cc87d3ce606f053ea601db8639871a9c9fcdaa303
4
+ data.tar.gz: 45ca9095d7a1e3d7c3ffb049a8c6724b83efb58b6c7e4f4f2a98606277dfaea9
5
5
  SHA512:
6
- metadata.gz: 9f1ff5f0642c1da4d7106158bc26cc22ba4177f2f06ced7eb99456fcc9fe2f195aa21fe1e730fdb6020b8e6136be9c147b262d63920c18c5b0724bcc38b3179e
7
- data.tar.gz: d4468bc1f0af6c3ea7d94d5e8976fbbf7b4e94f471e9df9a4dd0436fb2a4a7853524dcbd144bd2ec058f29977c133a273d8e74f94922f8382d4c29cfc846c40a
6
+ metadata.gz: b4ec07d8f1120d59d4586240bca493b93adf3da56a83501a7c3e62f5d6c3986d52e8ecd650a4a4bf647fc38102796777cdf99716e75e5138a952abb77e70509b
7
+ data.tar.gz: d9615d1975e2f2d02985f65421ecfe3d057e4368b84c006657cd7a44f6d750470e583b1b437b741f40a4436438ce4c70ef222d22e5f5a926b5afe6b6a1d99abc
@@ -29,5 +29,9 @@ module PaxfulEngine
29
29
  offer_type.downcase == "sell"
30
30
  end
31
31
 
32
+ def base_crypto_requested
33
+ BigDecimal(crypto_amount_requested) / 100_000_000
34
+ end
35
+
32
36
  end
33
37
  end
@@ -14,13 +14,12 @@
14
14
  <table class="table table-striped table-bordered">
15
15
  <thead>
16
16
  <tr>
17
- <th scope="col">Created</th>
18
- <th scope="col">Completed</th>
17
+ <th scope="col">Completed Date</th>
19
18
  <th scope="col">Trade hash</th>
19
+ <th scope="col">Fiat</th>
20
+ <th scope="col">Crypto</th>
20
21
  <th scope="col">Type</th>
21
22
  <th scope="col">Status</th>
22
- <th scope="col">Seller</th>
23
- <th scope="col">Buyer</th>
24
23
  <th scope="col"></th>
25
24
  </tr>
26
25
  </thead>
@@ -33,15 +32,14 @@
33
32
 
34
33
  <% @trades.each do |trade| %>
35
34
  <tr scope="row">
36
- <td> <%= trade.created_at.strftime("%m/%d/%Y %I:%M%p") %> </td>
37
35
  <td> <%= trade.completed_at&.strftime("%m/%d/%Y %I:%M%p") || "-" %> </td>
38
36
  <td> <%= trade.trade_hash %> </td>
37
+ <td> <%= number_to_currency(trade.fiat_amount_requested, unit: "#{trade.fiat_currency_code} ") %> </td>
38
+ <td> <%= trade.crypto_currency_code %> <%= trade.base_crypto_requested %> </td>
39
39
  <td> <%= trade.offer_type.upcase %> </td>
40
40
  <td>
41
41
  <span class="<%= highlight_status(trade) %>"> <%= trade.status.upcase %> </span>
42
42
  </td>
43
- <td> <%= trade.seller %> </td>
44
- <td> <%= trade.buyer %> </td>
45
43
  <td> <%= link_to "Check trade details", paxful_engine.trade_path(trade) %> </td>
46
44
  </tr>
47
45
  <% end %>
@@ -20,8 +20,8 @@
20
20
  </div>
21
21
  <div>
22
22
  <strong>Crypto Requested:</strong>
23
- <%= number_to_currency(@trade.crypto_amount_requested, unit: "#{@trade.crypto_currency_code} ") %>
24
- (in sats)
23
+ <%= @trade.crypto_currency_code %> <%= @trade.base_crypto_requested %>
24
+ (<%= number_to_currency(@trade.crypto_amount_requested, unit: "") %> in sats)
25
25
  </div>
26
26
  </div>
27
27
 
@@ -1,3 +1,3 @@
1
1
  module PaxfulEngine
2
- VERSION = '0.8.1'
2
+ VERSION = '0.9.0'
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.8.1
4
+ version: 0.9.0
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-10 00:00:00.000000000 Z
11
+ date: 2020-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_config