From 9334057790dbd03f2f2848811a5f00d4b19165b7 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 9 Apr 2024 11:37:04 -0700 Subject: [PATCH] feat(Compliance): query for geo and compliance/screen during onboarding (#295) * feat(Compliance): query for geo and compliance/screen during onboarding * bump --- build.gradle.kts | 2 +- .../exchange.dydx.abacus/output/Compliance.kt | 27 ++++ .../output/PerpetualState.kt | 1 + .../state/changes/StateChanges.kt | 1 + .../state/manager/StateManagerAdaptor.kt | 120 +++++++++++++++++- .../state/manager/V4StateManagerAdaptor.kt | 13 ++ .../manager/configs/V4StateManagerConfigs.kt | 2 + .../state/model/TradingStateMachine.kt | 6 + .../state/v2/manager/StateManagerAdaptorV2.kt | 1 + .../state/v2/supervisor/AccountSupervisor.kt | 1 + .../app/manager/V4ForegroundCycleTests.kt | 15 +++ .../app/manager/V4RestrictionsTests.kt | 6 +- v4_abacus.podspec | 2 +- 13 files changed, 186 insertions(+), 11 deletions(-) create mode 100644 src/commonMain/kotlin/exchange.dydx.abacus/output/Compliance.kt diff --git a/build.gradle.kts b/build.gradle.kts index 0fa829d04..4273b6a65 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -48,7 +48,7 @@ allprojects { } group = "exchange.dydx.abacus" -version = "1.6.34" +version = "1.6.35" repositories { google() diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/output/Compliance.kt b/src/commonMain/kotlin/exchange.dydx.abacus/output/Compliance.kt new file mode 100644 index 000000000..4a465d7b6 --- /dev/null +++ b/src/commonMain/kotlin/exchange.dydx.abacus/output/Compliance.kt @@ -0,0 +1,27 @@ +package exchange.dydx.abacus.output + +import kotlinx.serialization.Serializable +import kotlin.js.JsExport + +@JsExport +@Serializable +enum class ComplianceStatus(val rawValue: String?) { + COMPLIANT("COMPLIANT"), + FIRST_STRIKE("FIRST_STRIKE"), + CLOSE_ONLY("CLOSE_ONLY"), + BLOCKED("BLOCKED"), + UNKNOWN("UNKNOWN"), + ; + + companion object { + operator fun invoke(rawValue: String?) = + ComplianceStatus.values().firstOrNull { it.rawValue == rawValue } + } +} + +@JsExport +@Serializable +data class Compliance( + val geo: String?, + val status: ComplianceStatus, +) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/output/PerpetualState.kt b/src/commonMain/kotlin/exchange.dydx.abacus/output/PerpetualState.kt index 292e4645f..25d7936e3 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/output/PerpetualState.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/output/PerpetualState.kt @@ -31,6 +31,7 @@ data class PerpetualState( val transferStatuses: IMap?, val restriction: UsageRestriction?, val launchIncentive: LaunchIncentive?, + val compliance: Compliance?, ) { fun assetIds(): IList? { return assets?.keys?.toIList() diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/changes/StateChanges.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/changes/StateChanges.kt index f76477bc1..d06924241 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/changes/StateChanges.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/changes/StateChanges.kt @@ -31,6 +31,7 @@ enum class Changes(val rawValue: String) { transferStatuses("transferStatuses"), input("input"), restriction("restriction"), + compliance("compliance"), launchIncentive("launchIncentive"), ; diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/StateManagerAdaptor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/StateManagerAdaptor.kt index a3adf0663..b4a2848f2 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/StateManagerAdaptor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/StateManagerAdaptor.kt @@ -1,11 +1,6 @@ package exchange.dydx.abacus.state.manager -import exchange.dydx.abacus.output.Notification -import exchange.dydx.abacus.output.PerpetualState -import exchange.dydx.abacus.output.Restriction -import exchange.dydx.abacus.output.SubaccountOrder -import exchange.dydx.abacus.output.TransferRecordType -import exchange.dydx.abacus.output.UsageRestriction +import exchange.dydx.abacus.output.* import exchange.dydx.abacus.output.input.OrderType import exchange.dydx.abacus.output.input.TradeInputGoodUntil import exchange.dydx.abacus.output.input.TriggerOrder @@ -250,6 +245,14 @@ open class StateManagerAdaptor( } } + private var compliance: Compliance = Compliance(null, ComplianceStatus.COMPLIANT) + set(value) { + if (field != value) { + field = value + didSetCompliance(value) + } + } + var subaccountNumber: Int = 0 internal set(value) { if (field != value) { @@ -402,6 +405,7 @@ open class StateManagerAdaptor( open fun didSetReadyToConnect(readyToConnect: Boolean) { if (readyToConnect) { bestEffortConnectIndexer() + fetchGeo() } else { indexerConfig = null } @@ -432,9 +436,11 @@ open class StateManagerAdaptor( } if (sourceAddress != null) { screenSourceAddress() + sourceAddress?.let { complianceScreen(it) } } if (accountAddress != null) { screenAccountAddress() + accountAddress?.let { complianceScreen(it) } retrieveAccount() retrieveAccountHistoricalTradingRewards() } @@ -480,6 +486,7 @@ open class StateManagerAdaptor( subaccountsTimer = null screenAccountAddress() + accountAddress?.let { complianceScreen(it) } retrieveAccountHistoricalTradingRewards() } @@ -491,6 +498,7 @@ open class StateManagerAdaptor( sourceAddressTimer = null sourceAddressRestriction = null screenSourceAddress() + sourceAddress?.let { complianceScreen(it) } } internal open fun didSetSubaccountNumber(subaccountNumber: Int) { @@ -1394,6 +1402,18 @@ open class StateManagerAdaptor( return null } + open fun complianceScreenUrl(address: String): String? { + return null + } + + open fun complianceGeoblockUrl(): String? { + return null + } + + open fun geoUrl(): String? { + return null + } + open fun historicalTradingRewardAggregationsUrl(): String? { return null } @@ -2342,6 +2362,60 @@ open class StateManagerAdaptor( } } + open fun fetchGeo() { + val url = geoUrl() + if (url != null) { + get( + url, + null, + null, + callback = { _, response, httpCode, _ -> + compliance = if (success(httpCode) && response != null) { + val payload = parser.decodeJsonObject(response)?.toIMap() + if (payload != null) { + val country = parser.asString(parser.value(payload, "geo.country")) + Compliance(country, compliance.status) + } else { + Compliance(null, compliance.status) + } + } else { + Compliance(null, compliance.status) + } + }, + ) + } + } + + open fun complianceCheck() { + + } + + + open fun complianceScreen(address: String) { + val url = complianceScreenUrl(address) + if (url != null) { + get( + url, + null, + null, + callback = { _, response, httpCode, _ -> + compliance = if (success(httpCode) && response != null) { + val payload = parser.decodeJsonObject(response)?.toIMap() + if (payload != null) { + val status = parser.asString(payload["status"]) + val complianceStatus = ComplianceStatus.invoke(status) ?: ComplianceStatus.UNKNOWN + Compliance(compliance?.geo, complianceStatus) + } else { + Compliance(compliance?.geo, ComplianceStatus.UNKNOWN) + } + } else { + Compliance(compliance?.geo, ComplianceStatus.UNKNOWN) + } + }, + ) + } + } + open fun screenAccountAddress() { val address = accountAddress if (address != null) { @@ -2468,6 +2542,7 @@ open class StateManagerAdaptor( state?.transferStatuses, restriction, state?.launchIncentive, + state?.compliance, ) ioImplementations.threading?.async(ThreadingType.main) { stateNotification?.stateChanged( @@ -2479,6 +2554,39 @@ open class StateManagerAdaptor( } } + private fun didSetCompliance(compliance: Compliance?) { + val state = stateMachine.state + stateMachine.state = PerpetualState( + state?.assets, + state?.marketsSummary, + state?.orderbooks, + state?.candles, + state?.trades, + state?.historicalFundings, + state?.wallet, + state?.account, + state?.historicalPnl, + state?.fills, + state?.transfers, + state?.fundingPayments, + state?.configs, + state?.input, + state?.availableSubaccountNumbers ?: iListOf(), + state?.transferStatuses, + state?.restriction, + state?.launchIncentive, + compliance, + ) + ioImplementations.threading?.async(ThreadingType.main) { + stateNotification?.stateChanged( + stateMachine.state, + StateChanges( + iListOf(Changes.compliance), + ), + ) + } + } + internal open fun dispose() { stateNotification = null dataNotification = null diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/V4StateManagerAdaptor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/V4StateManagerAdaptor.kt index 26733c2ee..81571e2c2 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/V4StateManagerAdaptor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/V4StateManagerAdaptor.kt @@ -246,6 +246,19 @@ class V4StateManagerAdaptor( return configs.publicApiUrl("screen") } + override fun geoUrl(): String { + return "https://api.dydx.exchange/v4/geo" + } + + override fun complianceScreenUrl(address: String): String? { + val url = configs.publicApiUrl("complianceScreen") ?: return null + return "$url/$address" + } + + override fun complianceGeoblockUrl(): String? { + return configs.publicApiUrl("complianceGeoblock") + } + override fun historicalTradingRewardAggregationsUrl(): String? { val url = configs.privateApiUrl("historicalTradingRewardAggregations") return if (accountAddress != null && url != null) { diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/configs/V4StateManagerConfigs.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/configs/V4StateManagerConfigs.kt index e5d4219f7..07d101b55 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/configs/V4StateManagerConfigs.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/configs/V4StateManagerConfigs.kt @@ -26,6 +26,8 @@ class V4StateManagerConfigs( "account":"/v4/addresses", "time":"/v4/time", "screen":"/v4/screen", + "complianceScreen":"/v4/compliance/screen", + "complianceGeoblock":"/v4/compliance/geoblock", "height":"/v4/height" }, "private":{ 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 c4c17e350..de8eb4cd9 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine.kt @@ -640,6 +640,10 @@ open class TradingStateMachine( Logger.d { "Restriction is handled separately and shouldn't have gone through here" } false } + Changes.compliance -> { + Logger.d { "Compliance is handled separately and shouldn't have gone through here" } + false + } } if (didChange) { realChanges.add(change) @@ -969,6 +973,7 @@ open class TradingStateMachine( var transferStatuses = state?.transferStatuses?.toIMutableMap() val restriction = state?.restriction var launchIncentive = state?.launchIncentive + val geo = state?.compliance if (changes.changes.contains(Changes.markets)) { parser.asNativeMap(data?.get("markets"))?.let { @@ -1255,6 +1260,7 @@ open class TradingStateMachine( transferStatuses, restriction, launchIncentive, + geo, ) } diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/StateManagerAdaptorV2.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/StateManagerAdaptorV2.kt index d4786d477..42cc8130c 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/StateManagerAdaptorV2.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/StateManagerAdaptorV2.kt @@ -553,6 +553,7 @@ internal class StateManagerAdaptorV2( state?.transferStatuses, restriction, state?.launchIncentive, + state?.compliance, ) ioImplementations.threading?.async(ThreadingType.main) { stateNotification?.stateChanged( diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountSupervisor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountSupervisor.kt index 1d28bd377..155534018 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountSupervisor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountSupervisor.kt @@ -743,6 +743,7 @@ internal open class AccountSupervisor( state?.transferStatuses, restriction, state?.launchIncentive, + state?.compliance, ) helper.ioImplementations.threading?.async(ThreadingType.main) { helper.stateNotification?.stateChanged( diff --git a/src/commonTest/kotlin/exchange.dydx.abacus/app/manager/V4ForegroundCycleTests.kt b/src/commonTest/kotlin/exchange.dydx.abacus/app/manager/V4ForegroundCycleTests.kt index 1c6b7f073..0a3a645e3 100644 --- a/src/commonTest/kotlin/exchange.dydx.abacus/app/manager/V4ForegroundCycleTests.kt +++ b/src/commonTest/kotlin/exchange.dydx.abacus/app/manager/V4ForegroundCycleTests.kt @@ -85,6 +85,7 @@ class V4ForegroundCycleTests : NetworkTests() { "https://api.examples.com/configs/documentation.json", "https://indexer.v4staging.dydx.exchange/v4/time", "https://api.examples.com/configs/markets.json", + "https://api.dydx.exchange/v4/geo", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/chains", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/tokens", "https://api.examples.com/configs/exchanges.json", @@ -167,6 +168,7 @@ class V4ForegroundCycleTests : NetworkTests() { "https://api.examples.com/configs/documentation.json", "https://indexer.v4staging.dydx.exchange/v4/time", "https://api.examples.com/configs/markets.json", + "https://api.dydx.exchange/v4/geo", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/chains", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/tokens", "https://api.examples.com/configs/exchanges.json", @@ -218,6 +220,7 @@ class V4ForegroundCycleTests : NetworkTests() { "https://api.examples.com/configs/documentation.json", "https://indexer.v4staging.dydx.exchange/v4/time", "https://api.examples.com/configs/markets.json", + "https://api.dydx.exchange/v4/geo", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/chains", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/tokens", "https://api.examples.com/configs/exchanges.json", @@ -257,6 +260,7 @@ class V4ForegroundCycleTests : NetworkTests() { "https://api.examples.com/configs/documentation.json", "https://indexer.v4staging.dydx.exchange/v4/time", "https://api.examples.com/configs/markets.json", + "https://api.dydx.exchange/v4/geo", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/chains", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/tokens", "https://api.examples.com/configs/exchanges.json", @@ -320,12 +324,14 @@ class V4ForegroundCycleTests : NetworkTests() { "https://api.examples.com/configs/documentation.json", "https://indexer.v4staging.dydx.exchange/v4/time", "https://api.examples.com/configs/markets.json", + "https://api.dydx.exchange/v4/geo", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/chains", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/tokens", "https://api.examples.com/configs/exchanges.json", "https://indexer.v4staging.dydx.exchange/v4/height", "https://dydx.exchange/v4-launch-incentive/query/ccar-perpetuals", "https://indexer.v4staging.dydx.exchange/v4/screen?address=0xsecondaryFakeAddress", + "https://indexer.v4staging.dydx.exchange/v4/compliance/screen/0xsecondaryFakeAddress", "https://indexer.v4staging.dydx.exchange/v4/historicalTradingRewardAggregations/0xsecondaryFakeAddress?period=WEEKLY", "https://indexer.v4staging.dydx.exchange/v4/addresses/0xsecondaryFakeAddress", "https://dydx.exchange/v4-launch-incentive/query/api/dydx/points/0xsecondaryFakeAddress?n=2" @@ -371,12 +377,14 @@ class V4ForegroundCycleTests : NetworkTests() { "https://api.examples.com/configs/documentation.json", "https://indexer.v4staging.dydx.exchange/v4/time", "https://api.examples.com/configs/markets.json", + "https://api.dydx.exchange/v4/geo", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/chains", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/tokens", "https://api.examples.com/configs/exchanges.json", "https://indexer.v4staging.dydx.exchange/v4/height", "https://dydx.exchange/v4-launch-incentive/query/ccar-perpetuals", "https://indexer.v4staging.dydx.exchange/v4/screen?address=cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", + "https://indexer.v4staging.dydx.exchange/v4/compliance/screen/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", "https://indexer.v4staging.dydx.exchange/v4/historicalTradingRewardAggregations/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm?period=WEEKLY", "https://indexer.v4staging.dydx.exchange/v4/addresses/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", "https://indexer.v4staging.dydx.exchange/v4/fills?address=cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm&subaccountNumber=0", @@ -452,12 +460,14 @@ class V4ForegroundCycleTests : NetworkTests() { "https://api.examples.com/configs/documentation.json", "https://indexer.v4staging.dydx.exchange/v4/time", "https://api.examples.com/configs/markets.json", + "https://api.dydx.exchange/v4/geo", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/chains", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/tokens", "https://api.examples.com/configs/exchanges.json", "https://indexer.v4staging.dydx.exchange/v4/height", "https://dydx.exchange/v4-launch-incentive/query/ccar-perpetuals", "https://indexer.v4staging.dydx.exchange/v4/screen?address=cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", + "https://indexer.v4staging.dydx.exchange/v4/compliance/screen/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", "https://indexer.v4staging.dydx.exchange/v4/historicalTradingRewardAggregations/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm?period=WEEKLY", "https://indexer.v4staging.dydx.exchange/v4/addresses/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", "https://indexer.v4staging.dydx.exchange/v4/fills?address=cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm&subaccountNumber=0", @@ -498,12 +508,14 @@ class V4ForegroundCycleTests : NetworkTests() { "https://api.examples.com/configs/documentation.json", "https://indexer.v4staging.dydx.exchange/v4/time", "https://api.examples.com/configs/markets.json", + "https://api.dydx.exchange/v4/geo", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/chains", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/tokens", "https://api.examples.com/configs/exchanges.json", "https://indexer.v4staging.dydx.exchange/v4/height", "https://dydx.exchange/v4-launch-incentive/query/ccar-perpetuals", "https://indexer.v4staging.dydx.exchange/v4/screen?address=cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", + "https://indexer.v4staging.dydx.exchange/v4/compliance/screen/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", "https://indexer.v4staging.dydx.exchange/v4/historicalTradingRewardAggregations/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm?period=WEEKLY", "https://indexer.v4staging.dydx.exchange/v4/addresses/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", "https://indexer.v4staging.dydx.exchange/v4/fills?address=cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm&subaccountNumber=0", @@ -511,6 +523,7 @@ class V4ForegroundCycleTests : NetworkTests() { "https://indexer.v4staging.dydx.exchange/v4/historical-pnl?address=cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm&subaccountNumber=0", "https://dydx.exchange/v4-launch-incentive/query/api/dydx/points/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm?n=2", "https://indexer.v4staging.dydx.exchange/v4/screen?address=cosmos1d67qczf2dz0n30qau2wg893fhpdeekmfu44p4f", + "https://indexer.v4staging.dydx.exchange/v4/compliance/screen/cosmos1d67qczf2dz0n30qau2wg893fhpdeekmfu44p4f", "https://indexer.v4staging.dydx.exchange/v4/historicalTradingRewardAggregations/cosmos1d67qczf2dz0n30qau2wg893fhpdeekmfu44p4f?period=WEEKLY", "https://indexer.v4staging.dydx.exchange/v4/addresses/cosmos1d67qczf2dz0n30qau2wg893fhpdeekmfu44p4f", "https://dydx.exchange/v4-launch-incentive/query/api/dydx/points/cosmos1d67qczf2dz0n30qau2wg893fhpdeekmfu44p4f?n=2" @@ -576,12 +589,14 @@ class V4ForegroundCycleTests : NetworkTests() { "https://api.examples.com/configs/documentation.json", "https://indexer.v4staging.dydx.exchange/v4/time", "https://api.examples.com/configs/markets.json", + "https://api.dydx.exchange/v4/geo", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/chains", "https://squid-api-git-main-cosmos-testnet-0xsquid.vercel.app/v1/tokens", "https://api.examples.com/configs/exchanges.json", "https://indexer.v4staging.dydx.exchange/v4/height", "https://dydx.exchange/v4-launch-incentive/query/ccar-perpetuals", "https://indexer.v4staging.dydx.exchange/v4/screen?address=cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", + "https://indexer.v4staging.dydx.exchange/v4/compliance/screen/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", "https://indexer.v4staging.dydx.exchange/v4/historicalTradingRewardAggregations/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm?period=WEEKLY", "https://indexer.v4staging.dydx.exchange/v4/addresses/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", "https://indexer.v4staging.dydx.exchange/v4/fills?address=cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm&subaccountNumber=0", diff --git a/src/commonTest/kotlin/exchange.dydx.abacus/app/manager/V4RestrictionsTests.kt b/src/commonTest/kotlin/exchange.dydx.abacus/app/manager/V4RestrictionsTests.kt index c23b8e5c5..dc4276f38 100644 --- a/src/commonTest/kotlin/exchange.dydx.abacus/app/manager/V4RestrictionsTests.kt +++ b/src/commonTest/kotlin/exchange.dydx.abacus/app/manager/V4RestrictionsTests.kt @@ -113,14 +113,14 @@ class V4RestrictionsTests { stateManager.adaptor?.stateMachine?.state?.restriction?.restriction, "Expected user restriction", ) - assertEquals(12, testRest?.requests?.size) + assertEquals(14, testRest?.requests?.size) assertEquals( "https://indexer.v4staging.dydx.exchange/v4/screen?address=cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", - testRest?.requests?.get(8), + testRest?.requests?.get(9), ) assertEquals( "https://indexer.v4staging.dydx.exchange/v4/addresses/cosmos1fq8q55896ljfjj7v3x0qd0z3sr78wmes940uhm", - testRest?.requests?.get(10), + testRest?.requests?.get(12), ) testRest?.setResponse( diff --git a/v4_abacus.podspec b/v4_abacus.podspec index 25e040a8f..9178b002d 100644 --- a/v4_abacus.podspec +++ b/v4_abacus.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'v4_abacus' - spec.version = '1.6.34' + spec.version = '1.6.35' spec.homepage = 'https://github.com/dydxprotocol/v4-abacus' spec.source = { :http=> ''} spec.authors = ''