Skip to content

Commit

Permalink
fix: mode | 2 == mode replaced with (mode >> 1) & 1
Browse files Browse the repository at this point in the history
  • Loading branch information
siandreev committed Nov 21, 2023
1 parent b6835ce commit 868d4fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions contracts/wallet_v5.fc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ int pack_address((int, int) address) impure asm "SWAP INC XOR"; ;; hash ^ (wc+1)
while (~ action_list.slice_data_empty?()) {
(slice cs, int send_msg?) = check_and_remove_msg_acion_prefix(action_list);
if (send_msg?) {
int mode = cs.preload_uint(8);
throw_unless(37, mode | 2 == mode);
throw_unless(37, (cs.preload_uint(8) >> 1) & 1);
}
action_list = action_list.preload_ref().begin_parse();
}
Expand Down
4 changes: 3 additions & 1 deletion tests/wallet-v5-external.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,9 @@ describe('Wallet V5 sign auth external', () => {

const msg = createMsgInternal({ dest: testReceiver, value: forwardValue });

const actionsList = packActionsList([new ActionSendMsg(SendMode.PAY_GAS_SEPARATELY, msg)]);
const actionsList = packActionsList([
new ActionSendMsg(SendMode.CARRY_ALL_REMAINING_BALANCE, msg)
]);

const receipt = await walletV5.sendExternalSignedMessage(createBody(actionsList));

Expand Down

0 comments on commit 868d4fc

Please sign in to comment.