diff --git a/app/build.gradle b/app/build.gradle index e188ec41b5..2657dee498 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -271,7 +271,7 @@ dependencies { // Wallet kits implementation 'com.github.horizontalsystems:ton-kit-kmm:f1fd301' implementation 'com.github.horizontalsystems:bitcoin-kit-android:80fd413' - implementation 'com.github.horizontalsystems:ethereum-kit-android:f4957a9' + implementation 'com.github.horizontalsystems:ethereum-kit-android:3d83900' implementation 'com.github.horizontalsystems:blockchain-fee-rate-kit-android:1d3bd49' implementation 'com.github.horizontalsystems:binance-chain-kit-android:c1509a2' implementation 'com.github.horizontalsystems:market-kit-android:a0361bf' diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/multiswap/providers/OneInchProvider.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/multiswap/providers/OneInchProvider.kt index 0839e2e4a6..e8cd42540d 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/multiswap/providers/OneInchProvider.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/multiswap/providers/OneInchProvider.kt @@ -33,6 +33,8 @@ object OneInchProvider : EvmSwapProvider() { override val url = "https://app.1inch.io/" override val icon = R.drawable.oneinch private val oneInchKit by lazy { OneInchKit.getInstance(App.appConfigProvider.oneInchApiKey) } + private const val PARTNER_FEE: Float = 0.3F + private const val PARTNER_ADDRESS: String = "0xe42BBeE8389548fAe35C09072065b7fEc582b590" // TODO take evmCoinAddress from oneInchKit private val evmCoinAddress = Address("0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") @@ -67,7 +69,8 @@ object OneInchProvider : EvmSwapProvider() { chain = evmBlockchainHelper.chain, fromToken = getTokenAddress(tokenIn), toToken = getTokenAddress(tokenOut), - amount = amountIn.scaleUp(tokenIn.decimals) + amount = amountIn.scaleUp(tokenIn.decimals), + fee = PARTNER_FEE ).onErrorResumeNext { Single.error(it.convertedError) }.await() @@ -132,7 +135,9 @@ object OneInchProvider : EvmSwapProvider() { amount = amountIn.scaleUp(tokenIn.decimals), slippagePercentage = slippage.toFloat(), recipient = settingRecipient.value?.hex?.let { Address(it) }, - gasPrice = gasPrice + gasPrice = gasPrice, + referrer = PARTNER_ADDRESS, + fee = PARTNER_FEE ).await() val swapTx = swap.transaction