Updated on 2026-08-14

This commit is contained in:
Tangem 2023-11-21 12:42:58 +03:00
parent d73ab1aee6
commit 3c5c53ce92
17 changed files with 193 additions and 128 deletions

View file

@ -265,7 +265,7 @@ internal class SwapRepositoryImpl @Inject constructor(
toNetwork: String,
fromAmount: BigDecimal,
providerId: Int,
rateType: RateType
rateType: RateType,
): ExchangeQuote {
val response = tangemExpressApi.getExchangeQuote(
fromContractAddress,
@ -274,12 +274,12 @@ internal class SwapRepositoryImpl @Inject constructor(
toNetwork,
fromAmount,
providerId,
rateTypeConverter.convertBack(rateType)
rateTypeConverter.convertBack(rateType),
).getOrThrow()
return ExchangeQuote(
toAmount = response.toAmount,
allowanceContract = response.allowanceContract
allowanceContract = response.allowanceContract,
)
}

View file

@ -33,5 +33,4 @@ class SwapPairInfoConverter : Converter<SwapPair, SwapPairDomain> {
rateTypes = swapPairProvider.rateTypes.map { rateTypeConverter.convert(it) },
)
}
}