Updated on 2026-08-14
This commit is contained in:
parent
e98780ff93
commit
479d142807
283 changed files with 2338 additions and 2730 deletions
|
|
@ -82,11 +82,7 @@ class UserWalletManagerImpl(
|
|||
override fun addToken(currency: Currency) {
|
||||
val action = if (currency is NativeToken) {
|
||||
val card = appStateHolder.getActualCard()
|
||||
if (card != null) {
|
||||
addNativeTokenToWalletAction(currency, card)
|
||||
} else {
|
||||
throw IllegalStateException("card not found")
|
||||
}
|
||||
if (card != null) addNativeTokenToWalletAction(currency, card) else error("Card not found")
|
||||
} else {
|
||||
addNonNativeTokenToWalletAction(currency as NonNativeToken)
|
||||
}
|
||||
|
|
@ -184,12 +180,15 @@ class UserWalletManagerImpl(
|
|||
}
|
||||
|
||||
private fun createDerivationParams(derivationStyle: DerivationStyle?): DerivationParams? {
|
||||
return derivationStyle?.let { DerivationParams.Default(derivationStyle) } //todo clarify if its need to add Custom
|
||||
//todo clarify if its need to add Custom
|
||||
return derivationStyle?.let { DerivationParams.Default(derivationStyle) }
|
||||
}
|
||||
|
||||
private fun getActualWalletManager(blockchain: Blockchain): WalletManager {
|
||||
val card = requireNotNull(appStateHolder.getActualCard()) { "card not found" }
|
||||
val blockchainNetwork = BlockchainNetwork(blockchain, card)
|
||||
return requireNotNull(appStateHolder.walletState?.getWalletManager(blockchainNetwork)) { "no wallet manager found" }
|
||||
return requireNotNull(appStateHolder.walletState?.getWalletManager(blockchainNetwork)) {
|
||||
"No wallet manager found"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue