Skip to content

Commit 2a14737

Browse files
committed
Fix fake jetton contract example
1 parent 3b56d69 commit 2a14737

File tree

1 file changed

+4
-2
lines changed
  • not-so-smart-contracts/ton/fake_jetton_contract

1 file changed

+4
-2
lines changed

not-so-smart-contracts/ton/fake_jetton_contract/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ The following simplified code highlights the lack of token_id validation in the
4141
slice balance_before = token0_balances.dict_get?(267, from_address);
4242
int balance = balance_before.load_coins();
4343
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);
4546
} else {
4647
slice balance_before = token1_balances.dict_get?(267, from_address);
4748
int balance = balance_before.load_coins();
4849
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);
5052
}
5153
5254
save_data();

0 commit comments

Comments
 (0)