add CHANGELOG entry

pull/2825/head
Ayrat Badykov 5 years ago
parent 1667bdef0c
commit 6f5ba5577e
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 1
      CHANGELOG.md
  2. 41
      apps/block_scout_web/test/block_scout_web/features/viewing_addresses_test.exs
  3. 50
      apps/explorer/test/explorer/chain_test.exs

@ -1,6 +1,7 @@
## Current
### Features
- [#2825](https://github.com/poanetwork/blockscout/pull/2825) - separate token transfers and transactions
- [#2787](https://github.com/poanetwork/blockscout/pull/2787) - async fetching of address counters
- [#2791](https://github.com/poanetwork/blockscout/pull/2791) - add ipc client
- [#2449](https://github.com/poanetwork/blockscout/pull/2449) - add ability to send notification events through postgres notify

@ -295,47 +295,6 @@ defmodule BlockScoutWeb.ViewingAddressesTest do
|> refute_has(AddressPage.token_transfers_expansion(transaction))
end
test "contributor can see only token transfers related to him", %{
addresses: addresses,
block: block,
session: session
} do
lincoln = addresses.lincoln
taft = addresses.taft
morty = build(:address)
contract_address = insert(:contract_address)
insert(:token, contract_address: contract_address)
transaction =
:transaction
|> insert(from_address: lincoln, to_address: contract_address)
|> with_block(block)
insert(
:token_transfer,
from_address: lincoln,
to_address: taft,
transaction: transaction,
token_contract_address: contract_address
)
insert(
:token_transfer,
from_address: lincoln,
to_address: morty,
transaction: transaction,
token_contract_address: contract_address
)
session
|> AddressPage.visit_page(morty)
|> assert_has(AddressPage.token_transfers(transaction, count: 1))
|> assert_has(AddressPage.token_transfer(transaction, lincoln, count: 1))
|> assert_has(AddressPage.token_transfer(transaction, morty, count: 1))
|> refute_has(AddressPage.token_transfer(transaction, taft, count: 1))
end
test "transaction with multiple token transfers shows all transfers if expanded", %{
addresses: addresses,
block: block,

@ -529,56 +529,6 @@ defmodule Explorer.ChainTest do
assert Enum.count(transaction.token_transfers) == 2
end
test "returns all transactions that the address is present only in the token transfers" do
john = insert(:address)
paul = insert(:address)
contract_address = insert(:contract_address)
transaction_one =
:transaction
|> insert(
from_address: john,
from_address_hash: john.hash,
to_address: contract_address,
to_address_hash: contract_address.hash
)
|> with_block()
insert(
:token_transfer,
from_address: john,
to_address: paul,
transaction: transaction_one,
amount: 1
)
transaction_two =
:transaction
|> insert(
from_address: john,
from_address_hash: john.hash,
to_address: contract_address,
to_address_hash: contract_address.hash
)
|> with_block()
insert(
:token_transfer,
from_address: john,
to_address: paul,
transaction: transaction_two,
amount: 1
)
transactions_hashes =
paul.hash
|> Chain.address_to_transactions_with_rewards()
|> Enum.map(& &1.hash)
assert Enum.member?(transactions_hashes, transaction_one.hash) == true
assert Enum.member?(transactions_hashes, transaction_two.hash) == true
end
test "with transactions can be paginated" do
%Address{hash: address_hash} = address = insert(:address)

Loading…
Cancel
Save