Updated on 2026-08-14
This commit is contained in:
commit
bfc8f06f5b
5 changed files with 7 additions and 14 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit f33f020823031f1c532cf5a9d5cf3fbecadcf050
|
||||
Subproject commit 8a36217ba816e1cc7cbc7290ffb948282ec15f6b
|
||||
|
|
@ -132,7 +132,6 @@ class TapWalletManager {
|
|||
}
|
||||
|
||||
dispatchOnMain(WalletAction.LoadWallet())
|
||||
dispatchOnMain(WalletAction.LoadFiatRate())
|
||||
}
|
||||
|
||||
private suspend fun loadMultiWalletData(
|
||||
|
|
@ -202,6 +201,7 @@ class TapWalletManager {
|
|||
)
|
||||
}
|
||||
checkIfDerivationsAreMissing(blockchainNetworks, scanResponse)
|
||||
store.dispatch(WalletAction.LoadFiatRate(coinsList = userTokens))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -218,7 +218,6 @@ class TapWalletManager {
|
|||
}
|
||||
|
||||
store.dispatch(WalletAction.LoadWallet())
|
||||
store.dispatch(WalletAction.LoadFiatRate())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ sealed interface Currency {
|
|||
return TokenResponse(
|
||||
id = coinId,
|
||||
networkId = blockchain.toNetworkId(),
|
||||
derivationPath = derivationPath ?: DERIVATION_PATH_RAW_VALUE,
|
||||
derivationPath = derivationPath,
|
||||
name = currencyName,
|
||||
symbol = currencySymbol,
|
||||
decimals = decimals,
|
||||
|
|
@ -70,7 +70,6 @@ sealed interface Currency {
|
|||
}
|
||||
|
||||
companion object {
|
||||
private const val DERIVATION_PATH_RAW_VALUE = "m/44'/60'/0'/0/0"
|
||||
fun fromBlockchainNetwork(
|
||||
blockchainNetwork: BlockchainNetwork,
|
||||
token: com.tangem.blockchain.common.Token? = null,
|
||||
|
|
@ -112,11 +111,6 @@ sealed interface Currency {
|
|||
}
|
||||
|
||||
fun fromTokenResponse(tokenResponse: TokenResponse): Currency {
|
||||
val derivationPath = if (tokenResponse.derivationPath == DERIVATION_PATH_RAW_VALUE) {
|
||||
null
|
||||
} else {
|
||||
tokenResponse.derivationPath
|
||||
}
|
||||
return when {
|
||||
tokenResponse.contractAddress != null -> Token(
|
||||
com.tangem.blockchain.common.Token(
|
||||
|
|
@ -127,11 +121,11 @@ sealed interface Currency {
|
|||
id = tokenResponse.id,
|
||||
),
|
||||
blockchain = com.tangem.blockchain.common.Blockchain.fromNetworkId(tokenResponse.networkId)!!,
|
||||
derivationPath = derivationPath,
|
||||
derivationPath = tokenResponse.derivationPath,
|
||||
)
|
||||
else -> Blockchain(
|
||||
blockchain = com.tangem.blockchain.common.Blockchain.fromNetworkId(tokenResponse.networkId)!!,
|
||||
derivationPath = derivationPath,
|
||||
derivationPath = tokenResponse.derivationPath,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ ext.versions = [
|
|||
kotlin : '1.6.10',
|
||||
build_gradle : '7.1.3',
|
||||
tangem_card_sdk : 'develop-163',
|
||||
tangem_blockchain_sdk: 'develop-127',
|
||||
tangem_blockchain_sdk: 'develop-128',
|
||||
// tangem_blockchain_sdk: '0.0.1',
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ data class UserTokensResponse(
|
|||
data class TokenResponse(
|
||||
val id: String? = null,
|
||||
val networkId: String,
|
||||
val derivationPath: String,
|
||||
val derivationPath: String? = null,
|
||||
val name: String,
|
||||
val symbol: String,
|
||||
val decimals: Int,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue