From eaed589d5d5971dca21a871dde37c68b46da3930 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Thu, 27 Jun 2019 12:36:06 +0300 Subject: [PATCH] increase by 2 decimals --- apps/explorer/lib/explorer/chain/supply/rsk.ex | 2 +- apps/explorer/test/explorer/chain/supply/rsk_test.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/explorer/lib/explorer/chain/supply/rsk.ex b/apps/explorer/lib/explorer/chain/supply/rsk.ex index 365eaf3685..6cefb9814f 100644 --- a/apps/explorer/lib/explorer/chain/supply/rsk.ex +++ b/apps/explorer/lib/explorer/chain/supply/rsk.ex @@ -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 diff --git a/apps/explorer/test/explorer/chain/supply/rsk_test.exs b/apps/explorer/test/explorer/chain/supply/rsk_test.exs index b8a1e7f705..b3b87b7d49 100644 --- a/apps/explorer/test/explorer/chain/supply/rsk_test.exs +++ b/apps/explorer/test/explorer/chain/supply/rsk_test.exs @@ -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)}