Skip to content

Commit

Permalink
fix: adding more context to the comments and renaming method for clar…
Browse files Browse the repository at this point in the history
…ity, avoiding double guard (#80)

Signed-off-by: Mariusz Jasuwienas <[email protected]>
  • Loading branch information
arianejasuwienas committed Jan 10, 2025
1 parent 751a692 commit c410d3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/HtsSystemContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ contract HtsSystemContract is IHederaTokenService, IERC20Events, IERC721Events {
require(accountId.length > 0, "transferTokens: missing recipients");
require(amount.length == accountId.length, "transferTokens: inconsistent input");
for (uint256 i = 0; i < accountId.length; i++) {
// FIXME it does not necessarily have to be msg.sender who sends the token...
// 2 rows will be send - -1 on account A, +1 on account B means that it is account A sending to B...
// This scenario should work anyway by mistake (A will send to msg.sender, msg.sender will forward to B),
// But this method should support more complicated scenarios as well, which at this time it DOES NOT :(
transferToken(token, msg.sender, accountId[i], amount[i]);
}
responseCode = 22; // HederaResponseCodes.SUCCESS
Expand Down

0 comments on commit c410d3c

Please sign in to comment.