Skip to content

Commit

Permalink
fix jettonTransferAmount again
Browse files Browse the repository at this point in the history
  • Loading branch information
sorokin0andrey committed Dec 20, 2024
1 parent 560971b commit 9de0753
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.tonapps.tonkeeper.ui.screen.send.main

import android.app.Application
import android.util.Log
import androidx.lifecycle.viewModelScope
import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.tonapps.blockchain.ton.contract.WalletFeature
Expand Down Expand Up @@ -55,7 +54,6 @@ import kotlinx.coroutines.flow.debounce
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.firstOrNull
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.map
Expand Down Expand Up @@ -659,7 +657,7 @@ class SendViewModel(
val message = transfer.signForEstimation(
internalMessage = true,
excessesAddress = excessesAddress,
jettonTransferAmount = TransferEntity.ONE_TON,
jettonTransferAmount = TransferEntity.BASE_FORWARD_AMOUNT,
)

val (consequences, withBattery) = batteryRepository.emulate(
Expand Down Expand Up @@ -705,7 +703,7 @@ class SendViewModel(
)
),
excessesAddress = excessesAddress,
jettonTransferAmount = TransferEntity.POINT_ONE_TON
jettonTransferAmount = TransferEntity.BASE_FORWARD_AMOUNT
)

val commission = api.estimateGaslessCost(
Expand Down Expand Up @@ -737,7 +735,7 @@ class SendViewModel(
): Pair<Coins, Boolean> {
val message = transfer.signForEstimation(
internalMessage = false,
jettonTransferAmount = TransferEntity.ONE_TON
jettonTransferAmount = TransferEntity.BASE_FORWARD_AMOUNT
)
// Emulate with higher balance to calculate fair amount to send
val emulated = api.emulate(
Expand Down

0 comments on commit 9de0753

Please sign in to comment.