File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
not-so-smart-contracts/ton/fake_jetton_contract Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,14 @@ The following simplified code highlights the lack of token_id validation in the
41
41
slice balance_before = token0_balances.dict_get?(267, from_address);
42
42
int balance = balance_before.load_coins();
43
43
balance = balance + amount;
44
- token0_balances~dict_set(267, from_address, balance);
44
+ slice balance_after = begin_cell().store_coinds(balance).end_cell().being_parse();
45
+ token0_balances~dict_set(267, from_address, balance_after);
45
46
} else {
46
47
slice balance_before = token1_balances.dict_get?(267, from_address);
47
48
int balance = balance_before.load_coins();
48
49
balance = balance + amount;
49
- token1_balances~dict_set(267, from_address, balance);
50
+ slice balance_after = begin_cell().store_coinds(balance).end_cell().being_parse();
51
+ token1_balances~dict_set(267, from_address, balance_after);
50
52
}
51
53
52
54
save_data();
You can’t perform that action at this time.
0 commit comments