Closed slavaavr closed 3 months ago
Hi! Found out a possible bug related with reserving ton coins in the line https://github.com/ton-blockchain/stablecoin-contract/blob/main/contracts/jetton-wallet.fc#L131
raw_reserve(max(to_leave_on_balance, calculate_jetton_wallet_min_storage_fee()), RESERVE_AT_MOST);
If the balance is lower than storage fee, then subsequent instructions will not be processed. This is because the raw_reserve holds coins from the balance that are insufficient to meet the requirement
raw_reserve
Wrote a unit test and it actually works. My bad. Closing issue
Hi! Found out a possible bug related with reserving ton coins in the line https://github.com/ton-blockchain/stablecoin-contract/blob/main/contracts/jetton-wallet.fc#L131
raw_reserve(max(to_leave_on_balance, calculate_jetton_wallet_min_storage_fee()), RESERVE_AT_MOST);
If the balance is lower than storage fee, then subsequent instructions will not be processed. This is because the
raw_reserve
holds coins from the balance that are insufficient to meet the requirement