Skip to content

Commit

Permalink
apply review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-fleming committed Feb 28, 2024
1 parent 8891dd6 commit 9907a21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 2 additions & 4 deletions src/tests/presets/test_erc20.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,7 @@ fn assert_event_approval(
contract: ContractAddress, owner: ContractAddress, spender: ContractAddress, value: u256
) {
let event = utils::pop_log::<ERC20Component::Event>(contract).unwrap();
let expected = ERC20Component::Event::Approval(
Approval { owner: owner, spender: spender, value: value }
);
let expected = ERC20Component::Event::Approval(Approval { owner, spender, value });
assert!(event == expected);

// Check indexed keys
Expand All @@ -323,7 +321,7 @@ fn assert_event_transfer(
contract: ContractAddress, from: ContractAddress, to: ContractAddress, value: u256
) {
let event = utils::pop_log::<ERC20Component::Event>(contract).unwrap();
let expected = ERC20Component::Event::Transfer(Transfer { from: from, to: to, value: value });
let expected = ERC20Component::Event::Transfer(Transfer { from, to, value });
assert!(event == expected);

// Check indexed keys
Expand Down
10 changes: 3 additions & 7 deletions src/tests/presets/test_erc721.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ fn assert_event_approval_for_all(
) {
let event = utils::pop_log::<ERC721Component::Event>(contract).unwrap();
let expected = ERC721Component::Event::ApprovalForAll(
ApprovalForAll { owner: owner, operator: operator, approved: approved, }
ApprovalForAll { owner, operator, approved, }
);
assert!(event == expected);
utils::assert_no_events_left(contract);
Expand All @@ -1035,9 +1035,7 @@ fn assert_event_approval(
contract: ContractAddress, owner: ContractAddress, approved: ContractAddress, token_id: u256
) {
let event = utils::pop_log::<ERC721Component::Event>(contract).unwrap();
let expected = ERC721Component::Event::Approval(
Approval { owner: owner, approved: approved, token_id: token_id }
);
let expected = ERC721Component::Event::Approval(Approval { owner, approved, token_id });
assert!(event == expected);
utils::assert_no_events_left(contract);

Expand All @@ -1054,9 +1052,7 @@ fn assert_event_transfer(
contract: ContractAddress, from: ContractAddress, to: ContractAddress, token_id: u256
) {
let event = utils::pop_log::<ERC721Component::Event>(contract).unwrap();
let expected = ERC721Component::Event::Transfer(
Transfer { from: from, to: to, token_id: token_id }
);
let expected = ERC721Component::Event::Transfer(Transfer { from, to, token_id });
assert!(event == expected);

// Check indexed keys
Expand Down

0 comments on commit 9907a21

Please sign in to comment.