Skip to content
This repository was archived by the owner on Sep 3, 2026. It is now read-only.
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class WalletKitDemoApp :
return
}

val existingAddresses = kit.getWallets().mapNotNull { it.address?.value }.toMutableSet()
val existingAddresses = kit.getWallets().mapNotNull { it.address().value }.toMutableSet()
Log.d(TAG, "Loading ${storedWallets.size} stored wallets into SDK")

for ((address, walletRecord) in storedWallets) {
Expand Down Expand Up @@ -320,7 +320,7 @@ object TONWalletKitHelper {
apiKey = tonCenterApiKey,
),
)
kit.streaming().register(streamingProvider)
kit.streaming().registerProvider(streamingProvider)
} catch (e: Exception) {
Log.e("WalletKitDemoApp", "Streaming init ERROR network=${network.chainId} - ${e.message}", e)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import io.ton.walletkit.demo.presentation.model.SignDataRequestUi
import io.ton.walletkit.demo.presentation.model.SignMessageRequestUi
import io.ton.walletkit.demo.presentation.model.TransactionRequestUi
import io.ton.walletkit.demo.presentation.model.WalletSummary
import io.ton.walletkit.demo.presentation.viewmodel.SendCurrency

/**
* Interface defining all wallet-related actions.
Expand Down Expand Up @@ -69,7 +70,14 @@ interface WalletActions {
fun onRejectSignMessage(request: SignMessageRequestUi)
fun onConfirmSignerApproval()
fun onCancelSignerApproval()
fun onSendTransaction(walletAddress: String, recipient: String, amount: String, comment: String)
fun onSendTransaction(
walletAddress: String,
recipient: String,
amount: String,
comment: String,
currency: SendCurrency,
gasless: Boolean,
)
fun onRefreshTransactions(address: String)
fun onTransactionClick(transactionHash: String, walletAddress: String)
fun onHandleUrl(url: String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import io.ton.walletkit.demo.presentation.model.SignDataRequestUi
import io.ton.walletkit.demo.presentation.model.SignMessageRequestUi
import io.ton.walletkit.demo.presentation.model.TransactionRequestUi
import io.ton.walletkit.demo.presentation.model.WalletSummary
import io.ton.walletkit.demo.presentation.viewmodel.SendCurrency
import io.ton.walletkit.demo.presentation.viewmodel.WalletKitViewModel
import javax.inject.Inject

Expand Down Expand Up @@ -111,7 +112,9 @@ class WalletActionsImpl @Inject constructor(
recipient: String,
amount: String,
comment: String,
) = viewModel.sendLocalTransaction(walletAddress, recipient, amount, comment)
currency: SendCurrency,
gasless: Boolean,
) = viewModel.sendLocalTransaction(walletAddress, recipient, amount, comment, currency, gasless)

override fun onRefreshTransactions(address: String) = viewModel.refreshTransactions(address)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ fun LegacyWalletScreen(
is SheetState.SendTransaction -> SendTransactionScreen(
wallet = sheet.wallet,
onBack = actions::onDismissSheet,
onSend = { recipient, amount, comment ->
actions.onSendTransaction(sheet.wallet.address, recipient, amount, comment)
onSend = { recipient, amount, comment, currency, gasless ->
actions.onSendTransaction(sheet.wallet.address, recipient, amount, comment, currency, gasless)
},
error = state.error,
isLoading = state.isSendingTransaction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fun NFTDetailsScreen(

LaunchedEffect(walletAddress) {
isLoadingWallet = true
wallet = walletKit.getWallets().firstOrNull { it.address?.value == walletAddress }
wallet = walletKit.getWallets().firstOrNull { it.address().value == walletAddress }
isLoadingWallet = false
}

Expand Down
Loading
Loading