Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.7.19: Update parentSubaccountNumber endpoints #361

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ allprojects {
}

group = "exchange.dydx.abacus"
version = "1.7.18"
version = "1.7.19"

repositories {
google()
Expand Down
106 changes: 48 additions & 58 deletions integration/iOS/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class V4StateManagerConfigs(
"historical-pnl":"/v4/historical-pnl",
"transfers":"/v4/transfers",
"historicalTradingRewardAggregations":"/v4/historicalTradingRewardAggregations",
"parent-fills":"/v4/fills/parentSubaccount",
"parent-transfers": "/v4/transfers/parentSubaccount"
"parent-fills":"/v4/fills/parentSubaccountNumber",
"parent-transfers": "/v4/transfers/parentSubaccountNumber"
},
"faucet":{
"faucet":"/faucet/tokens"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ internal class SubaccountSupervisor(
val oldState = stateMachine.state
val url =
helper.configs.privateApiUrl(if (configs.useParentSubaccount) "parent-fills" else "fills")
val params = subaccountParams()
val params = if (configs.useParentSubaccount) parentSubaccountParams() else subaccountParams()
if (url != null) {
helper.get(url, params, null, callback = { _, response, httpCode, _ ->
if (helper.success(httpCode) && response != null) {
Expand All @@ -205,6 +205,15 @@ internal class SubaccountSupervisor(
}
}

private fun parentSubaccountParams(): IMap<String, String> {
val accountAddress = accountAddress
val subaccountNumber = subaccountNumber
return iMapOf(
"address" to accountAddress,
"parentSubaccountNumber" to "$subaccountNumber",
)
}

private fun subaccountParams(): IMap<String, String> {
val accountAddress = accountAddress
val subaccountNumber = subaccountNumber
Expand All @@ -217,7 +226,7 @@ internal class SubaccountSupervisor(
private fun retrieveTransfers() {
val oldState = stateMachine.state
val url = helper.configs.privateApiUrl(if (configs.useParentSubaccount) "parent-transfers" else "transfers")
val params = subaccountParams()
val params = if (configs.useParentSubaccount) parentSubaccountParams() else subaccountParams()
if (url != null) {
helper.get(url, params, null, callback = { _, response, httpCode, _ ->
if (helper.success(httpCode) && response != null) {
Expand Down
2 changes: 1 addition & 1 deletion v4_abacus.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'v4_abacus'
spec.version = '1.7.18'
spec.version = '1.7.19'
spec.homepage = 'https://github.com/dydxprotocol/v4-abacus'
spec.source = { :http=> ''}
spec.authors = ''
Expand Down
Loading