Merge branch 'master' into 686-account-list-pg

pull/744/head
Andrew Cravenho 6 years ago committed by GitHub
commit f2347a0011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      apps/explorer/priv/repo/migrations/20180919175123_alter_token_decimals_to_bigint.exs
  2. 14
      apps/explorer/test/explorer/chain_test.exs

@ -0,0 +1,15 @@
defmodule Explorer.Repo.Migrations.AlterTokenDecimalsToBigint do
use Ecto.Migration
def up do
alter table("tokens") do
modify(:decimals, :bigint)
end
end
def down do
alter table("tokens") do
modify(:decimals, :smallint)
end
end
end

@ -2643,6 +2643,20 @@ defmodule Explorer.ChainTest do
Chain.update_token(token, update_params)
refute Repo.get_by(Address.Name, address_hash: token.contract_address_hash)
end
test "stores token with big 'decimals' values" do
token = insert(:token, name: nil, symbol: nil, total_supply: nil, decimals: nil, cataloged: false)
update_params = %{
name: "Hodl Token",
symbol: "HT",
total_supply: 10,
decimals: 1_000_000_000_000_000_000,
cataloged: true
}
assert {:ok, updated_token} = Chain.update_token(token, update_params)
end
end
describe "fetch_last_token_balances/1" do

Loading…
Cancel
Save