From 293b8f14e741c87d7c26d723d41013a96df2f8e5 Mon Sep 17 00:00:00 2001 From: Jeremy Lee <37092291+yogurtandjam@users.noreply.github.com> Date: Wed, 29 May 2024 22:34:33 -0400 Subject: [PATCH] feat: skip processor base [OTE-345] (#387) Co-authored-by: mobile-build-bot-git --- build.gradle.kts | 2 +- .../processor/router/SharedRouterProcessor.kt | 5 + .../router/skip/SkipChainProcessor.kt | 22 ++++ .../router/skip/SkipChainResourceProcessor.kt | 23 ++++ .../processor/router/skip/SkipProcessor.kt | 109 ++++++++++++++++++ .../router/skip/SkipTokenProcessor.kt | 21 ++++ .../router/skip/SkipTokenResourceProcessor.kt | 23 ++++ .../{ => router}/squid/SquidChainProcessor.kt | 2 +- .../squid/SquidChainResourceProcessor.kt | 2 +- .../{ => router}/squid/SquidProcessor.kt | 45 ++++---- .../squid/SquidRoutePayloadProcessor.kt | 2 +- .../{ => router}/squid/SquidRouteProcessor.kt | 2 +- .../squid/SquidRouteV2PayloadProcessor.kt | 2 +- .../squid/SquidRouteV2Processor.kt | 2 +- .../squid/SquidStatusProcessor.kt | 2 +- .../{ => router}/squid/SquidTokenProcessor.kt | 2 +- .../squid/SquidTokenResourceProcessor.kt | 2 +- .../state/model/TradingStateMachine.kt | 2 +- 18 files changed, 237 insertions(+), 33 deletions(-) create mode 100644 src/commonMain/kotlin/exchange.dydx.abacus/processor/router/SharedRouterProcessor.kt create mode 100644 src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainProcessor.kt create mode 100644 src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainResourceProcessor.kt create mode 100644 src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessor.kt create mode 100644 src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipTokenProcessor.kt create mode 100644 src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipTokenResourceProcessor.kt rename src/commonMain/kotlin/exchange.dydx.abacus/processor/{ => router}/squid/SquidChainProcessor.kt (92%) rename src/commonMain/kotlin/exchange.dydx.abacus/processor/{ => router}/squid/SquidChainResourceProcessor.kt (92%) rename src/commonMain/kotlin/exchange.dydx.abacus/processor/{ => router}/squid/SquidProcessor.kt (88%) rename src/commonMain/kotlin/exchange.dydx.abacus/processor/{ => router}/squid/SquidRoutePayloadProcessor.kt (96%) rename src/commonMain/kotlin/exchange.dydx.abacus/processor/{ => router}/squid/SquidRouteProcessor.kt (97%) rename src/commonMain/kotlin/exchange.dydx.abacus/processor/{ => router}/squid/SquidRouteV2PayloadProcessor.kt (96%) rename src/commonMain/kotlin/exchange.dydx.abacus/processor/{ => router}/squid/SquidRouteV2Processor.kt (98%) rename src/commonMain/kotlin/exchange.dydx.abacus/processor/{ => router}/squid/SquidStatusProcessor.kt (92%) rename src/commonMain/kotlin/exchange.dydx.abacus/processor/{ => router}/squid/SquidTokenProcessor.kt (91%) rename src/commonMain/kotlin/exchange.dydx.abacus/processor/{ => router}/squid/SquidTokenResourceProcessor.kt (92%) diff --git a/build.gradle.kts b/build.gradle.kts index 77b9302c4..dbcbbdba5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -51,7 +51,7 @@ allprojects { } group = "exchange.dydx.abacus" -version = "1.7.40" +version = "1.7.41" repositories { google() diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/SharedRouterProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/SharedRouterProcessor.kt new file mode 100644 index 000000000..55f5f3c70 --- /dev/null +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/SharedRouterProcessor.kt @@ -0,0 +1,5 @@ +package exchange.dydx.abacus.processor.router + +import exchange.dydx.abacus.protocols.ParserProtocol + +class SharedRouterProcessor(val parser: ParserProtocol) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainProcessor.kt new file mode 100644 index 000000000..d9967c7d3 --- /dev/null +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainProcessor.kt @@ -0,0 +1,22 @@ +package exchange.dydx.abacus.processor.router.skip + +import exchange.dydx.abacus.processor.base.BaseProcessor +import exchange.dydx.abacus.protocols.ParserProtocol + +internal class SkipChainProcessor(parser: ParserProtocol) : BaseProcessor(parser) { + private val keyMap = mapOf( + "string" to mapOf( + "chain_name" to "stringKey", + "networkIdentifier" to "stringKey", + "chain_id" to "type", + "logo_uri" to "iconUrl", + ), + ) + + override fun received( + existing: Map?, + payload: Map + ): Map { + return transform(existing, payload, keyMap) + } +} diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainResourceProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainResourceProcessor.kt new file mode 100644 index 000000000..d4906869d --- /dev/null +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipChainResourceProcessor.kt @@ -0,0 +1,23 @@ +package exchange.dydx.abacus.processor.router.skip + +import exchange.dydx.abacus.processor.base.BaseProcessor +import exchange.dydx.abacus.protocols.ParserProtocol + +internal class SkipChainResourceProcessor(parser: ParserProtocol) : BaseProcessor(parser) { + private val keyMap = mapOf( + "string" to mapOf( + "chain_name" to "chainName", + "rpc" to "rpc", + "networkName" to "networkName", + "chain_id" to "chainId", + "logo_uri" to "iconUrl", + ), + ) + + override fun received( + existing: Map?, + payload: Map + ): Map { + return transform(existing, payload, keyMap) + } +} diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessor.kt new file mode 100644 index 000000000..edb9296ee --- /dev/null +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessor.kt @@ -0,0 +1,109 @@ +package exchange.dydx.abacus.processor.router.skip + +import exchange.dydx.abacus.processor.base.BaseProcessor +import exchange.dydx.abacus.processor.router.IRouterProcessor +import exchange.dydx.abacus.processor.router.SharedRouterProcessor +import exchange.dydx.abacus.protocols.ParserProtocol +import exchange.dydx.abacus.utils.safeSet + +@Suppress("NotImplementedDeclaration") +internal class SkipProcessor(parser: ParserProtocol) : BaseProcessor(parser), IRouterProcessor { + override var chains: List? = null + +// possibly want to use a different variable so we aren't stuck with this bad type +// actual type of the tokens payload is Map>>> + override var tokens: List? = null + override var exchangeDestinationChainId: String? = null + val sharedRouterProcessor = SharedRouterProcessor(parser) + + override fun receivedV2SdkInfo( + existing: Map?, + payload: Map + ): Map? { + throw NotImplementedError("receivedV2SdkInfo is not implemented in SkipProcessor!") + } + override fun receivedChains( + existing: Map?, + payload: Map + ): Map? { + throw NotImplementedError("receivedChains is not implemented in SkipProcessor!") + } + override fun receivedTokens( + existing: Map?, + payload: Map + ): Map? { + throw NotImplementedError("receivedTokens is not implemented in SkipProcessor!") + } + + override fun receivedRoute( + existing: Map?, + payload: Map, + requestId: String?, + ): Map? { + throw NotImplementedError("receivedRoute is not implemented in SkipProcessor!") + } + + override fun receivedRouteV2( + existing: Map?, + payload: Map, + requestId: String? + ): Map? { + throw NotImplementedError("receivedRouteV2 is not implemented in SkipProcessor!") + } + + override fun usdcAmount(data: Map): Double? { + throw NotImplementedError("usdcAmount is not implemented in SkipProcessor!") + } + + override fun receivedStatus( + existing: Map?, + payload: Map, + transactionId: String?, + ): Map? { + throw NotImplementedError("receivedStatus is not implemented in SkipProcessor!") + } + + override fun updateTokensDefaults(modified: MutableMap, selectedChainId: String?) { + val tokenOptions = tokenOptions(selectedChainId) + modified.safeSet("transfer.depositOptions.assets", tokenOptions) + modified.safeSet("transfer.withdrawalOptions.assets", tokenOptions) + modified.safeSet("transfer.token", defaultTokenAddress(selectedChainId)) + modified.safeSet("transfer.resources.tokenResources", tokenResources(selectedChainId)) + } + + override fun defaultChainId(): String? { + throw NotImplementedError("defaultChainId is not implemented in SkipProcessor!") + } + + override fun selectedTokenSymbol(tokenAddress: String?): String? { + throw NotImplementedError("selectedTokenSymbol is not implemented in SkipProcessor!") + } + + override fun selectedTokenDecimals(tokenAddress: String?): String? { + throw NotImplementedError("selectedTokenDecimals is not implemented in SkipProcessor!") + } + + override fun filteredTokens(chainId: String?): List? { + throw NotImplementedError("filteredTokens is not implemented in SkipProcessor!") + } + + override fun defaultTokenAddress(chainId: String?): String? { + throw NotImplementedError("defaultTokenAddress is not implemented in SkipProcessor!") + } + + override fun chainResources(chainId: String?): Map? { + throw NotImplementedError("chainResources is not implemented in SkipProcessor!") + } + + override fun tokenResources(chainId: String?): Map? { + throw NotImplementedError("tokenResources is not implemented in SkipProcessor!") + } + + override fun chainOptions(): List { + throw NotImplementedError("chainOptions is not implemented in SkipProcessor!") + } + + override fun tokenOptions(chainId: String?): List { + throw NotImplementedError("tokenOptions is not implemented in SkipProcessor!") + } +} diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipTokenProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipTokenProcessor.kt new file mode 100644 index 000000000..59623ca27 --- /dev/null +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipTokenProcessor.kt @@ -0,0 +1,21 @@ +package exchange.dydx.abacus.processor.router.skip + +import exchange.dydx.abacus.processor.base.BaseProcessor +import exchange.dydx.abacus.protocols.ParserProtocol + +internal class SkipTokenProcessor(parser: ParserProtocol) : BaseProcessor(parser) { + private val keyMap = mapOf( + "string" to mapOf( + "name" to "stringKey", + "denom" to "type", + "logo_uri" to "iconUrl", + ), + ) + + override fun received( + existing: Map?, + payload: Map + ): Map { + return transform(existing, payload, keyMap) + } +} diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipTokenResourceProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipTokenResourceProcessor.kt new file mode 100644 index 000000000..e5b202a4a --- /dev/null +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipTokenResourceProcessor.kt @@ -0,0 +1,23 @@ +package exchange.dydx.abacus.processor.router.skip + +import exchange.dydx.abacus.processor.base.BaseProcessor +import exchange.dydx.abacus.protocols.ParserProtocol + +internal class SkipTokenResourceProcessor(parser: ParserProtocol) : BaseProcessor(parser) { + private val keyMap = mapOf( + "string" to mapOf( + "name" to "name", + "denom" to "address", + "symbol" to "symbol", + "decimals" to "decimals", + "logo_uri" to "iconUrl", + ), + ) + + override fun received( + existing: Map?, + payload: Map + ): Map { + return transform(existing, payload, keyMap) + } +} diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidChainProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidChainProcessor.kt similarity index 92% rename from src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidChainProcessor.kt rename to src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidChainProcessor.kt index a886b0d33..b8bc72577 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidChainProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidChainProcessor.kt @@ -1,4 +1,4 @@ -package exchange.dydx.abacus.processor.squid +package exchange.dydx.abacus.processor.router.squid import exchange.dydx.abacus.output.input.SelectionOption import exchange.dydx.abacus.protocols.ParserProtocol diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidChainResourceProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidChainResourceProcessor.kt similarity index 92% rename from src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidChainResourceProcessor.kt rename to src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidChainResourceProcessor.kt index 97c371ad8..774260b2a 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidChainResourceProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidChainResourceProcessor.kt @@ -1,4 +1,4 @@ -package exchange.dydx.abacus.processor.squid +package exchange.dydx.abacus.processor.router.squid import exchange.dydx.abacus.output.input.TransferInputChainResource import exchange.dydx.abacus.protocols.ParserProtocol diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidProcessor.kt similarity index 88% rename from src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidProcessor.kt rename to src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidProcessor.kt index be3e69031..866b34411 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidProcessor.kt @@ -1,9 +1,10 @@ -package exchange.dydx.abacus.processor.squid +package exchange.dydx.abacus.processor.router.squid import exchange.dydx.abacus.output.input.SelectionOption import exchange.dydx.abacus.output.input.TransferInputChainResource import exchange.dydx.abacus.output.input.TransferInputTokenResource import exchange.dydx.abacus.processor.base.BaseProcessor +import exchange.dydx.abacus.processor.router.IRouterProcessor import exchange.dydx.abacus.protocols.ParserProtocol import exchange.dydx.abacus.state.internalstate.InternalTransferInputState import exchange.dydx.abacus.state.manager.CctpConfig.cctpChainIds @@ -13,12 +14,12 @@ import exchange.dydx.abacus.utils.safeSet internal class SquidProcessor( parser: ParserProtocol, private val internalState: InternalTransferInputState, -) : BaseProcessor(parser) { - private var chains: List? = null - private var tokens: List? = null - var exchangeDestinationChainId: String? = null +) : BaseProcessor(parser), IRouterProcessor { + override var chains: List? = null + override var tokens: List? = null + override var exchangeDestinationChainId: String? = null - internal fun receivedChains( + override fun receivedChains( existing: Map?, payload: Map ): Map? { @@ -46,7 +47,7 @@ internal class SquidProcessor( return modified } - internal fun receivedTokens( + override fun receivedTokens( existing: Map?, payload: Map ): Map? { @@ -66,7 +67,7 @@ internal class SquidProcessor( return modified } - internal fun receivedV2SdkInfo( + override fun receivedV2SdkInfo( existing: Map?, payload: Map ): Map? { @@ -95,7 +96,7 @@ internal class SquidProcessor( return modified } - internal fun receivedRoute( + override fun receivedRoute( existing: Map?, payload: Map, requestId: String?, @@ -121,7 +122,7 @@ internal class SquidProcessor( return modified } - internal fun receivedRouteV2( + override fun receivedRouteV2( existing: Map?, payload: Map, requestId: String? @@ -147,7 +148,7 @@ internal class SquidProcessor( return modified } - private fun usdcAmount(data: Map): Double? { + override fun usdcAmount(data: Map): Double? { var toAmountUSD = parser.asString(parser.value(data, "transfer.route.toAmountUSD")) toAmountUSD = toAmountUSD?.replace(",", "") var toAmount = parser.asString(parser.value(data, "transfer.route.toAmount")) @@ -155,7 +156,7 @@ internal class SquidProcessor( return parser.asDouble(toAmountUSD) ?: parser.asDouble(toAmount) } - internal fun receivedStatus( + override fun receivedStatus( existing: Map?, payload: Map, transactionId: String?, @@ -169,19 +170,19 @@ internal class SquidProcessor( return processor.received(existing, payload) } - private fun updateTokensDefaults(modified: MutableMap, selectedChainId: String?) { + override fun updateTokensDefaults(modified: MutableMap, selectedChainId: String?) { val tokenOptions = tokenOptions(selectedChainId) internalState.tokens = tokenOptions modified.safeSet("transfer.token", defaultTokenAddress(selectedChainId)) internalState.tokenResources = tokenResources(selectedChainId) } - internal fun defaultChainId(): String? { + override fun defaultChainId(): String? { val selectedChain = parser.asNativeMap(this.chains?.firstOrNull()) return parser.asString(selectedChain?.get("chainId")) } - internal fun selectedTokenSymbol(tokenAddress: String?): String? { + override fun selectedTokenSymbol(tokenAddress: String?): String? { this.tokens?.find { parser.asString(parser.asNativeMap(it)?.get("address")) == tokenAddress }?.let { @@ -190,7 +191,7 @@ internal class SquidProcessor( return null } - internal fun selectedTokenDecimals(tokenAddress: String?): String? { + override fun selectedTokenDecimals(tokenAddress: String?): String? { this.tokens?.find { parser.asString(parser.asNativeMap(it)?.get("address")) == tokenAddress }?.let { @@ -199,7 +200,7 @@ internal class SquidProcessor( return null } - private fun filteredTokens(chainId: String?): List? { + override fun filteredTokens(chainId: String?): List? { chainId?.let { val filteredTokens = mutableListOf>() this.tokens?.let { @@ -216,7 +217,7 @@ internal class SquidProcessor( return tokens } - internal fun defaultTokenAddress(chainId: String?): String? { + override fun defaultTokenAddress(chainId: String?): String? { return chainId?.let { cid -> // Retrieve the list of filtered tokens for the given chainId val filteredTokens = this.filteredTokens(cid)?.mapNotNull { @@ -232,7 +233,7 @@ internal class SquidProcessor( } } - internal fun chainResources(chainId: String?): Map? { + override fun chainResources(chainId: String?): Map? { val chainResources = mutableMapOf() chainId?.let { this.chains?.find { @@ -247,7 +248,7 @@ internal class SquidProcessor( return chainResources } - internal fun tokenResources(chainId: String?): Map? { + override fun tokenResources(chainId: String?): Map? { val tokenResources = mutableMapOf() filteredTokens(chainId)?.forEach { parser.asString(parser.asNativeMap(it)?.get("address"))?.let { key -> @@ -260,7 +261,7 @@ internal class SquidProcessor( return tokenResources } - private fun chainOptions(): List { + override fun chainOptions(): List { val chainProcessor = SquidChainProcessor(parser) val options = mutableListOf() @@ -278,7 +279,7 @@ internal class SquidProcessor( return options } - internal fun tokenOptions(chainId: String?): List { + override fun tokenOptions(chainId: String?): List { val processor = SquidTokenProcessor(parser) val options = mutableListOf() diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRoutePayloadProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRoutePayloadProcessor.kt similarity index 96% rename from src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRoutePayloadProcessor.kt rename to src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRoutePayloadProcessor.kt index 8c32ab806..1879d4b3b 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRoutePayloadProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRoutePayloadProcessor.kt @@ -1,4 +1,4 @@ -package exchange.dydx.abacus.processor.squid +package exchange.dydx.abacus.processor.router.squid import exchange.dydx.abacus.processor.base.BaseProcessor import exchange.dydx.abacus.protocols.ParserProtocol diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRouteProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRouteProcessor.kt similarity index 97% rename from src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRouteProcessor.kt rename to src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRouteProcessor.kt index 9abef1715..4cec8b9f3 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRouteProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRouteProcessor.kt @@ -1,4 +1,4 @@ -package exchange.dydx.abacus.processor.squid +package exchange.dydx.abacus.processor.router.squid import exchange.dydx.abacus.processor.base.BaseProcessor import exchange.dydx.abacus.protocols.ParserProtocol diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRouteV2PayloadProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRouteV2PayloadProcessor.kt similarity index 96% rename from src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRouteV2PayloadProcessor.kt rename to src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRouteV2PayloadProcessor.kt index 46949bfb2..438cc5a78 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRouteV2PayloadProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRouteV2PayloadProcessor.kt @@ -1,4 +1,4 @@ -package exchange.dydx.abacus.processor.squid +package exchange.dydx.abacus.processor.router.squid import exchange.dydx.abacus.processor.base.BaseProcessor import exchange.dydx.abacus.protocols.ParserProtocol diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRouteV2Processor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRouteV2Processor.kt similarity index 98% rename from src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRouteV2Processor.kt rename to src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRouteV2Processor.kt index a70f7e39e..025727d79 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidRouteV2Processor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidRouteV2Processor.kt @@ -1,4 +1,4 @@ -package exchange.dydx.abacus.processor.squid +package exchange.dydx.abacus.processor.router.squid import exchange.dydx.abacus.processor.base.BaseProcessor import exchange.dydx.abacus.protocols.ParserProtocol diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidStatusProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidStatusProcessor.kt similarity index 92% rename from src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidStatusProcessor.kt rename to src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidStatusProcessor.kt index 910998c9b..6e5c5215c 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidStatusProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidStatusProcessor.kt @@ -1,4 +1,4 @@ -package exchange.dydx.abacus.processor.squid +package exchange.dydx.abacus.processor.router.squid import exchange.dydx.abacus.processor.base.BaseProcessor import exchange.dydx.abacus.protocols.ParserProtocol diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidTokenProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidTokenProcessor.kt similarity index 91% rename from src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidTokenProcessor.kt rename to src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidTokenProcessor.kt index 6cf7eb668..43ddd98d7 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidTokenProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidTokenProcessor.kt @@ -1,4 +1,4 @@ -package exchange.dydx.abacus.processor.squid +package exchange.dydx.abacus.processor.router.squid import exchange.dydx.abacus.output.input.SelectionOption import exchange.dydx.abacus.protocols.ParserProtocol diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidTokenResourceProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidTokenResourceProcessor.kt similarity index 92% rename from src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidTokenResourceProcessor.kt rename to src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidTokenResourceProcessor.kt index 5e3783f1d..d8e6b1285 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/squid/SquidTokenResourceProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/squid/SquidTokenResourceProcessor.kt @@ -1,4 +1,4 @@ -package exchange.dydx.abacus.processor.squid +package exchange.dydx.abacus.processor.router.squid import exchange.dydx.abacus.output.input.TransferInputTokenResource import exchange.dydx.abacus.protocols.ParserProtocol diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine.kt index 1dc48e07a..0d824bed3 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine.kt @@ -32,7 +32,7 @@ import exchange.dydx.abacus.processor.assets.AssetsProcessor import exchange.dydx.abacus.processor.configs.ConfigsProcessor import exchange.dydx.abacus.processor.launchIncentive.LaunchIncentiveProcessor import exchange.dydx.abacus.processor.markets.MarketsSummaryProcessor -import exchange.dydx.abacus.processor.squid.SquidProcessor +import exchange.dydx.abacus.processor.router.squid.SquidProcessor import exchange.dydx.abacus.processor.wallet.WalletProcessor import exchange.dydx.abacus.protocols.LocalizerProtocol import exchange.dydx.abacus.protocols.ParserProtocol