increase by 2 decimals

pull/2237/head
Ayrat Badykov 6 years ago
parent 9f3e8eec89
commit eaed589d5d
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 2
      apps/explorer/lib/explorer/chain/supply/rsk.ex
  2. 2
      apps/explorer/test/explorer/chain/supply/rsk_test.exs

@ -15,7 +15,7 @@ defmodule Explorer.Chain.Supply.RSK do
ether =
circulating()
|> Wei.to(:ether)
|> Decimal.div(Decimal.new(1_000))
|> Decimal.div(Decimal.new(100_000))
Decimal.mult(ether, exchange_rate.usd_value)
end

@ -20,7 +20,7 @@ defmodule Explorer.Chain.Supply.RSKTest do
test "calculates market_cap" do
address = insert(:address, hash: @coin_address)
insert(:block, number: 0)
insert(:fetched_balance, value: 10_000_000_000_000_000_000_000, address_hash: address.hash, block_number: 0)
insert(:fetched_balance, value: 1_000_000_000_000_000_000_000_000, address_hash: address.hash, block_number: 0)
exchange_rate = %{Token.null() | usd_value: Decimal.new(10)}

Loading…
Cancel
Save