diff --git a/build.gradle.kts b/build.gradle.kts index 33633a851..58eaf22ce 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -52,7 +52,7 @@ allprojects { } group = "exchange.dydx.abacus" -version = "1.10.4" +version = "1.11.0" repositories { google() @@ -257,3 +257,18 @@ tasks.register("v4WebHotSwapTrigger") { commandLine = listOf("./trigger_v4web_reload.sh") } + +tasks.register("updateAbacusPodspec") { + group = "abacus" + + // replace the line "if !Dir.exist?('build/cocoapods/framework/Abacus.framework') || Dir.empty?('build/cocoapods/framework/Abacus.framework')" with "if false" + commandLine = listOf( + "sed", + "-i", + "", + "s/if !Dir.exist?('build\\/cocoapods\\/framework\\/Abacus.framework') || Dir.empty?('build\\/cocoapods\\/framework\\/Abacus.framework')/if false/", + "v4_abacus.podspec" + ) +} + +tasks.get("podspec").finalizedBy("updateAbacusPodspec") \ No newline at end of file diff --git a/bump_version.sh b/bump_version.sh index 09f8eeb28..4fc305650 100755 --- a/bump_version.sh +++ b/bump_version.sh @@ -18,12 +18,5 @@ fi # ./gradlew podspec -# Remove the warning step about ./gradlew :generateDummyFramework, since on iOS we use CocoaPods to -# download the source code and build locally. -PODSPEC_FILE="v4_abacus.podspec" - -# replace the line "if !Dir.exist?('build/cocoapods/framework/Abacus.framework') || Dir.empty?('build/cocoapods/framework/Abacus.framework')" with "if false" -sed -i '' "s/if !Dir.exist?('build\/cocoapods\/framework\/Abacus.framework') || Dir.empty?('build\/cocoapods\/framework\/Abacus.framework')/if false/" $PODSPEC_FILE - cd integration/iOS pod install diff --git a/docs/Account.md b/docs/Account.md index 4bb0522df..6e89f2a9e 100644 --- a/docs/Account.md +++ b/docs/Account.md @@ -266,7 +266,7 @@ An array of [SubaccountOrder](#SubaccountOrder) data class SubaccountOrder(  val subaccountNumber: Int,  val id: String, - val clientId: UInt?, + val clientId: String?,  val type: OrderType,  val side: OrderSide,  val status: OrderStatus, diff --git a/integration/iOS/Pods/Pods.xcodeproj/project.pbxproj b/integration/iOS/Pods/Pods.xcodeproj/project.pbxproj index 56d884654..38cf39861 100644 --- a/integration/iOS/Pods/Pods.xcodeproj/project.pbxproj +++ b/integration/iOS/Pods/Pods.xcodeproj/project.pbxproj @@ -142,26 +142,26 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 8437FCB39ECA4A44D93FCDCBF6066E92 /* PBXContainerItemProxy */ = { + 3E4D9EBB8F897D7BD1BB900F1CB03EFD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 99313990C1D76A6D1D017868B6975CC8; - remoteInfo = CryptoSwift; + remoteGlobalIDString = 469F25E790D19440507BF938A40578A7; + remoteInfo = "Pods-abacus.ios"; }; - F8007D80E43B99904B0E4DD383211363 /* PBXContainerItemProxy */ = { + A9316E3AFEDA79C6BE2E70454904E23B /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = 4084846DAF1774840D25DF1BF2460325; remoteInfo = abacus; }; - F99C8B5A9E9146040BECE7ABFD8E196E /* PBXContainerItemProxy */ = { + D943F129042E36333E484FD2DF373D43 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 469F25E790D19440507BF938A40578A7; - remoteInfo = "Pods-abacus.ios"; + remoteGlobalIDString = 99313990C1D76A6D1D017868B6975CC8; + remoteInfo = CryptoSwift; }; /* End PBXContainerItemProxy section */ @@ -170,6 +170,7 @@ 0105D9F1362588440BA8D3158A228340 /* BlockMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockMode.swift; path = Sources/CryptoSwift/BlockMode/BlockMode.swift; sourceTree = ""; }; 01C66D92921215B5058ADA6FA1523E18 /* SHA2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SHA2.swift; path = Sources/CryptoSwift/SHA2.swift; sourceTree = ""; }; 0449BE88D4D44409CCF0A74B34343D27 /* StreamDecryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamDecryptor.swift; path = Sources/CryptoSwift/StreamDecryptor.swift; sourceTree = ""; }; + 059E5579F867BEB3F7E6DF13DEB1712B /* abacus.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = abacus.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 05F962230C27EB8320B3F9DACAB26666 /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = Sources/CryptoSwift/CS_BigInt/Random.swift; sourceTree = ""; }; 068F760AEB5D19F06497CBD5A01D4B17 /* PBKDF1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF1.swift; path = Sources/CryptoSwift/PKCS/PBKDF1.swift; sourceTree = ""; }; 0744F3E2DBB3A6893AC7B625FCBA2151 /* Generics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generics.swift; path = Sources/CryptoSwift/Generics.swift; sourceTree = ""; }; @@ -190,11 +191,11 @@ 1E34A6EC8D702D85DFC8AB0BCA04D225 /* Pods-abacus.iosTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-abacus.iosTests-acknowledgements.markdown"; sourceTree = ""; }; 233CC871C3B5E5D1C643AA3F5362558A /* DigestType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DigestType.swift; path = Sources/CryptoSwift/DigestType.swift; sourceTree = ""; }; 236DF73D92D4D71C82089CF882764244 /* NoPadding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoPadding.swift; path = Sources/CryptoSwift/NoPadding.swift; sourceTree = ""; }; - 2377C417BE96C2BABD3E1DBC9B1A9D8D /* abacus.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = abacus.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 2653766C82503F31D9367F8E622F8258 /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/CryptoSwift/PKCS/PBKDF2.swift; sourceTree = ""; }; 289CF4084C8BCFCA379CCF7847F8D1F8 /* Blowfish.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blowfish.swift; path = Sources/CryptoSwift/Blowfish.swift; sourceTree = ""; }; 295A5EFDE6FBDDF94AEC568618EF25FE /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = Sources/CryptoSwift/CS_BigInt/Hashable.swift; sourceTree = ""; }; 2A89356D96E998228A503AA1A6E9C626 /* Int+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Extension.swift"; path = "Sources/CryptoSwift/Int+Extension.swift"; sourceTree = ""; }; + 2B743EE4A0C2A395311B213324EB2342 /* abacus.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = abacus.release.xcconfig; sourceTree = ""; }; 311456A9BE6AD331F084E1FCE9FD2109 /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = Sources/CryptoSwift/CS_BigInt/BigUInt.swift; sourceTree = ""; }; 322DD78557BFE4B398A18CBAA3C8A353 /* BlockEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BlockEncryptor.swift; path = Sources/CryptoSwift/BlockEncryptor.swift; sourceTree = ""; }; 33400747830CD0D31E461E6DE1F4500B /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "Sources/CryptoSwift/CS_BigInt/String Conversion.swift"; sourceTree = ""; }; @@ -259,7 +260,6 @@ A7F75F1F8D19379B77CB9B5F20147724 /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "Sources/CryptoSwift/CS_BigInt/Floating Point Conversion.swift"; sourceTree = ""; }; AD93A59528068EF859CFB769EA8A6B21 /* StreamEncryptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StreamEncryptor.swift; path = Sources/CryptoSwift/StreamEncryptor.swift; sourceTree = ""; }; AE9EA384CA84DA00859213076C156601 /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Rabbit+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift"; sourceTree = ""; }; - AF3276B68F8BA3E3862B4F55A9AB6170 /* abacus.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = abacus.release.xcconfig; sourceTree = ""; }; B008B6FE49BB00A27F5C3A8793251FA6 /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = Sources/CryptoSwift/CS_BigInt/Comparable.swift; sourceTree = ""; }; B08BBA0B72E8D4BE9811F9B7F68AA02C /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Blowfish+Foundation.swift"; path = "Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift"; sourceTree = ""; }; B26CFCBE4B1911C8EC2A1C029CEB4E75 /* String+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Extension.swift"; path = "Sources/CryptoSwift/String+Extension.swift"; sourceTree = ""; }; @@ -278,6 +278,7 @@ C74C33FAEC44BEBA526C5472D5CAFD19 /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = Sources/CryptoSwift/CS_BigInt/GCD.swift; sourceTree = ""; }; CAF7CB4BE35649AA1E76DE2396A37E0E /* Pods-abacus.ios-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-abacus.ios-acknowledgements.plist"; sourceTree = ""; }; CE3722C155F5908792FD682A1D84EC9C /* CryptoSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CryptoSwift-Info.plist"; sourceTree = ""; }; + CF5938B823263BBF080C9B21A3470789 /* abacus.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = abacus.debug.xcconfig; sourceTree = ""; }; CF791D3ED0FED5736405B0F135A4B7DA /* Signature.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Signature.swift; path = Sources/CryptoSwift/Signature.swift; sourceTree = ""; }; D0DF4F835FF3BD92DE8F28EF66D11155 /* Pods-abacus.ios-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-abacus.ios-frameworks.sh"; sourceTree = ""; }; D16CC219F5813A4740742BFCB5F17BB3 /* PKCS1v15.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PKCS1v15.swift; path = Sources/CryptoSwift/PKCS/PKCS1v15.swift; sourceTree = ""; }; @@ -305,10 +306,8 @@ F270EDBD5E4E8490F69012237AFEC6CC /* BatchedCollection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BatchedCollection.swift; path = Sources/CryptoSwift/BatchedCollection.swift; sourceTree = ""; }; F37859F4A09B4D8326D98D57FE5A1EE9 /* SecureBytes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SecureBytes.swift; path = Sources/CryptoSwift/SecureBytes.swift; sourceTree = ""; }; F3BBCD0680550B4404763E23B515A31F /* OCB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OCB.swift; path = Sources/CryptoSwift/BlockMode/OCB.swift; sourceTree = ""; }; - F4B1F23DF610F8A9AD9305359993709D /* Abacus.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Abacus.framework; path = build/cocoapods/framework/Abacus.framework; sourceTree = ""; }; F702C9EC7CE0BC75E37AA56B71F7E614 /* AES.Cryptors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.Cryptors.swift; path = Sources/CryptoSwift/AES.Cryptors.swift; sourceTree = ""; }; F81274EDB681F11E7CB05F7DCA2BB33C /* CryptoSwift */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CryptoSwift; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F999223EA515513F8C78AB8A4893AAAD /* abacus.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = abacus.debug.xcconfig; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -339,11 +338,27 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 32C262F4B88173CFDD2E507FF6B0EBF1 /* Support Files */ = { + 2D0B0EF6EDF07ED1C20291E5736D2CD7 /* Development Pods */ = { isa = PBXGroup; children = ( - F999223EA515513F8C78AB8A4893AAAD /* abacus.debug.xcconfig */, - AF3276B68F8BA3E3862B4F55A9AB6170 /* abacus.release.xcconfig */, + 62AAA19B1072508BA39B574A06434036 /* abacus */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + 34798EDB6F1011D15814A373E88BB56F /* Pod */ = { + isa = PBXGroup; + children = ( + 059E5579F867BEB3F7E6DF13DEB1712B /* abacus.podspec */, + ); + name = Pod; + sourceTree = ""; + }; + 471C85CB948067129D79803FD50B3454 /* Support Files */ = { + isa = PBXGroup; + children = ( + CF5938B823263BBF080C9B21A3470789 /* abacus.debug.xcconfig */, + 2B743EE4A0C2A395311B213324EB2342 /* abacus.release.xcconfig */, ); name = "Support Files"; path = "integration/iOS/Pods/Target Support Files/abacus"; @@ -357,12 +372,11 @@ name = iOS; sourceTree = ""; }; - 6CE1150C1C9A0A71A18F30B35568DD8E /* abacus */ = { + 62AAA19B1072508BA39B574A06434036 /* abacus */ = { isa = PBXGroup; children = ( - C3735E810316ABDD783461EE462A964C /* Frameworks */, - 8750F5C2E47D320BFE4309AE82291B48 /* Pod */, - 32C262F4B88173CFDD2E507FF6B0EBF1 /* Support Files */, + 34798EDB6F1011D15814A373E88BB56F /* Pod */, + 471C85CB948067129D79803FD50B3454 /* Support Files */, ); name = abacus; path = ../../..; @@ -394,14 +408,6 @@ name = Products; sourceTree = ""; }; - 8750F5C2E47D320BFE4309AE82291B48 /* Pod */ = { - isa = PBXGroup; - children = ( - 2377C417BE96C2BABD3E1DBC9B1A9D8D /* abacus.podspec */, - ); - name = Pod; - sourceTree = ""; - }; 915C28C583640C124E56AE6BB9F0DAB2 /* CryptoSwift */ = { isa = PBXGroup; children = ( @@ -521,14 +527,6 @@ path = CryptoSwift; sourceTree = ""; }; - A5DC2D324221A781AC0E7A1B4908E26D /* Development Pods */ = { - isa = PBXGroup; - children = ( - 6CE1150C1C9A0A71A18F30B35568DD8E /* abacus */, - ); - name = "Development Pods"; - sourceTree = ""; - }; B284BBC13E1216FA4484D74F45F3F36F /* Pods-abacus.ios */ = { isa = PBXGroup; children = ( @@ -555,19 +553,11 @@ name = "Targets Support Files"; sourceTree = ""; }; - C3735E810316ABDD783461EE462A964C /* Frameworks */ = { - isa = PBXGroup; - children = ( - F4B1F23DF610F8A9AD9305359993709D /* Abacus.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; CF1408CF629C7361332E53B88F7BD30C = { isa = PBXGroup; children = ( 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - A5DC2D324221A781AC0E7A1B4908E26D /* Development Pods */, + 2D0B0EF6EDF07ED1C20291E5736D2CD7 /* Development Pods */, D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, DA389CCA0C382AECE0DD24ED555B7245 /* Pods */, 7D94CDF401128D689D2B11EDCC7ECD3A /* Products */, @@ -648,8 +638,8 @@ buildRules = ( ); dependencies = ( - E8ABF0505B4018EE55DC64051C0E3170 /* PBXTargetDependency */, - CF848ADCA9D462971E67CA041BBB55DD /* PBXTargetDependency */, + 5A2D5CC658950E4A7AEC9150E168E04C /* PBXTargetDependency */, + CB00F4B79F2C6FE352C8E0E376CC0EE4 /* PBXTargetDependency */, ); name = "Pods-abacus.ios"; productName = Pods_abacus_ios; @@ -668,7 +658,7 @@ buildRules = ( ); dependencies = ( - AC2EBD83354400DAA47E7F9069901F4A /* PBXTargetDependency */, + A5DD726974B98C309F8CC82EA812FDEF /* PBXTargetDependency */, ); name = "Pods-abacus.iosTests"; productName = Pods_abacus_iosTests; @@ -898,23 +888,23 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - AC2EBD83354400DAA47E7F9069901F4A /* PBXTargetDependency */ = { + 5A2D5CC658950E4A7AEC9150E168E04C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CryptoSwift; + target = 99313990C1D76A6D1D017868B6975CC8 /* CryptoSwift */; + targetProxy = D943F129042E36333E484FD2DF373D43 /* PBXContainerItemProxy */; + }; + A5DD726974B98C309F8CC82EA812FDEF /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "Pods-abacus.ios"; target = 469F25E790D19440507BF938A40578A7 /* Pods-abacus.ios */; - targetProxy = F99C8B5A9E9146040BECE7ABFD8E196E /* PBXContainerItemProxy */; + targetProxy = 3E4D9EBB8F897D7BD1BB900F1CB03EFD /* PBXContainerItemProxy */; }; - CF848ADCA9D462971E67CA041BBB55DD /* PBXTargetDependency */ = { + CB00F4B79F2C6FE352C8E0E376CC0EE4 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = abacus; target = 4084846DAF1774840D25DF1BF2460325 /* abacus */; - targetProxy = F8007D80E43B99904B0E4DD383211363 /* PBXContainerItemProxy */; - }; - E8ABF0505B4018EE55DC64051C0E3170 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = CryptoSwift; - target = 99313990C1D76A6D1D017868B6975CC8 /* CryptoSwift */; - targetProxy = 8437FCB39ECA4A44D93FCDCBF6066E92 /* PBXContainerItemProxy */; + targetProxy = A9316E3AFEDA79C6BE2E70454904E23B /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -958,7 +948,7 @@ }; 22B0388248EDA44270493DDECC58CF78 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AF3276B68F8BA3E3862B4F55A9AB6170 /* abacus.release.xcconfig */; + baseConfigurationReference = 2B743EE4A0C2A395311B213324EB2342 /* abacus.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -1048,7 +1038,7 @@ }; 5B331F72A7F4402311EBC4A06282E60D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F999223EA515513F8C78AB8A4893AAAD /* abacus.debug.xcconfig */; + baseConfigurationReference = CF5938B823263BBF080C9B21A3470789 /* abacus.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; diff --git a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Debug-input-files.xcfilelist b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Debug-input-files.xcfilelist index fde154c0b..5a72e622a 100644 --- a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Debug-input-files.xcfilelist +++ b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Debug-input-files.xcfilelist @@ -1,3 +1,2 @@ ${PODS_ROOT}/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks.sh -${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework -${PODS_ROOT}/../../../build/cocoapods/framework/Abacus.framework \ No newline at end of file +${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework \ No newline at end of file diff --git a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Debug-output-files.xcfilelist b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Debug-output-files.xcfilelist index d4b327f7e..60ae66013 100644 --- a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Debug-output-files.xcfilelist +++ b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Debug-output-files.xcfilelist @@ -1,2 +1 @@ -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Abacus.framework \ No newline at end of file +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework \ No newline at end of file diff --git a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Release-input-files.xcfilelist b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Release-input-files.xcfilelist index fde154c0b..5a72e622a 100644 --- a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Release-input-files.xcfilelist +++ b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Release-input-files.xcfilelist @@ -1,3 +1,2 @@ ${PODS_ROOT}/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks.sh -${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework -${PODS_ROOT}/../../../build/cocoapods/framework/Abacus.framework \ No newline at end of file +${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework \ No newline at end of file diff --git a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Release-output-files.xcfilelist b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Release-output-files.xcfilelist index d4b327f7e..60ae66013 100644 --- a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Release-output-files.xcfilelist +++ b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks-Release-output-files.xcfilelist @@ -1,2 +1 @@ -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Abacus.framework \ No newline at end of file +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework \ No newline at end of file diff --git a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks.sh b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks.sh index 91b03c4c7..87d4632ad 100755 --- a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks.sh +++ b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios-frameworks.sh @@ -177,11 +177,9 @@ code_sign_if_enabled() { if [[ "$CONFIGURATION" == "Debug" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework" - install_framework "${PODS_ROOT}/../../../build/cocoapods/framework/Abacus.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework" - install_framework "${PODS_ROOT}/../../../build/cocoapods/framework/Abacus.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait diff --git a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios.debug.xcconfig b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios.debug.xcconfig index bb1b3d88e..465909b2f 100644 --- a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios.debug.xcconfig +++ b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios.debug.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_ROOT}/../../../build/cocoapods/framework" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -l"c++" -framework "Abacus" -framework "CryptoSwift" +OTHER_LDFLAGS = $(inherited) -l"c++" -framework "CryptoSwift" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios.release.xcconfig b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios.release.xcconfig index bb1b3d88e..465909b2f 100644 --- a/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios.release.xcconfig +++ b/integration/iOS/Pods/Target Support Files/Pods-abacus.ios/Pods-abacus.ios.release.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_ROOT}/../../../build/cocoapods/framework" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -l"c++" -framework "Abacus" -framework "CryptoSwift" +OTHER_LDFLAGS = $(inherited) -l"c++" -framework "CryptoSwift" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/integration/iOS/Pods/Target Support Files/Pods-abacus.iosTests/Pods-abacus.iosTests.debug.xcconfig b/integration/iOS/Pods/Target Support Files/Pods-abacus.iosTests/Pods-abacus.iosTests.debug.xcconfig index fca5da53c..48b7be218 100644 --- a/integration/iOS/Pods/Target Support Files/Pods-abacus.iosTests/Pods-abacus.iosTests.debug.xcconfig +++ b/integration/iOS/Pods/Target Support Files/Pods-abacus.iosTests/Pods-abacus.iosTests.debug.xcconfig @@ -1,8 +1,8 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_ROOT}/../../../build/cocoapods/framework" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" -OTHER_LDFLAGS = $(inherited) -l"c++" -framework "Abacus" -framework "CryptoSwift" +OTHER_LDFLAGS = $(inherited) -l"c++" -framework "CryptoSwift" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/integration/iOS/Pods/Target Support Files/Pods-abacus.iosTests/Pods-abacus.iosTests.release.xcconfig b/integration/iOS/Pods/Target Support Files/Pods-abacus.iosTests/Pods-abacus.iosTests.release.xcconfig index fca5da53c..48b7be218 100644 --- a/integration/iOS/Pods/Target Support Files/Pods-abacus.iosTests/Pods-abacus.iosTests.release.xcconfig +++ b/integration/iOS/Pods/Target Support Files/Pods-abacus.iosTests/Pods-abacus.iosTests.release.xcconfig @@ -1,8 +1,8 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" "${PODS_ROOT}/../../../build/cocoapods/framework" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.framework/Headers" -OTHER_LDFLAGS = $(inherited) -l"c++" -framework "Abacus" -framework "CryptoSwift" +OTHER_LDFLAGS = $(inherited) -l"c++" -framework "CryptoSwift" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/integration/iOS/Pods/Target Support Files/abacus/abacus.debug.xcconfig b/integration/iOS/Pods/Target Support Files/abacus/abacus.debug.xcconfig index b7f6dcfae..954328169 100644 --- a/integration/iOS/Pods/Target Support Files/abacus/abacus.debug.xcconfig +++ b/integration/iOS/Pods/Target Support Files/abacus/abacus.debug.xcconfig @@ -1,6 +1,5 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/abacus -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../../build/cocoapods/framework" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 KOTLIN_PROJECT_PATH = OTHER_LDFLAGS = $(inherited) -l"c++" diff --git a/integration/iOS/Pods/Target Support Files/abacus/abacus.release.xcconfig b/integration/iOS/Pods/Target Support Files/abacus/abacus.release.xcconfig index b7f6dcfae..954328169 100644 --- a/integration/iOS/Pods/Target Support Files/abacus/abacus.release.xcconfig +++ b/integration/iOS/Pods/Target Support Files/abacus/abacus.release.xcconfig @@ -1,6 +1,5 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/abacus -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../../build/cocoapods/framework" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 KOTLIN_PROJECT_PATH = OTHER_LDFLAGS = $(inherited) -l"c++" diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/output/account/SubaccountOrder.kt b/src/commonMain/kotlin/exchange.dydx.abacus/output/account/SubaccountOrder.kt index d11f1ded5..80109ce95 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/output/account/SubaccountOrder.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/output/account/SubaccountOrder.kt @@ -16,7 +16,7 @@ import kotlinx.serialization.Serializable data class SubaccountOrder( val subaccountNumber: Int?, val id: String, - val clientId: UInt?, + val clientId: String?, val type: OrderType, val side: OrderSide, val status: OrderStatus, @@ -56,7 +56,7 @@ data class SubaccountOrder( // TODO: Remove default to 0 for subaccountNumber once new indexer response is consumed. Prevents breaking change val subaccountNumber = parser.asInt(data["subaccountNumber"]) ?: 0 val id = parser.asString(data["id"]) - val clientId = parser.asUInt(data["clientId"]) + val clientId = parser.asString(data["clientId"]) val marketId = parser.asString(data["marketId"]) val displayId = parser.asString(data["displayId"]) val clobPairId = parser.asInt(data["clobPairId"]) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessor.kt index 5a0a15e2a..78676d2b4 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessor.kt @@ -259,7 +259,7 @@ internal class OrderProcessor( val order = SubaccountOrder( subaccountNumber = orderSubaccountNumber, id = id, - clientId = parser.asUInt(payload.clientId), + clientId = parser.asString(payload.clientId), type = type, side = side, status = modifiedStatus, diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/protocols/ParserProtocol.kt b/src/commonMain/kotlin/exchange.dydx.abacus/protocols/ParserProtocol.kt index c116a318e..4b4299a29 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/protocols/ParserProtocol.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/protocols/ParserProtocol.kt @@ -24,9 +24,6 @@ interface ParserProtocol { // parse a field to int fun asInt(data: Any?): Int? - // parse a field to unsigned int - fun asUInt(data: Any?): UInt? - // parse a field to int fun asLong(data: Any?): Long? diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/utils/ClientId.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/utils/ClientId.kt index 9840e5af7..715445fb3 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/utils/ClientId.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/utils/ClientId.kt @@ -5,5 +5,10 @@ import kotlin.random.nextUInt object ClientId { - fun generate() = Random.nextUInt() + /** + * Client ID on the protocol is a fixed32. And is returned from the indexer as an unsigned int string. + * + * This value is returned as a String for compaitiblity with JS. JS number seems to always interpret as signed. + */ + fun generate() = Random.nextUInt().toString() } diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/utils/Payloads.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/utils/Payloads.kt index 8246f5e8c..6c8ddef58 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/utils/Payloads.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/utils/Payloads.kt @@ -18,7 +18,7 @@ data class FaucetRecord( data class PlaceOrderRecord( val subaccountNumber: Int, - val clientId: UInt, + val clientId: String, val timestampInMilliseconds: Double, val fromSlTpDialog: Boolean, var lastOrderStatus: OrderStatus?, @@ -27,14 +27,14 @@ data class PlaceOrderRecord( data class CancelOrderRecord( val subaccountNumber: Int, - val clientId: UInt, + val clientId: String, val timestampInMilliseconds: Double, val fromSlTpDialog: Boolean, ) data class IsolatedPlaceOrderRecord( val subaccountNumber: Int, - val clientId: UInt, + val clientId: String, val destinationSubaccountNumber: Int, ) @@ -53,7 +53,7 @@ data class PlaceOrderMarketInfo( data class HumanReadablePlaceOrderPayload( val subaccountNumber: Int, val marketId: String, - val clientId: UInt, + val clientId: String, val type: String, val side: String, val price: Double, @@ -76,7 +76,7 @@ data class HumanReadableCancelOrderPayload( val subaccountNumber: Int, val type: String, val orderId: String, - val clientId: UInt, + val clientId: String, val orderFlags: Int, val clobPairId: Int, val goodTilBlock: Int?, diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine+Account.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine+Account.kt index a312afbc5..2fc21cb49 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine+Account.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/model/TradingStateMachine+Account.kt @@ -1,7 +1,6 @@ package exchange.dydx.abacus.state.model import exchange.dydx.abacus.output.account.SubaccountOrder -import exchange.dydx.abacus.output.input.OrderStatus import exchange.dydx.abacus.responses.StateResponse import exchange.dydx.abacus.state.changes.Changes import exchange.dydx.abacus.state.changes.StateChanges @@ -76,22 +75,7 @@ internal fun TradingStateMachine.updateHeight( } internal fun TradingStateMachine.findOrder( - orderId: String, - subaccountNumber: Int, -): SubaccountOrder? { - val subaccount = state?.subaccount(subaccountNumber) ?: return null - val orders = subaccount.orders ?: return null - val order = orders.firstOrNull { - it.id == orderId - } ?: return null - return when (order.status) { - OrderStatus.Open, OrderStatus.Pending, OrderStatus.Untriggered -> order - else -> null - } -} - -internal fun TradingStateMachine.findOrder( - clientId: UInt, + clientId: String, subaccountNumber: Int, ): SubaccountOrder? { val subaccount = state?.subaccount(subaccountNumber) ?: return null diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/SubaccountTransactionSupervisor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/SubaccountTransactionSupervisor.kt index 550127f5a..711da2531 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/SubaccountTransactionSupervisor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/SubaccountTransactionSupervisor.kt @@ -72,7 +72,7 @@ internal class SubaccountTransactionSupervisor( private val pendingIsolatedOrderRecords: IMutableList = iMutableListOf() - private var lastOrderClientId: UInt? = null + private var lastOrderClientId: String? = null set(value) { if (field != value) { field = value diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/utils/AnalyticsUtils.kt b/src/commonMain/kotlin/exchange.dydx.abacus/utils/AnalyticsUtils.kt index 57e2e10b4..317240d75 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/utils/AnalyticsUtils.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/utils/AnalyticsUtils.kt @@ -36,10 +36,10 @@ class AnalyticsUtils { val stopLossOrderTypes = listOf(OrderType.StopMarket, OrderType.StopLimit) val takeProfitOrderTypes = listOf(OrderType.TakeProfitMarket, OrderType.TakeProfitLimit) - var stopLossOrderCancelClientId: UInt? = null - var stopLossOrderPlaceClientId: UInt? = null - var takeProfitOrderCancelClientId: UInt? = null - var takeProfitOrderPlaceClientId: UInt? = null + var stopLossOrderCancelClientId: String? = null + var stopLossOrderPlaceClientId: String? = null + var takeProfitOrderCancelClientId: String? = null + var takeProfitOrderPlaceClientId: String? = null var stopLossOrderAction: TriggerOrderAction? = null var takeProfitOrderAction: TriggerOrderAction? = null diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/utils/Parser.kt b/src/commonMain/kotlin/exchange.dydx.abacus/utils/Parser.kt index f5f3620eb..dc84b2918 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/utils/Parser.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/utils/Parser.kt @@ -216,49 +216,6 @@ class Parser : ParserProtocol { return null } - override fun asUInt(data: Any?): UInt? { - val jsonLiteral = data as? JsonPrimitive - if (jsonLiteral != null) { - return jsonLiteral.longOrNull?.toUInt() - } - - val long = data as? Long - if (long != null) { - return long.toUInt() - } - - val int = data as? Int - if (int != null) { - return int.toUInt() - } - - val float = data as? Float - if (float != null) { - return float.toUInt() - } - - val double = data as? Double - if (double != null) { - return double.toUInt() - } - - val decimal = data as? BigDecimal - if (decimal != null) { - return decimal.doubleValue(false).toUInt() - } - - val string = data as? String - if (string != null) { - return try { - string.toUInt() - } catch (e: Exception) { - null - } - } - - return null - } - override fun asLong(data: Any?): Long? { val jsonLiteral = data as? JsonPrimitive if (jsonLiteral != null) { diff --git a/src/commonTest/kotlin/exchange.dydx.abacus/app/helper/TriggerOrderToastGeneratorTests.kt b/src/commonTest/kotlin/exchange.dydx.abacus/app/helper/TriggerOrderToastGeneratorTests.kt index d772c95d4..c46aef914 100644 --- a/src/commonTest/kotlin/exchange.dydx.abacus/app/helper/TriggerOrderToastGeneratorTests.kt +++ b/src/commonTest/kotlin/exchange.dydx.abacus/app/helper/TriggerOrderToastGeneratorTests.kt @@ -140,7 +140,7 @@ class TriggerOrderToastGeneratorTests { cancelOrderPayloads = iListOf( HumanReadableCancelOrderPayload( subaccountNumber = 0, - clientId = 0u, + clientId = "0", type = "TAKE_PROFIT", orderId = "existingOrderId", orderFlags = SHORT_TERM_ORDER_FLAGS, @@ -153,7 +153,7 @@ class TriggerOrderToastGeneratorTests { HumanReadablePlaceOrderPayload( subaccountNumber = 0, marketId = "ETH-USD", - clientId = 0u, + clientId = "0", type = "STOP_LIMIT", side = "buy", price = 1000.0, @@ -212,7 +212,7 @@ class TriggerOrderToastGeneratorTests { cancelOrderPayloads = iListOf( HumanReadableCancelOrderPayload( subaccountNumber = 0, - clientId = 0u, + clientId = "0", type = "TAKE_PROFIT", orderId = "existingOrderId", orderFlags = SHORT_TERM_ORDER_FLAGS, @@ -244,7 +244,7 @@ class TriggerOrderToastGeneratorTests { HumanReadablePlaceOrderPayload( subaccountNumber = 0, marketId = "ETH-USD", - clientId = 0u, + clientId = "0", type = "TAKE_PROFIT_MARKET", side = "buy", price = 1000.0, @@ -298,7 +298,7 @@ class TriggerOrderToastGeneratorTests { HumanReadableCancelOrderPayload( subaccountNumber = 0, type = "TAKE_PROFIT", - clientId = 0u, + clientId = "0", orderId = "existingOrderId", orderFlags = SHORT_TERM_ORDER_FLAGS, clobPairId = 0, diff --git a/src/commonTest/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessorTests.kt b/src/commonTest/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessorTests.kt index 617123c37..64daa9b80 100644 --- a/src/commonTest/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessorTests.kt +++ b/src/commonTest/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessorTests.kt @@ -40,7 +40,7 @@ class OrderProcessorTests { val orderMock = SubaccountOrder( subaccountNumber = 0, id = "1", - clientId = 1u, + clientId = "1", type = OrderType.Limit, side = OrderSide.Buy, status = OrderStatus.Open, diff --git a/v4_abacus.podspec b/v4_abacus.podspec index 4a3981480..b3c4f5eb1 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.10.4' + spec.version = '1.11.0' spec.homepage = 'https://github.com/dydxprotocol/v4-abacus' spec.source = { :http=> ''} spec.authors = ''