From adc7c3bcb019b3d240055b712285e801793e656f Mon Sep 17 00:00:00 2001 From: Rui Date: Thu, 5 Dec 2024 12:41:18 -0800 Subject: [PATCH 1/2] Fix CCTP status not showing up correctly. --- v4/build.gradle | 2 +- .../shared/viewstate/SharedMarketPositionViewState.kt | 8 +++++--- .../transfer/deposit/DydxTransferDepositCtaButtonModel.kt | 2 +- .../transfer/transferout/DydxTransferOutCtaButtonModel.kt | 2 +- .../withdrawal/DydxTransferWithdrawalCtaButtonModel.kt | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/v4/build.gradle b/v4/build.gradle index 6150a439..e5eb07fb 100644 --- a/v4/build.gradle +++ b/v4/build.gradle @@ -88,7 +88,7 @@ ext { compileSdkVersion = 34 // App dependencies - abacusVersion = '1.13.39' + abacusVersion = '1.13.40' carteraVersion = '0.1.15' kollectionsVersion = '2.0.16' diff --git a/v4/feature/shared/src/main/java/exchange/dydx/trading/feature/shared/viewstate/SharedMarketPositionViewState.kt b/v4/feature/shared/src/main/java/exchange/dydx/trading/feature/shared/viewstate/SharedMarketPositionViewState.kt index 0f87af6f..c20c6242 100644 --- a/v4/feature/shared/src/main/java/exchange/dydx/trading/feature/shared/viewstate/SharedMarketPositionViewState.kt +++ b/v4/feature/shared/src/main/java/exchange/dydx/trading/feature/shared/viewstate/SharedMarketPositionViewState.kt @@ -112,9 +112,11 @@ data class SharedMarketPositionViewState( configs.displayStepSizeDecimals ?: 1, ), notionalTotal = formatter.dollar(notionalTotal, 2), - token = TokenTextView.ViewState( - symbol = asset?.displayableAssetId ?: market.assetId, - ), + token = asset?.displayableAssetId?.let { + TokenTextView.ViewState( + symbol = it + ) + }, side = SideTextView.ViewState( localizer = localizer, coloringOption = SideTextView.ColoringOption.WITH_BACKGROUND, diff --git a/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/deposit/DydxTransferDepositCtaButtonModel.kt b/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/deposit/DydxTransferDepositCtaButtonModel.kt index 116bedf6..d0bea74a 100644 --- a/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/deposit/DydxTransferDepositCtaButtonModel.kt +++ b/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/deposit/DydxTransferDepositCtaButtonModel.kt @@ -158,7 +158,7 @@ class DydxTransferDepositCtaButtonModel @Inject constructor( ).runWithLogs() isSubmittingFlow.value = false - val hash = event.getOrNull() + val hash = event.getOrNull()?.lowercase() if (hash != null) { sendOnboardingAnalytics() transferAnalytics.logDeposit(transferInput) diff --git a/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/transferout/DydxTransferOutCtaButtonModel.kt b/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/transferout/DydxTransferOutCtaButtonModel.kt index 05aea588..e6e443a4 100644 --- a/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/transferout/DydxTransferOutCtaButtonModel.kt +++ b/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/transferout/DydxTransferOutCtaButtonModel.kt @@ -207,7 +207,7 @@ class DydxTransferOutCtaButtonModel @Inject constructor( } } - val hash = transferResult.getOrNull() + val hash = transferResult.getOrNull()?.lowercase() if (hash != null) { abacusStateManager.resetTransferInputFields() transferInstanceStore.addTransferHash( diff --git a/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/withdrawal/DydxTransferWithdrawalCtaButtonModel.kt b/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/withdrawal/DydxTransferWithdrawalCtaButtonModel.kt index 87f53477..1b338842 100644 --- a/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/withdrawal/DydxTransferWithdrawalCtaButtonModel.kt +++ b/v4/feature/transfer/src/main/java/exchange/dydx/trading/feature/transfer/withdrawal/DydxTransferWithdrawalCtaButtonModel.kt @@ -183,7 +183,7 @@ class DydxTransferWithdrawalCtaButtonModel @Inject constructor( } } - val hash = withdrawResult.getOrNull() + val hash = withdrawResult.getOrNull()?.lowercase() if (hash != null) { transferAnalytics.logWithdrawal(transferInput) transferInstanceStore.addTransferHash( From 7645c3f47bfc2325ecdab5c8345af9c51cd057d2 Mon Sep 17 00:00:00 2001 From: Rui Date: Thu, 5 Dec 2024 13:51:47 -0800 Subject: [PATCH 2/2] Lint --- .../feature/shared/viewstate/SharedMarketPositionViewState.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v4/feature/shared/src/main/java/exchange/dydx/trading/feature/shared/viewstate/SharedMarketPositionViewState.kt b/v4/feature/shared/src/main/java/exchange/dydx/trading/feature/shared/viewstate/SharedMarketPositionViewState.kt index c20c6242..5c697957 100644 --- a/v4/feature/shared/src/main/java/exchange/dydx/trading/feature/shared/viewstate/SharedMarketPositionViewState.kt +++ b/v4/feature/shared/src/main/java/exchange/dydx/trading/feature/shared/viewstate/SharedMarketPositionViewState.kt @@ -114,7 +114,7 @@ data class SharedMarketPositionViewState( notionalTotal = formatter.dollar(notionalTotal, 2), token = asset?.displayableAssetId?.let { TokenTextView.ViewState( - symbol = it + symbol = it, ) }, side = SideTextView.ViewState(