fix: Modify tron fee to eliminate spike due to first tx (#1439)

Adegoke David committed May 9, 2024 at 12:03 UTC 1fdc848b3a6b3e8dd9c85728fa445968ef28060c
1 file changed -16
cw_tron/lib/tron_client.dart
-16
@@ -130,11 +130,6 @@ class TronClient {
130 final energyInSun = chainParams.getEnergyFee!;
131 log('Energy In Sun: $energyInSun');
132
133 - log(
134 - 'Create Account Fee In System Contract for Chain: ${chainParams.getCreateNewAccountFeeInSystemContract!}',
135 - );
136 - log('Create Account Fee for Chain: ${chainParams.getCreateAccountFee}');
137 -
133 final fakeTransaction = Transaction(
134 rawData: rawTransaction,
135 signature: [Uint8List(65)],
@@ -185,17 +180,6 @@ class TronClient {
180 totalBurn += chainParams.getMemoFee!;
181 }
182
188 - // Check if receiver's account is active
189 - final receiverAccountInfo =
190 - await _provider!.request(TronRequestGetAccount(address: receiverAddress));
191 -
192 - /// Calculate the resources required to create a new account.
193 - if (receiverAccountInfo == null) {
194 - totalBurn += chainParams.getCreateNewAccountFeeInSystemContract!;
195 -
196 - totalBurn += (chainParams.getCreateAccountFee! * bandWidthInSun);
197 - }
198 -
183 log('Final total burn: $totalBurn');
184
185 return totalBurn;