Skip to content

Commit b233937

Browse files
committed
Mutex check for token transfers updated
1 parent 0a1da04 commit b233937

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contracts/standard/arbitration/MultipleArbitrableTokenTransactionWithFee.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ contract MultipleArbitrableTokenTransactionWithFee is IArbitrable {
197197
uint tokenBalance = transaction.token.balanceOf(address(this)); // A token transaction mutex.
198198
transaction.token.transfer(feeRecipient, feeAmount); // It is the responsibility of the feeRecipient to accept Token.
199199
require(transaction.token.transfer(transaction.receiver, _amount - feeAmount), "The `transfer` function must not fail.");
200-
require(transaction.token.balanceOf(address(this)) == tokenBalance - _amount, "Tried to transfer tokens more than allowed.");
200+
require(transaction.token.balanceOf(address(this)) >= tokenBalance - _amount, "Tried to transfer tokens more than allowed.");
201201

202202
emit Payment(_transactionID, _amount - feeAmount, msg.sender);
203203
emit FeeRecipientPaymentInToken(_transactionID, feeAmount, transaction.token);
@@ -234,7 +234,7 @@ contract MultipleArbitrableTokenTransactionWithFee is IArbitrable {
234234
uint tokenBalance = transaction.token.balanceOf(address(this));
235235
transaction.token.transfer(feeRecipient, feeAmount);
236236
require(transaction.token.transfer(transaction.receiver, amount - feeAmount), "The `transfer` function must not fail.");
237-
require(transaction.token.balanceOf(address(this)) == tokenBalance - amount, "Tried to transfer tokens more than allowed.");
237+
require(transaction.token.balanceOf(address(this)) >= tokenBalance - amount, "Tried to transfer tokens more than allowed.");
238238

239239
emit Payment(_transactionID, amount - feeAmount, transaction.sender);
240240
emit FeeRecipientPaymentInToken(_transactionID, feeAmount, transaction.token);

0 commit comments

Comments
 (0)