ton-blockchain / wallet-contract-v5

w5
MIT License
69 stars 16 forks source link

[Code Fix] Removed redundant condition #14

Closed e6654321 closed 1 month ago

e6654321 commented 2 months ago

13 - Removed unnecessary conditional when going through the progress actions

nns2009 commented 2 months ago

Gotta be careful with it since | is not lazy in FunC (and neither is in C++), although upon further inspection, it looks like possible optimization since when the expected behavior is to add extension (is_add_extension is true), the only way for cs~check_and_remove_remove_extension_prefix() to also pass would be for the (requesting-to-add) Extension address to be addr_none (followed by 000011 extra bits), and adding addr_none extension won't pass parse_std_addr of the next line anyway.

Users would also be able to do 'add' by inserting extra 0x03 into add-action: 0x0203\

instead of 0x02\
.

None of these seems to lead to any issues, but it would need to be thoroughly rechecked just in case.

tolya-yanot commented 1 month ago

Wrong suggestion