Skip to content

Commit

Permalink
fix TON gas fees
Browse files Browse the repository at this point in the history
  • Loading branch information
Mithreum committed Jan 14, 2025
1 parent 9b739bd commit f78f339
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/chains/ton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,15 +610,19 @@ export async function tonHandler({
await tonLp.send(
signer,
{
value: amount + toNano("0.04"),
value: amount + toNano("0.02"),
},
{
$$type: "Deposit",
amount,
forward_payload: payload
},
);
return await getNewTxAfterHash(last, tonLp.address, 923309543);
return (await getNewTxAfterHash(
last,
tonLp.address,
0x97ed57f1) // Deposit
);
}

// ----------------- If Jetton is deposited -----------------
Expand All @@ -638,7 +642,7 @@ export async function tonHandler({
await wc.send(
signer,
{
value: toNano("0.4"),
value: toNano("0.2"),
...ga,
},
{
Expand All @@ -647,12 +651,16 @@ export async function tonHandler({
custom_payload: null,
sender: lp.address,
forward_payload: payload,
forward_ton_amount: toNano("0.2"),
forward_ton_amount: toNano("0.1"),
query_id: 0n,
response_destination: lp.address,
},
);
return await getNewTxAfterHash(last, lp.address, 923309543);
return (await getNewTxAfterHash(
last,
wc.address,
0xf8a7ea5) // op::transfer
);
},
// -----------------------------------------------------------------
async withdrawFees(signer, pool, ga) {
Expand Down

0 comments on commit f78f339

Please sign in to comment.