Skip to content

Commit

Permalink
Errors fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgramCrafter committed Oct 7, 2023
1 parent 9f01f9c commit feeeadb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/multitoken_dex.tact
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ contract MultitokenDex {
}

self.transferJettonTo(other_jw, msg.sender, swap_value, msg.query_id, "Swap completed");
self.assets.set(ctx.sender, old_balance_src + received);
self.assets.set(ctx.sender, old_balance_src!! + received);
self.assets.set(other_jw, old_balance_dst - swap_value);
self.swap_base = self.swap_base + received - swap_value;
}
Expand Down Expand Up @@ -180,12 +180,12 @@ contract MultitokenDex {
get fun calc_swap_by_jw_addrs(jetton_src: Address, jetton_dst: Address, value_src: Int): Int {
let asset_src: Int = self.assets.get(jetton_src)!!;
let asset_dst: Int = self.assets.get(jetton_dst)!!;
return calc_swap(asset_src, asset_dst, value_src);
return self.calc_swap(asset_src, asset_dst, value_src);
}

get fun calc_swap_by_master_addrs(jetton_src: Address, jetton_dst: Address, value_src: Int): Int {
let asset_src: Int = self.assets.get(self.jetton_wallets.get(jetton_src)!!)!!;
let asset_dst: Int = self.assets.get(self.jetton_wallets.get(jetton_dst)!!)!!;
return calc_swap(asset_src, asset_dst, value_src);
return self.calc_swap(asset_src, asset_dst, value_src);
}
}

0 comments on commit feeeadb

Please sign in to comment.