Skip to content

Commit

Permalink
fix problem with test and forge build
Browse files Browse the repository at this point in the history
  • Loading branch information
Dprof-in-tech committed Dec 16, 2024
1 parent 0355482 commit a2020b4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/Wallet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ contract WalletTest is Test {
wallet.transfer(user2, 100);

vm.prank(user1);
Wallet.Transaction[] memory history = wallet.getTransactionHistory();
Wallet.Transaction[] memory history = wallet.getTransactionHistory(user1);
assertEq(history.length, 1);
assertEq(history[0].amount, 100);
assertEq(history[0].token, address(usdt));
Expand All @@ -63,7 +63,7 @@ contract WalletTest is Test {
wallet.transfer(user2, 100);
wallet.transfer(user2, 200);

Wallet.Transaction[] memory history = wallet.getTransactionHistory();
Wallet.Transaction[] memory history = wallet.getTransactionHistory(user1);
vm.stopPrank();

assertEq(history.length, 2);
Expand All @@ -85,10 +85,10 @@ contract WalletTest is Test {
wallet.transfer(user1, 50);

vm.prank(user1);
Wallet.Transaction[] memory user1History = wallet.getTransactionHistory();
Wallet.Transaction[] memory user1History = wallet.getTransactionHistory(user1);

vm.prank(user2);
Wallet.Transaction[] memory user2History = wallet.getTransactionHistory();
Wallet.Transaction[] memory user2History = wallet.getTransactionHistory(user2);

assertEq(user1History.length, 2);
assertEq(user1History[0].amount, 100);
Expand All @@ -105,7 +105,7 @@ contract WalletTest is Test {
usdt.approve(address(wallet), largeAmount);
wallet.transfer(user2, largeAmount);

Wallet.Transaction[] memory history = wallet.getTransactionHistory();
Wallet.Transaction[] memory history = wallet.getTransactionHistory(user1);
vm.stopPrank();

assertEq(history.length, 1, "Transaction was not recorded");
Expand Down

0 comments on commit a2020b4

Please sign in to comment.