Updated on 2026-08-14

This commit is contained in:
Tangem 2025-05-29 19:27:56 +05:00
commit fbec0d5a58
8 changed files with 101 additions and 7 deletions

View file

@ -142,8 +142,10 @@ internal class SendDestinationModel @Inject constructor(
private fun initSenderAddress() {
modelScope.launch {
senderAddresses.value = getNetworkAddressesUseCase.invokeSync(userWalletId, cryptoCurrency.network)
.filter { cryptoCurrency.id == it.cryptoCurrency.id }
senderAddresses.value = getNetworkAddressesUseCase.invokeSync(
userWalletId = userWalletId,
networkRawId = cryptoCurrency.network.id.rawId,
).filter { cryptoCurrency.id == it.cryptoCurrency.id }
}
senderAddresses.onEach {
getWalletsAndRecent()
@ -212,13 +214,19 @@ internal class SendDestinationModel @Inject constructor(
val addresses = if (!wallet.isMultiCurrency) {
getCryptoCurrencyUseCase(wallet.walletId).getOrNull()?.let {
if (it.network.id == cryptoCurrencyNetwork.id) {
getNetworkAddressesUseCase.invokeSync(wallet.walletId, it.network)
getNetworkAddressesUseCase.invokeSync(
userWalletId = wallet.walletId,
networkRawId = it.network.id.rawId,
)
} else {
null
}
}
} else {
getNetworkAddressesUseCase.invokeSync(wallet.walletId, cryptoCurrencyNetwork)
getNetworkAddressesUseCase.invokeSync(
userWalletId = wallet.walletId,
networkRawId = cryptoCurrencyNetwork.id.rawId,
)
}
wallet to addresses
}

View file

@ -430,13 +430,19 @@ internal class SendModel @Inject constructor(
cryptoCurrencyId = cryptoCurrency.id.value,
).getOrNull()?.let {
if (it.network.id == cryptoCurrency.network.id) {
getNetworkAddressesUseCase.invokeSync(wallet.walletId, it.network)
getNetworkAddressesUseCase.invokeSync(
userWalletId = wallet.walletId,
networkRawId = it.network.id.rawId,
)
} else {
null
}
}
} else {
getNetworkAddressesUseCase.invokeSync(wallet.walletId, cryptoCurrency.network)
getNetworkAddressesUseCase.invokeSync(
userWalletId = wallet.walletId,
networkRawId = cryptoCurrency.network.id.rawId,
)
}
addresses?.map { (cryptoCurrency, address) ->
AvailableWallet(