Skip to content

Commit

Permalink
Fix Skip transfer status (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang authored Oct 24, 2024
1 parent df26321 commit bc93ce5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ allprojects {
}

group = "exchange.dydx.abacus"
version = "1.13.11"
version = "1.13.12"

repositories {
google()
Expand Down
1 change: 1 addition & 0 deletions integration/iOS/Pods/Pods.xcodeproj/project.pbxproj

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 @@ -12,8 +12,11 @@ internal class SkipTrackProcessor(
payload: Map<String, Any>
): Map<String, Any>? {
val modified = existing?.mutable() ?: mutableMapOf()
val txHash = parser.asString(payload.get("tx_hash")) ?: return modified
modified[txHash] = true
var txHash = parser.asString(payload.get("tx_hash")) ?: return modified
if (!txHash.startsWith("0x")) {
txHash = "0x$txHash"
}
modified[txHash.lowercase()] = true
return modified
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ internal class OnboardingSupervisor(
hash: String,
fromChainId: String?,
) {
val hash = hash.lowercase()
val oldState = stateMachine.state
// If transfer is not yet tracked, must track first before querying status
val isTracked = oldState?.trackStatuses?.get(hash) == true
Expand Down Expand Up @@ -855,6 +856,10 @@ internal class OnboardingSupervisor(
helper.post(url, null, body.toJsonPrettyPrint()) { _, response, httpCode, _ ->
if (response != null) {
update(stateMachine.routerTrack(response), oldState)
val isTracked = oldState?.trackStatuses?.get(hash) == true
if (isTracked) {
fetchTransferStatusSkip(hash, fromChainId)
}
}
}
}
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.13.11'
spec.version = '1.13.12'
spec.homepage = 'https://github.com/dydxprotocol/v4-abacus'
spec.source = { :http=> ''}
spec.authors = ''
Expand Down

0 comments on commit bc93ce5

Please sign in to comment.