Updated on 2026-08-14
This commit is contained in:
parent
75075b53c8
commit
6fba280ec3
2 changed files with 0 additions and 35 deletions
|
|
@ -191,39 +191,6 @@ internal class SwapRepositoryImpl @Inject constructor(
|
|||
return configManager.config.swapReferrerAccount?.fee?.toDoubleOrNull() ?: 0.0
|
||||
}
|
||||
|
||||
override suspend fun getCryptoCurrency(
|
||||
userWallet: UserWallet,
|
||||
currency: CryptoCurrency,
|
||||
network: Network,
|
||||
): CryptoCurrency? {
|
||||
val blockchain = Blockchain.fromNetworkId(currency.network.id.value) ?: return null
|
||||
val cryptoCurrencyFactory = CryptoCurrencyFactory()
|
||||
return when (currency) {
|
||||
is CryptoCurrency.Coin -> {
|
||||
cryptoCurrencyFactory.createCoin(
|
||||
blockchain = blockchain,
|
||||
extraDerivationPath = network.derivationPath.value,
|
||||
derivationStyleProvider = userWallet.scanResponse.derivationStyleProvider,
|
||||
)
|
||||
}
|
||||
is CryptoCurrency.Token -> {
|
||||
val sdkToken = SdkToken(
|
||||
name = currency.name,
|
||||
symbol = currency.symbol,
|
||||
contractAddress = currency.contractAddress,
|
||||
decimals = currency.decimals,
|
||||
id = currency.id.value,
|
||||
)
|
||||
cryptoCurrencyFactory.createToken(
|
||||
sdkToken = sdkToken,
|
||||
blockchain = blockchain,
|
||||
extraDerivationPath = network.derivationPath.value,
|
||||
derivationStyleProvider = userWallet.scanResponse.derivationStyleProvider,
|
||||
)
|
||||
}
|
||||
} as CryptoCurrency
|
||||
}
|
||||
|
||||
override suspend fun getAllowance(
|
||||
userWalletId: UserWalletId,
|
||||
networkId: String,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ class SwapDomainModule {
|
|||
walletFeatureToggles: WalletFeatureToggles,
|
||||
@SwapScope getSelectedWalletSyncUseCase: GetSelectedWalletSyncUseCase,
|
||||
@SwapScope getCryptoCurrencyStatusUseCase: GetCryptoCurrencyStatusUseCase,
|
||||
@SwapScope getCardTokensListUseCase: GetCardTokensListUseCase,
|
||||
): SwapInteractor {
|
||||
return SwapInteractorImpl(
|
||||
transactionManager = transactionManager,
|
||||
|
|
@ -49,7 +48,6 @@ class SwapDomainModule {
|
|||
walletFeatureToggles = walletFeatureToggles,
|
||||
getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase,
|
||||
getMultiCryptoCurrencyStatusUseCase = getCryptoCurrencyStatusUseCase,
|
||||
getCardTokensListUseCase = getCardTokensListUseCase,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue