@@ -273,7 +273,7 @@ contract SafeTransferLibTest is SoladyTest {
273
273
MockETHRecipient recipient = new MockETHRecipient (false , true );
274
274
275
275
{
276
- uint256 receipientBalanceBefore = address (recipient).balance;
276
+ uint256 recipientBalanceBefore = address (recipient).balance;
277
277
uint256 senderBalanceBefore = address (this ).balance;
278
278
uint256 r = uint256 (keccak256 (abi.encode (randomness))) % 3 ;
279
279
// Send to a griever with a gas stipend. Should not revert.
@@ -288,31 +288,31 @@ contract SafeTransferLibTest is SoladyTest {
288
288
} else {
289
289
this .forceSafeTransferETH (address (recipient), amount);
290
290
}
291
- assertEq (address (recipient).balance - receipientBalanceBefore , amount);
291
+ assertEq (address (recipient).balance - recipientBalanceBefore , amount);
292
292
assertEq (senderBalanceBefore - address (this ).balance, amount);
293
293
// We use the `SELFDESTRUCT` to send, and thus the `garbage` should NOT be updated.
294
294
assertTrue (recipient.garbage () == 0 );
295
295
}
296
296
297
297
{
298
- uint256 receipientBalanceBefore = address (recipient).balance;
298
+ uint256 recipientBalanceBefore = address (recipient).balance;
299
299
uint256 senderBalanceBefore = address (this ).balance;
300
300
// Send more than remaining balance without gas stipend. Should revert.
301
301
vm.expectRevert (SafeTransferLib.ETHTransferFailed.selector );
302
302
this .forceSafeTransferETH (address (recipient), address (this ).balance + 1 , gasleft ());
303
- assertEq (address (recipient).balance - receipientBalanceBefore , 0 );
303
+ assertEq (address (recipient).balance - recipientBalanceBefore , 0 );
304
304
assertEq (senderBalanceBefore - address (this ).balance, 0 );
305
305
// We did not send anything, and thus the `garbage` should NOT be updated.
306
306
assertTrue (recipient.garbage () == 0 );
307
307
}
308
308
309
309
{
310
- uint256 receipientBalanceBefore = address (recipient).balance;
310
+ uint256 recipientBalanceBefore = address (recipient).balance;
311
311
uint256 senderBalanceBefore = address (this ).balance;
312
312
// Send all the remaining balance without gas stipend. Should not revert.
313
313
amount = address (this ).balance;
314
314
this .forceSafeTransferETH (address (recipient), amount, gasleft ());
315
- assertEq (address (recipient).balance - receipientBalanceBefore , amount);
315
+ assertEq (address (recipient).balance - recipientBalanceBefore , amount);
316
316
assertEq (senderBalanceBefore - address (this ).balance, amount);
317
317
// We use the normal `CALL` to send, and thus the `garbage` should be updated.
318
318
assertTrue (recipient.garbage () != 0 );
0 commit comments