cns 0.7.1 → 0.7.2

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: 61b5bd4279e22a5bc61efb12f3717d805aaefa15d46b4f98ef45a05c052b701e
4
- data.tar.gz: 34984d55f0b46e72097d5a589b0f3d2700dd89fc8877ba0c2e38ad55c553fed8
3
+ metadata.gz: 9208eaf9e93ff01484a8988ad5669629757bf3ec8426eb35439a1995b2488699
4
+ data.tar.gz: 2a07c79aaa1fa9794d404ebe2afbf061d49e05601975606b5d8223c82f76d333
5
5
  SHA512:
6
- metadata.gz: 524fc4c7bd9170238499712ab47c7f994f350421955e6e85af4ba1695992825f491ed201bcc8c9942df3f9aa9c2eb65ab0b50d8156e932239db1ff59ee57117f
7
- data.tar.gz: 836882fa7b8e372b62d3399004bd97993cedd74fd7fe8da423ee95b1493de28053beed1ea9405b4382c537ad6950c079ebd974b048f3130ecd8e1453d2fd23b0
6
+ metadata.gz: a652a47ef2d67b81f06d2f633b34b9712991283453eedc4efeeed6f5793f8da8cbdb8d035585c646af661d72747a58bb7f8e5165adf4d1b71503092fe2bb4629
7
+ data.tar.gz: 2177a9854f2af6e2852b42eddcd7df9450c06b94bd355fc3ef44cda77f571ce7f26b0a03c49aef0fca4c7a6d7bc0b6d8f6242f05825989cf0c2e85e3119be13f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cns (0.7.1)
4
+ cns (0.7.2)
5
5
  curb
6
6
  faraday
7
7
  google-cloud-bigquery
data/lib/cns/etherscan.rb CHANGED
@@ -183,7 +183,7 @@ module Cns
183
183
  def mostra_resumo_simples
184
184
  return unless dados.count.positive?
185
185
 
186
- puts("\nid address etherscan bigquery")
186
+ puts("\nid address etherscan bigquery")
187
187
  dados.each { |obj| puts(formata_carteira_simples(obj)) }
188
188
  mostra_transacao_norml
189
189
  mostra_transacao_inter
@@ -230,8 +230,11 @@ module Cns
230
230
  # @param (see formata_carteira)
231
231
  # @return [String] texto formatado valores duma carteira
232
232
  def formata_valores_simples(hjn)
233
+ #id address etherscan bigquery
234
+ #me-app 0x27c7f54e48956a906af2cbfbc8684b437776403d 22.377364 22.377364 OK
235
+ #mm-hot 0x534029b6371dc4453dd750bc1198181f55c859fe 4.556609 4.556609 OK
233
236
  format(
234
- '%<v1>11.4f %<v2>11.4f %<ok>-3s',
237
+ '%<v1>13.6f %<v2>13.6f %<ok>-3s',
235
238
  v1: hjn[:es],
236
239
  v2: hjn[:bs],
237
240
  ok: ok?(hjn) ? 'OK' : 'NOK'
@@ -241,6 +244,9 @@ module Cns
241
244
  # @param (see formata_carteira)
242
245
  # @return [String] texto formatado valores duma carteira
243
246
  def formata_valores(hjn)
247
+ #id address etherscan tn ti tb tk tw bigquery tn ti tb tk tw
248
+ #me-app 0x27c..b43 22.3774 31 6 0 16 2190 22.3774 25 6 0 16 2190 OK
249
+ #mm-hot 0x534..81f 4.5566 182 18 74 7 51 4.5566 33 18 74 6 51 OK
244
250
  format(
245
251
  '%<v1>11.4f %<n1>3i %<n2>2i %<n3>2i %<n4>2i %<w1>4i %<v2>11.4f %<n5>3i %<n6>2i %<n7>2i %<n8>2i %<w2>4i %<ok>-3s',
246
252
  v1: hjn[:es],
@@ -261,7 +267,7 @@ module Cns
261
267
 
262
268
  # @return [Boolean] carteira tem transacoes novas(sim=NOK, nao=OK)?
263
269
  def ok?(hjn)
264
- hjn[:es].round(4) == hjn[:bs].round(4) && hjn[:bi].count == hjn[:ei].count && hjn[:bp].count == hjn[:ep].count && hjn[:bw].count == hjn[:ew].count
270
+ hjn[:es].round(6) == hjn[:bs].round(6) && hjn[:bi].count == hjn[:ei].count && hjn[:bp].count == hjn[:ep].count && hjn[:bw].count == hjn[:ew].count
265
271
  end
266
272
 
267
273
  # @example ether address inicio..fim
data/lib/cns/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cns
4
- VERSION = '0.7.1'
4
+ VERSION = '0.7.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hernâni Rodrigues Vaz