|
|
|
@ -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, |
|
|
|
|