Merge pull request #987 from poanetwork/frg-remove-unnecessary-fetch-from-token-balance

Do not store token_hash as address_hash in token balances
pull/990/head
Felipe Renan 6 years ago committed by GitHub
commit ef35c9b320
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      apps/indexer/lib/indexer/address/token_balances.ex
  2. 2
      apps/indexer/test/indexer/address/token_balances_test.exs

@ -30,11 +30,6 @@ defmodule Indexer.Address.TokenBalances do
token_contract_address_hash: token_contract_address_hash,
block_number: block_number
})
|> MapSet.put(%{
address_hash: token_contract_address_hash,
token_contract_address_hash: token_contract_address_hash,
block_number: block_number
})
end)
end

@ -29,7 +29,7 @@ defmodule Indexer.Address.TokenBalancesTest do
params_set = TokenBalances.params_set(%{token_transfers_params: [token_transfer_params]})
assert MapSet.size(params_set) == 3
assert MapSet.size(params_set) == 2
assert %{address_hash: from_address_hash, block_number: block_number}
assert %{address_hash: to_address_hash, block_number: block_number}
assert %{address_hash: token_contract_address_hash, block_number: block_number}

Loading…
Cancel
Save