diff --git a/dydx/Podfile.lock b/dydx/Podfile.lock index 49a57f8a9..61b70363e 100644 --- a/dydx/Podfile.lock +++ b/dydx/Podfile.lock @@ -1,6 +1,6 @@ PODS: - - Abacus (1.13.42) - - AmplitudeSwift (1.11.1): + - Abacus (1.13.44) + - AmplitudeSwift (1.11.2): - AnalyticsConnector (~> 1.3.0) - AnalyticsConnector (1.3.1) - AppsFlyerFramework (6.15.3): @@ -379,8 +379,8 @@ CHECKOUT OPTIONS: :git: https://github.com/dydxprotocol/Charts.git SPEC CHECKSUMS: - Abacus: 99c88e582edc8bbd17feab6ab9e2503ba5c4bf2b - AmplitudeSwift: e27c57acea01eceb4684346201ae3817bed5cf52 + Abacus: 696dd5dd93f6abc6cd19d5b9f134ff8f3b220f7c + AmplitudeSwift: ec670fe6f0a0b673bde44b6f02359993cc5513b1 AnalyticsConnector: 3def11199b4ddcad7202c778bde982ec5da0ebb3 AppsFlyerFramework: ad7ff0d22aa36c7f8cc4f71a5424e19b89ccb8ae Atributika: ecedf5259e4aa3c6278d840b6c18d60c1a8b6ca0 diff --git a/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Constants.swift b/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Constants.swift index dc223623d..ac0c78c9c 100644 --- a/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Constants.swift +++ b/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Constants.swift @@ -46,7 +46,7 @@ public enum ServerZone: Int { public struct Constants { static let SDK_LIBRARY = "amplitude-swift" - static let SDK_VERSION = "1.11.1" + static let SDK_VERSION = "1.11.2" public static let DEFAULT_API_HOST = "https://api2.amplitude.com/2/httpapi" public static let EU_DEFAULT_API_HOST = "https://api.eu.amplitude.com/2/httpapi" static let BATCH_API_HOST = "https://api2.amplitude.com/batch" diff --git a/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Types.swift b/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Types.swift index 06a228b98..4bb8ab14d 100644 --- a/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Types.swift +++ b/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Types.swift @@ -157,6 +157,11 @@ public protocol ResponseHandler { func handleTooManyRequestsResponse(data: [String: Any]) func handleTimeoutResponse(data: [String: Any]) func handleFailedResponse(data: [String: Any]) + + // Added on v1.11.2. + // A replacement for handle(result: Result) -> Void + // Return true if some attempts to recover are implemented + func handle(result: Result) -> Bool } extension ResponseHandler { @@ -170,3 +175,11 @@ extension ResponseHandler { return indices } } + +// Provide compatibility for new `handle` function added on v1.11.2. +extension ResponseHandler { + public func handle(result: Result) -> Bool { + let _: Void = handle(result: result) + return false + } +} diff --git a/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Utilities/EventPipeline.swift b/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Utilities/EventPipeline.swift index 611931a8b..ccd509ead 100644 --- a/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Utilities/EventPipeline.swift +++ b/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Utilities/EventPipeline.swift @@ -12,6 +12,8 @@ public class EventPipeline { let storage: Storage? let logger: (any Logger)? let configuration: Configuration + var maxRetryInterval: TimeInterval = 60 + var maxRetryCount: Int = 6 @Atomic internal var eventCount: Int = 0 internal var flushTimer: QueueTimer? @@ -66,7 +68,7 @@ public class EventPipeline { } } - private func sendNextEventFile() { + private func sendNextEventFile(failures: Int = 0) { autoreleasepool { guard currentUpload == nil else { logger?.log(message: "Existing upload in progress, skipping...") @@ -100,14 +102,41 @@ public class EventPipeline { eventBlock: nextEventFile, eventsString: eventsString ) - responseHandler.handle(result: result) - // Don't send the next event file if we're being deallocated - self.uploadsQueue.async { [weak self] in - guard let self = self else { - return + let handled: Bool = responseHandler.handle(result: result) + var failures = failures + + switch result { + case .success: + failures = 0 + case .failure: + if !handled { + failures += 1 + } + } + + if failures > self.maxRetryCount { + self.uploadsQueue.async { + self.currentUpload = nil + } + self.configuration.offline = true + self.logger?.log(message: "Request failed more than \(self.maxRetryCount) times, marking offline") + } else { + // Don't send the next event file if we're being deallocated + let nextFileBlock: () -> Void = { [weak self] in + guard let self = self else { + return + } + self.currentUpload = nil + self.sendNextEventFile(failures: failures) + } + + if failures == 0 || handled { + self.uploadsQueue.async(execute: nextFileBlock) + } else { + let sendingInterval = min(self.maxRetryInterval, pow(2, Double(failures - 1))) + self.uploadsQueue.asyncAfter(deadline: .now() + sendingInterval, execute: nextFileBlock) + self.logger?.debug(message: "Request failed \(failures) times, send next event file in \(sendingInterval) seconds") } - self.currentUpload = nil - self.sendNextEventFile() } } } diff --git a/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Utilities/PersistentStorageResponseHandler.swift b/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Utilities/PersistentStorageResponseHandler.swift index 2d4ea0caf..dcdcef3d6 100644 --- a/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Utilities/PersistentStorageResponseHandler.swift +++ b/dydx/Pods/AmplitudeSwift/Sources/Amplitude/Utilities/PersistentStorageResponseHandler.swift @@ -28,21 +28,22 @@ class PersistentStorageResponseHandler: ResponseHandler { self.eventsString = eventsString } - func handleSuccessResponse(code: Int) { + func handleSuccessResponse(code: Int) -> Bool { guard let events = BaseEvent.fromArrayString(jsonString: eventsString) else { storage.remove(eventBlock: eventBlock) removeEventCallbackByEventsString(eventsString: eventsString) - return + return true } triggerEventsCallback(events: events, code: code, message: "Successfully send event") storage.remove(eventBlock: eventBlock) + return true } - func handleBadRequestResponse(data: [String: Any]) { + func handleBadRequestResponse(data: [String: Any]) -> Bool { guard let events = BaseEvent.fromArrayString(jsonString: eventsString) else { storage.remove(eventBlock: eventBlock) removeEventCallbackByEventsString(eventsString: eventsString) - return + return true } let error = data["error"] as? String ?? "" @@ -55,7 +56,7 @@ class PersistentStorageResponseHandler: ResponseHandler { message: error ) storage.remove(eventBlock: eventBlock) - return + return true } var dropIndexes = Set() @@ -90,13 +91,14 @@ class PersistentStorageResponseHandler: ResponseHandler { } storage.remove(eventBlock: eventBlock) + return true } - func handlePayloadTooLargeResponse(data: [String: Any]) { + func handlePayloadTooLargeResponse(data: [String: Any]) -> Bool { guard let events = BaseEvent.fromArrayString(jsonString: eventsString) else { storage.remove(eventBlock: eventBlock) removeEventCallbackByEventsString(eventsString: eventsString) - return + return true } if events.count == 1 { let error = data["error"] as? String ?? "" @@ -106,28 +108,32 @@ class PersistentStorageResponseHandler: ResponseHandler { message: error ) storage.remove(eventBlock: eventBlock) - return + return true } storage.splitBlock(eventBlock: eventBlock, events: events) + return true } - func handleTooManyRequestsResponse(data: [String: Any]) { + func handleTooManyRequestsResponse(data: [String: Any]) -> Bool { // wait for next time to pick it up + return false } - func handleTimeoutResponse(data: [String: Any]) { + func handleTimeoutResponse(data: [String: Any]) -> Bool { // Wait for next time to pick it up + return false } - func handleFailedResponse(data: [String: Any]) { + func handleFailedResponse(data: [String: Any]) -> Bool { // wait for next time to try again + return false } - func handle(result: Result) { + func handle(result: Result) -> Bool { switch result { case .success(let code): // We don't care about the data when success - handleSuccessResponse(code: code) + return handleSuccessResponse(code: code) case .failure(let error): switch error { case HttpClient.Exception.httpError(let code, let data): @@ -137,20 +143,20 @@ class PersistentStorageResponseHandler: ResponseHandler { } switch code { case HttpClient.HttpStatus.BAD_REQUEST.rawValue: - handleBadRequestResponse(data: json) + return handleBadRequestResponse(data: json) case HttpClient.HttpStatus.PAYLOAD_TOO_LARGE.rawValue: - handlePayloadTooLargeResponse(data: json) + return handlePayloadTooLargeResponse(data: json) case HttpClient.HttpStatus.TIMEOUT.rawValue: - handleTimeoutResponse(data: json) + return handleTimeoutResponse(data: json) case HttpClient.HttpStatus.TOO_MANY_REQUESTS.rawValue: - handleTooManyRequestsResponse(data: json) + return handleTooManyRequestsResponse(data: json) case HttpClient.HttpStatus.FAILED.rawValue: - handleFailedResponse(data: json) + return handleFailedResponse(data: json) default: - handleFailedResponse(data: json) + return handleFailedResponse(data: json) } default: - break + return false } } } @@ -184,3 +190,33 @@ extension PersistentStorageResponseHandler { } } } + +extension PersistentStorageResponseHandler { + func handle(result: Result) { + let _: Bool = handle(result: result) + } + + func handleSuccessResponse(code: Int) { + let _: Bool = handleSuccessResponse(code: code) + } + + func handleBadRequestResponse(data: [String: Any]) { + let _: Bool = handleBadRequestResponse(data: data) + } + + func handlePayloadTooLargeResponse(data: [String: Any]) { + let _: Bool = handlePayloadTooLargeResponse(data: data) + } + + func handleTooManyRequestsResponse(data: [String: Any]) { + let _: Bool = handleTooManyRequestsResponse(data: data) + } + + func handleTimeoutResponse(data: [String: Any]) { + let _: Bool = handleTimeoutResponse(data: data) + } + + func handleFailedResponse(data: [String: Any]) { + let _: Bool = handleFailedResponse(data: data) + } +} diff --git a/dydx/Pods/Local Podspecs/abacus.podspec.json b/dydx/Pods/Local Podspecs/abacus.podspec.json index 9d8c65ed6..719434e5f 100644 --- a/dydx/Pods/Local Podspecs/abacus.podspec.json +++ b/dydx/Pods/Local Podspecs/abacus.podspec.json @@ -1,10 +1,10 @@ { "name": "Abacus", - "version": "1.13.42", + "version": "1.13.44", "homepage": "https://github.com/dydxprotocol/v4-abacus", "source": { "git": "git@github.com:dydxprotocol/v4-abacus.git", - "tag": "v1.13.42" + "tag": "v1.13.44" }, "authors": "", "license": "", @@ -20,7 +20,7 @@ "name": "Build abacus", "execution_position": "before_compile", "shell_path": "/bin/sh", - "script": " if [ \"YES\" = \"$COCOAPODS_SKIP_KOTLIN_BUILD\" ]; then\n echo \"Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"\"\n exit 0\n fi\n set -evx\n \n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \n if [ ! -f $REPO_ROOT/gradlew ]; then\n rm -rf $PRODUCT_MODULE_NAME\n git clone git@github.com:dydxprotocol/v4-abacus.git --branch v1.13.42 $PRODUCT_MODULE_NAME\n \n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n \n # We will need to overwrite the dummy framework generated by cocoapods with the actual one from Kotlin\n \n TARGET_FRAMEWORK=\"${TARGET_BUILD_DIR}/${TARGET_NAME}.framework\"\n ABACUS_FRAMEWORK=\"$REPO_ROOT/build/cocoapods/framework/$PRODUCT_MODULE_NAME.framework\"\n rm -rf $TARGET_FRAMEWORK\n mkdir $TARGET_FRAMEWORK\n cp -rf $ABACUS_FRAMEWORK/* $TARGET_FRAMEWORK\n else\n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n fi\n" + "script": " if [ \"YES\" = \"$COCOAPODS_SKIP_KOTLIN_BUILD\" ]; then\n echo \"Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"\"\n exit 0\n fi\n set -evx\n \n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \n if [ ! -f $REPO_ROOT/gradlew ]; then\n rm -rf $PRODUCT_MODULE_NAME\n git clone git@github.com:dydxprotocol/v4-abacus.git --branch v1.13.44 $PRODUCT_MODULE_NAME\n \n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n \n # We will need to overwrite the dummy framework generated by cocoapods with the actual one from Kotlin\n \n TARGET_FRAMEWORK=\"${TARGET_BUILD_DIR}/${TARGET_NAME}.framework\"\n ABACUS_FRAMEWORK=\"$REPO_ROOT/build/cocoapods/framework/$PRODUCT_MODULE_NAME.framework\"\n rm -rf $TARGET_FRAMEWORK\n mkdir $TARGET_FRAMEWORK\n cp -rf $ABACUS_FRAMEWORK/* $TARGET_FRAMEWORK\n else\n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n fi\n" } ], "platforms": { diff --git a/dydx/Pods/Manifest.lock b/dydx/Pods/Manifest.lock index 49a57f8a9..61b70363e 100644 --- a/dydx/Pods/Manifest.lock +++ b/dydx/Pods/Manifest.lock @@ -1,6 +1,6 @@ PODS: - - Abacus (1.13.42) - - AmplitudeSwift (1.11.1): + - Abacus (1.13.44) + - AmplitudeSwift (1.11.2): - AnalyticsConnector (~> 1.3.0) - AnalyticsConnector (1.3.1) - AppsFlyerFramework (6.15.3): @@ -379,8 +379,8 @@ CHECKOUT OPTIONS: :git: https://github.com/dydxprotocol/Charts.git SPEC CHECKSUMS: - Abacus: 99c88e582edc8bbd17feab6ab9e2503ba5c4bf2b - AmplitudeSwift: e27c57acea01eceb4684346201ae3817bed5cf52 + Abacus: 696dd5dd93f6abc6cd19d5b9f134ff8f3b220f7c + AmplitudeSwift: ec670fe6f0a0b673bde44b6f02359993cc5513b1 AnalyticsConnector: 3def11199b4ddcad7202c778bde982ec5da0ebb3 AppsFlyerFramework: ad7ff0d22aa36c7f8cc4f71a5424e19b89ccb8ae Atributika: ecedf5259e4aa3c6278d840b6c18d60c1a8b6ca0 diff --git a/dydx/Pods/Pods.xcodeproj/project.pbxproj b/dydx/Pods/Pods.xcodeproj/project.pbxproj index ee3411ae1..25812f40a 100644 --- a/dydx/Pods/Pods.xcodeproj/project.pbxproj +++ b/dydx/Pods/Pods.xcodeproj/project.pbxproj @@ -22,10 +22,10 @@ }; 2B2AD932AF1A90828B4DFC5AC6955ADA /* Abacus */ = { isa = PBXAggregateTarget; - buildConfigurationList = EEF0366BFDC1324D72524AA55D378F6F /* Build configuration list for PBXAggregateTarget "Abacus" */; + buildConfigurationList = 15C8D7641FAF8D9A42866F040883DA12 /* Build configuration list for PBXAggregateTarget "Abacus" */; buildPhases = ( - 1140742757E54FD86485A7F824BD8F67 /* [CP-User] Build abacus */, - 3745F473990FD856E3448CF2BA311A2C /* [CP] Copy dSYMs */, + 49CFC8D9D3C752E0969151D63C04319F /* [CP-User] Build abacus */, + B8B760B80B8C128A96C9C8685427889D /* [CP] Copy dSYMs */, ); dependencies = ( ); @@ -24398,7 +24398,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 1140742757E54FD86485A7F824BD8F67 /* [CP-User] Build abacus */ = { + 49CFC8D9D3C752E0969151D63C04319F /* [CP-User] Build abacus */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -24406,40 +24406,40 @@ name = "[CP-User] Build abacus"; runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = " if [ \"YES\" = \"$COCOAPODS_SKIP_KOTLIN_BUILD\" ]; then\n echo \"Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"\"\n exit 0\n fi\n set -evx\n \n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \n if [ ! -f $REPO_ROOT/gradlew ]; then\n rm -rf $PRODUCT_MODULE_NAME\n git clone git@github.com:dydxprotocol/v4-abacus.git --branch v1.13.42 $PRODUCT_MODULE_NAME\n \n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n \n # We will need to overwrite the dummy framework generated by cocoapods with the actual one from Kotlin\n \n TARGET_FRAMEWORK=\"${TARGET_BUILD_DIR}/${TARGET_NAME}.framework\"\n ABACUS_FRAMEWORK=\"$REPO_ROOT/build/cocoapods/framework/$PRODUCT_MODULE_NAME.framework\"\n rm -rf $TARGET_FRAMEWORK\n mkdir $TARGET_FRAMEWORK\n cp -rf $ABACUS_FRAMEWORK/* $TARGET_FRAMEWORK\n else\n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n fi\n"; + shellScript = " if [ \"YES\" = \"$COCOAPODS_SKIP_KOTLIN_BUILD\" ]; then\n echo \"Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"\"\n exit 0\n fi\n set -evx\n \n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \n if [ ! -f $REPO_ROOT/gradlew ]; then\n rm -rf $PRODUCT_MODULE_NAME\n git clone git@github.com:dydxprotocol/v4-abacus.git --branch v1.13.44 $PRODUCT_MODULE_NAME\n \n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n \n # We will need to overwrite the dummy framework generated by cocoapods with the actual one from Kotlin\n \n TARGET_FRAMEWORK=\"${TARGET_BUILD_DIR}/${TARGET_NAME}.framework\"\n ABACUS_FRAMEWORK=\"$REPO_ROOT/build/cocoapods/framework/$PRODUCT_MODULE_NAME.framework\"\n rm -rf $TARGET_FRAMEWORK\n mkdir $TARGET_FRAMEWORK\n cp -rf $ABACUS_FRAMEWORK/* $TARGET_FRAMEWORK\n else\n \"$REPO_ROOT/gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n fi\n"; }; - 3745F473990FD856E3448CF2BA311A2C /* [CP] Copy dSYMs */ = { + 8E8D34C230FC9C9B9E5C6BD6D3637DB3 /* [CP] Copy XCFrameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Abacus/Abacus-copy-dsyms-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/GoogleAppMeasurement/GoogleAppMeasurement-xcframeworks-input-files.xcfilelist", ); - name = "[CP] Copy dSYMs"; + name = "[CP] Copy XCFrameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Abacus/Abacus-copy-dsyms-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/GoogleAppMeasurement/GoogleAppMeasurement-xcframeworks-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Abacus/Abacus-copy-dsyms.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/GoogleAppMeasurement/GoogleAppMeasurement-xcframeworks.sh\"\n"; showEnvVarsInLog = 0; }; - 8E8D34C230FC9C9B9E5C6BD6D3637DB3 /* [CP] Copy XCFrameworks */ = { + B8B760B80B8C128A96C9C8685427889D /* [CP] Copy dSYMs */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/GoogleAppMeasurement/GoogleAppMeasurement-xcframeworks-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Abacus/Abacus-copy-dsyms-input-files.xcfilelist", ); - name = "[CP] Copy XCFrameworks"; + name = "[CP] Copy dSYMs"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/GoogleAppMeasurement/GoogleAppMeasurement-xcframeworks-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Abacus/Abacus-copy-dsyms-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/GoogleAppMeasurement/GoogleAppMeasurement-xcframeworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Abacus/Abacus-copy-dsyms.sh\"\n"; showEnvVarsInLog = 0; }; DB7C100E6D7A5CF954757DB8962D9B72 /* [CP] Copy XCFrameworks */ = { @@ -34260,23 +34260,6 @@ }; name = Debug; }; - 2C091ACCC57DE4D02C088A5373E0305F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3D745CCF4B22CD99369258B46BEC7099 /* Abacus.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; 2C59BD1DF505236F6ED0BD177FC40F56 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 882FE46ED704BB4CD7E834ECB9192AD1 /* Pods-iOS-dydxPresenters.debug.xcconfig */; @@ -34565,24 +34548,6 @@ }; name = Release; }; - 35B8C8CCEC31F60B6A9791BC42EC93F2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5DC709D7414D72BDA4F4BE38D913028A /* Abacus.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; 3709A4D5E586E93C8878F0B7F0AB30DA /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 6E422DFF0F433636D84B3EFC1A1D6DD9 /* GoogleToolboxForMac.release.xcconfig */; @@ -39670,6 +39635,23 @@ }; name = Debug; }; + D0AA477AE3ACEF9C66B2797F0CF96D82 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3D745CCF4B22CD99369258B46BEC7099 /* Abacus.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; D37BA8376F970DA8A2D8CFAFFE486465 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 50EF2E805696FBD14CDC78CCB671EDEC /* SDWebImage.release.xcconfig */; @@ -40216,6 +40198,24 @@ }; name = Release; }; + E5D82864E9CB0DC805E39F4E32184EB9 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5DC709D7414D72BDA4F4BE38D913028A /* Abacus.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; E615F7D22189C285FF4A3E3DB524B447 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 9B4F831E564E173DCEA74EFCA6D0B63E /* SDWebImageSwiftUI.release.xcconfig */; @@ -41310,6 +41310,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 15C8D7641FAF8D9A42866F040883DA12 /* Build configuration list for PBXAggregateTarget "Abacus" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D0AA477AE3ACEF9C66B2797F0CF96D82 /* Debug */, + E5D82864E9CB0DC805E39F4E32184EB9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 1C6D3571E60B17DD013E2F7A4D3FB3BE /* Build configuration list for PBXNativeTarget "Pods-iOS-CameraParticlesTests" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -42264,15 +42273,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - EEF0366BFDC1324D72524AA55D378F6F /* Build configuration list for PBXAggregateTarget "Abacus" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2C091ACCC57DE4D02C088A5373E0305F /* Debug */, - 35B8C8CCEC31F60B6A9791BC42EC93F2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; EFECBE67AF0F011D4E7E5E937331F959 /* Build configuration list for PBXNativeTarget "Pods-iOS-dydxAnalytics" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/dydx/Pods/Target Support Files/AmplitudeSwift/AmplitudeSwift-Info.plist b/dydx/Pods/Target Support Files/AmplitudeSwift/AmplitudeSwift-Info.plist index d08194848..4f11cf48f 100644 --- a/dydx/Pods/Target Support Files/AmplitudeSwift/AmplitudeSwift-Info.plist +++ b/dydx/Pods/Target Support Files/AmplitudeSwift/AmplitudeSwift-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.11.1 + 1.11.2 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/Pods/Target Support Files/AmplitudeSwift/ResourceBundle-Amplitude-AmplitudeSwift-Info.plist b/dydx/Pods/Target Support Files/AmplitudeSwift/ResourceBundle-Amplitude-AmplitudeSwift-Info.plist index 5a7be0ce8..cc15996b1 100644 --- a/dydx/Pods/Target Support Files/AmplitudeSwift/ResourceBundle-Amplitude-AmplitudeSwift-Info.plist +++ b/dydx/Pods/Target Support Files/AmplitudeSwift/ResourceBundle-Amplitude-AmplitudeSwift-Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.11.1 + 1.11.2 CFBundleSignature ???? CFBundleVersion diff --git a/dydx/dydx.xcworkspace/xcshareddata/swiftpm/Package.resolved b/dydx/dydx.xcworkspace/xcshareddata/swiftpm/Package.resolved index 99c0c6f8a..26a4a84b5 100644 --- a/dydx/dydx.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/dydx/dydx.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "4abc8b6e37ddb299948f224ccf7a7ccf9ed6d5156db6de917ea842dc596c3bbf", + "originHash" : "c6d13a8669c6f06bed5cd9f1fcb0fa88055a1be183797745f849e2658b63151d", "pins" : [ { "identity" : "bigint", @@ -16,7 +16,7 @@ "location" : "https://github.com/dydxprotocol/cartera-ios", "state" : { "branch" : "main", - "revision" : "e3e29704ffce1b8d38ba758e6a982bec28e5a06f" + "revision" : "da4dcffc9d295ccbba70d46df26a0d5a5ef45a83" } }, { @@ -151,7 +151,7 @@ "location" : "https://github.com/dydxprotocol/WalletConnectSwiftV2.git", "state" : { "branch" : "develop", - "revision" : "0b269efb6aa088042edf9e64d3c7f4a03a45a778" + "revision" : "0d9a566b375a29fcc36e3ce66824c49925fa72aa" } }, { diff --git a/dydx/dydxCartera/dydxCartera.xcodeproj/project.pbxproj b/dydx/dydxCartera/dydxCartera.xcodeproj/project.pbxproj index bd7c31879..76006c126 100644 --- a/dydx/dydxCartera/dydxCartera.xcodeproj/project.pbxproj +++ b/dydx/dydxCartera/dydxCartera.xcodeproj/project.pbxproj @@ -487,7 +487,7 @@ ); mainGroup = 02439C8129B03E8A00A083FE; packageReferences = ( - 027B64182D0B788C0094C3CB /* XCRemoteSwiftPackageReference "cartera-ios" */, + 02AD39C02D14A28600CF0B70 /* XCRemoteSwiftPackageReference "cartera-ios" */, ); productRefGroup = 02439C8C29B03E8A00A083FE /* Products */; projectDirPath = ""; @@ -979,7 +979,7 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 027B64182D0B788C0094C3CB /* XCRemoteSwiftPackageReference "cartera-ios" */ = { + 02AD39C02D14A28600CF0B70 /* XCRemoteSwiftPackageReference "cartera-ios" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/dydxprotocol/cartera-ios"; requirement = { diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/GlobalWorkers/Workers/dydxCarteraConfigWorker.swift b/dydx/dydxPresenters/dydxPresenters/_v4/GlobalWorkers/Workers/dydxCarteraConfigWorker.swift index 62ec69378..2cc4f780b 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/GlobalWorkers/Workers/dydxCarteraConfigWorker.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/GlobalWorkers/Workers/dydxCarteraConfigWorker.swift @@ -40,6 +40,9 @@ final class dydxCarteraConfigWorker: BaseWorker { } private func configureCartera(environment: V4Environment) { + if let wallets = environment.walletConnection?.walletConnect?.v2?.wallets?.ios { + CarteraConfig.shared.wcModalWallets = wallets + } let config = WalletProvidersConfig(walletConnectV1: nil, walletConnectV2: WalletConnectV2Config(environment: environment), walletSegue: WalletSegueConfig(environment: environment)) diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/MarketInfo/Components/dydxMarketPriceCandlesViewPresenter.swift b/dydx/dydxPresenters/dydxPresenters/_v4/MarketInfo/Components/dydxMarketPriceCandlesViewPresenter.swift index d213e14f9..8f846bff6 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/MarketInfo/Components/dydxMarketPriceCandlesViewPresenter.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/MarketInfo/Components/dydxMarketPriceCandlesViewPresenter.swift @@ -215,10 +215,10 @@ class dydxMarketPriceCandlesViewPresenter: HostedViewPresenter Bool { + guard let object = object as? CandleDataPoint else { return false } + + return barY == object.barY && + candleLabel == object.candleLabel && + candleOpen == object.candleOpen && + candleClose == object.candleClose && + candleHigh == object.candleHigh && + candleLow == object.candleLow && + graphingX == object.graphingX && + lineY == object.lineY && + resolution == object.resolution && + marketCandle == object.marketCandle + } + private lazy var unitInterval: Double = { switch resolution { case .FIVEMINS: diff --git a/podspecs/Abacus.podspec b/podspecs/Abacus.podspec index 2750a4216..ab5b1242f 100644 --- a/podspecs/Abacus.podspec +++ b/podspecs/Abacus.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'Abacus' -spec.version = '1.13.42' +spec.version = '1.13.44' spec.homepage = 'https://github.com/dydxprotocol/v4-abacus' spec.source = { :git => "git@github.com:dydxprotocol/v4-abacus.git", :tag => "v#{spec.version}" } spec.authors = ''