mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-05 12:44:09 +01:00
fix: Modify tron fee to eliminate spike due to first tx (#1439)
This commit is contained in:
@@ -130,11 +130,6 @@ class TronClient {
|
|||||||
final energyInSun = chainParams.getEnergyFee!;
|
final energyInSun = chainParams.getEnergyFee!;
|
||||||
log('Energy In Sun: $energyInSun');
|
log('Energy In Sun: $energyInSun');
|
||||||
|
|
||||||
log(
|
|
||||||
'Create Account Fee In System Contract for Chain: ${chainParams.getCreateNewAccountFeeInSystemContract!}',
|
|
||||||
);
|
|
||||||
log('Create Account Fee for Chain: ${chainParams.getCreateAccountFee}');
|
|
||||||
|
|
||||||
final fakeTransaction = Transaction(
|
final fakeTransaction = Transaction(
|
||||||
rawData: rawTransaction,
|
rawData: rawTransaction,
|
||||||
signature: [Uint8List(65)],
|
signature: [Uint8List(65)],
|
||||||
@@ -185,17 +180,6 @@ class TronClient {
|
|||||||
totalBurn += chainParams.getMemoFee!;
|
totalBurn += chainParams.getMemoFee!;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if receiver's account is active
|
|
||||||
final receiverAccountInfo =
|
|
||||||
await _provider!.request(TronRequestGetAccount(address: receiverAddress));
|
|
||||||
|
|
||||||
/// Calculate the resources required to create a new account.
|
|
||||||
if (receiverAccountInfo == null) {
|
|
||||||
totalBurn += chainParams.getCreateNewAccountFeeInSystemContract!;
|
|
||||||
|
|
||||||
totalBurn += (chainParams.getCreateAccountFee! * bandWidthInSun);
|
|
||||||
}
|
|
||||||
|
|
||||||
log('Final total burn: $totalBurn');
|
log('Final total burn: $totalBurn');
|
||||||
|
|
||||||
return totalBurn;
|
return totalBurn;
|
||||||
|
|||||||
Reference in New Issue
Block a user