trustwallet / wallet-core

Cross-platform, cross-blockchain wallet library.
https://developer.trustwallet.com/wallet-core
Apache License 2.0
2.77k stars 1.56k forks source link

TON Gas Fee Discrepancies: Missing FWD & Gas Fee #3963

Closed ronaldoguedess closed 1 month ago

ronaldoguedess commented 1 month ago

I'm facing issues with the estimated gas fee on TON:

I broadcast this transaction, sending 1 TON: Transaction Link

This is the fee charged:

image

Below you can see what the API (https://toncenter.com/api/v2/#/send/estimate_fee_estimateFee_post) provides:

This is what I sent as Request body

{
  "address": "EQBry_ewauy7EZ8UzqQwAkQY4T402qNlvyUYyldsE4XhY7G3", 
  "body": "signedRawTransactionHere",
  "init_code": "",
  "init_data": "",
  "ignore_chksig": true
}

Could you please help me understand why there is this discrepancy and what might be causing the missing FWD & gas fee in the estimation? As you can see, there is a higher action fee, but the FWD & gas fee are missing.

image

Treshman commented 1 month ago

Hi @ronaldoguedess . I'm also facing with similar problem, that estimateFee response less than real fee it cost

satoshiotomakan commented 1 month ago

Hi @ronaldoguedess, fwd_fees is always set to 0 for now in WalletCore https://github.com/trustwallet/wallet-core/blob/f14ae4c31e652b293bd5d892b128afc0fa6102c5/rust/chains/tw_ton/src/message/internal_message/transfer.rs#L62-L63 However, I can't say why gas fee is zero, it's most likely better to ask TON team about the discrepancy in estimateFee.

Close since this issue is not related to the wallet core repository. Please re-open it if you believe there is something we can do on WalletCore side