-
Notifications
You must be signed in to change notification settings - Fork 2
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
MOB-440 TP/SL order submission and data binding #63
Conversation
MOB-440 add TL/SL inputs to price triggers panel screen (multiple order exist) (Android)
enable state for input area where multiple orders exist |
v4/build.gradle
Outdated
@@ -89,7 +89,7 @@ ext { | |||
compileSdkVersion = 34 | |||
|
|||
// App dependencies | |||
abacusVersion = '1.6.30' | |||
abacusVersion = '1.6.36' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TOL: shouldn't we bump Abacus in a separate PR? that way we can isolate issues easier in a git-bisect if we need to?
platformInfo = viewModel.platformInfo, | ||
) { | ||
Content(Modifier, state) | ||
Content(modifier, state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is wrong, PlatformInfoScaffold
is the top-level composable here, and therefore should take in the passed in modifier
. Content()
should continue to take in a new Modifier
.
...eature/trade/src/main/java/exchange/dydx/trading/feature/trade/streams/TriggerOrderStream.kt
Show resolved
Hide resolved
val isNewTriggerOrder: Flow<Boolean> | ||
} | ||
|
||
interface MutableTriggerOrderStreaming : TriggerOrderStreaming { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TOL MutableTriggerOrderStreaming
naming here doesn't seem like it fits? The Mutable
naming seems to imply that it is able to write values directly to the flows declared in TriggerOrderStreaming
, but that is not the case. This interface simply exposes methods related to Trigger Orders.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mutable here means the functions that mutates the state (either internal state or abacus state).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i guess what feels weird to me about this class generally is that it's not purely a stream. it has other business logic, that feels like it should either be extracted to the viewmodel or another use-case if used in multiple viewmodels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove the abacus update calls to keep it simple.
private val _takeProfitGainLossDisplayType = MutableStateFlow(GainLossDisplayType.Amount) | ||
private val _stopLossGainLossDisplayType = MutableStateFlow(GainLossDisplayType.Amount) | ||
|
||
private val streamScope = MainScope() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rebase on my PR and use @CoroutineScopes.App
class TriggerOrderStream @Inject constructor( | ||
val abacusStateManager: AbacusStateManagerProtocol, | ||
) : MutableTriggerOrderStreaming { | ||
override val submissionStatus get() = _submissionStatus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need a getter, can just use =
for these
override fun setMarketId(marketId: String) { | ||
abacusStateManager.setMarket(marketId = marketId) | ||
abacusStateManager.triggerOrders(input = marketId, type = TriggerOrdersInputField.marketId) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method seems out of place here, can we extract this to a different object?
override fun submitTriggerOrders() { | ||
_submissionStatus.update { null } | ||
streamScope.launch { | ||
abacusStateManager.commitTriggerOrders { submissionStatus -> | ||
_submissionStatus.update { submissionStatus } | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again this feels like this object is doing too much - can we extract to another object?
...eature/trade/src/main/java/exchange/dydx/trading/feature/trade/streams/TriggerOrderStream.kt
Show resolved
Hide resolved
...eature/trade/src/main/java/exchange/dydx/trading/feature/trade/streams/TriggerOrderStream.kt
Show resolved
Hide resolved
OnLifecycleEvent { _, event -> | ||
if (event == Lifecycle.Event.ON_STOP) { | ||
state?.backHandler?.invoke() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems very hacky / sus to me. What issue is this solving?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When leaving a screen, state needs to be cleaned up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you expand on that? the part that seems weird to me here is listening to ON_STOP
. maybe there's a piece of the architecture that i'm missing. in a single activity app, ON_STOP
should only get triggered when the app is killed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ON_STOP gets triggered when view gets dismissed. There might be other ways to detect this, but I found this online and it seems to work fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you remember where you found it? Just curious, I checked a few documentation sources and can't reason through why this works.
PlatformInfoScaffold( | ||
platformInfo = viewModel.platformInfo, | ||
) { | ||
Content(modifier, state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again modifier
should be passed into PlatformInfoScaffold
, not Content()
...trade/src/main/java/exchange/dydx/trading/feature/trade/trigger/DydxTriggerOrderInputView.kt
Outdated
Show resolved
Hide resolved
.themeColor(ThemeColor.SemanticColor.text_secondary), | ||
) | ||
Row( | ||
modifier = modifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modifier
) { position, takeProfitOrders, stopLossOrders, triggerOrdersInput -> | ||
updateAbacusTriggerOrder(position, takeProfitOrders, stopLossOrders, triggerOrdersInput) | ||
} | ||
.launchIn(viewModelScope) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use viewModelScope
. Inject @CoroutineScopes.ViewModel
instead.
} | ||
} | ||
.distinctUntilChanged() | ||
.launchIn(viewModelScope) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again don't use viewModelScope
@Composable | ||
fun OnLifecycleEvent(onEvent: (owner: LifecycleOwner, event: Lifecycle.Event) -> Unit) { | ||
val eventHandler = rememberUpdatedState(onEvent) | ||
val lifecycleOwner = rememberUpdatedState(LocalLifecycleOwner.current) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prashanDYDX See implementation. lifecycleOwner
is the View, so it makes sense that ON_STOP gets called when the view is about to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
View
in Android means something specific, and they are not lifecycleOwner
s. Generally, LifecycleOwners are Activities or Fragments. And in our architecture, I would assume LocalLifecyleOwner.current
maps to our single activity. ON_STOP also has a very specific meaning in the activity lifecycle: https://developer.android.com/static/codelabs/android-fundamentals-02-2-activity-lifecycle-and-state/img/59d40f71d715436_1920.png
I'm wondering if maybe Compose Navigation is creating a new lifecycle owner somewhere?
oh wait - you forgot to fix the viewModelScopes, can you fix those? (can do in a follow up if you want) |
It's fine.. It's injected with @CoroutineScopes.ViewModel private val
viewModelScope: CoroutineScope. .. just the same var name
…On Thu, Apr 11, 2024 at 5:23 PM Prashan Dharmasena ***@***.***> wrote:
oh wait - you forgot to fix the viewModelScopes, can you fix those? (can
do in a follow up if you want)
—
Reply to this email directly, view it on GitHub
<#63 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYNVECUPISB3J7OIUZ2XMZDY44SOPAVCNFSM6AAAAABF5WCDTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJQG42TMOBUGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Ah kk weird, I think I was maybe looking at old changes. |
* Update .gitignore to ignore all .idea files and all build directories. (#20) * Turn on Gradle parallel execution and caching. * Add "app_deployment" key (#21) * Add "app_deployment" key * Lint * Initial setup of StrictMode - only logging in debug. (#22) * Initial setup of StrictMode - only logging in debug. * Revert injection changes * Use limitedParallelism and MainScope() in AbacusThreadingImp. (#25) * Handle exception with invalid URLs (#26) * MOB-348 Show Squid routing error on deposit/withdrawal (#28) * Update AppModule.kt and used dependencies to follow Dagger Best Practices guide (in Notion). (#27) * Correlate x-request-id to correlate route requests from Squid transactions (#23) * Fix build (#29) * MOB-362: Some url links don't work with the deployment build (#31) * Test * Check for deeplink path during routing * Clean up * Clean up * Update rest of Dagger modules to follow best practices. (#30) * Remove network selector from settings for release build (#33) * MOB-363: Android: "System" theme setting not working (#32) * Observe system theme * Recompose when theme changes * Fix a crash on url tapping (#34) * Remove hardcoded scheme in the setting links. (#35) * Add Firebase Performance monitoring. (#37) * Bump Abacus and update the system link. (#36) * Fix the release build issue of wallet amount not showing up on deposit (#38) * Fix Subaccount transfer for France (#39) * Fix Subaccount transfer for France * Lint * Update function name to be consistent with iOS * Clean up the start-up sequence (#41) * Clean up the start-up sequence * Lint * Update Cartera and WalletConnnect to the latest version (#40) * Update Cartera * Lint * Add comments * MOB-285: Call startTrade() after setMarket() (#43) * Update the v4-native-client.js to replace # with ___ (#42) * Add script * Update v4-client.js * Safer replacement * Safer replacement * Move startWorkers back to Activity.onCreate() (#44) * Move startWorkers back to Activity.start() * Comment * MOB-410 Add tracking for onboarding, transfer, wallet connection (#46) * Adding Onboarding/Transfer/Wallet events * Add userID and userProperties * Optimiazation * Add link to send logcat messages via email (#45) * Add link to send logcat messages via email * Clean up * Error handling * Make file provider depending on applicationId * MOB-432 previous branch was based on a wrong branch (#48) * MOB-432 previous branch was based on a wrong branch * PR * Bump Abacus (#50) * Bump Abacus * Revert * MOB-421 add settings control to turn in-app notifications on/off completely (#49) * MOB-421 add settings control to turn in-app notifications on/off completely * MOB-421 add settings control to turn in-app notifications on/off completely * Clean up * Feature/mob 396 position cell with margin type (#51) * MOB-432 previous branch was based on a wrong branch * PR * MOB-396 skeleton for position cell * Better layout for place holder views (when there is no position, fill or transfers) * Convert AbacusState flows into StateFlows. (#52) * MOB-422 Withdrawal gating (#53) * Withdrawal Gating * Clean up * Doing the paddings better. (#56) * Update Android Gradle Plugin (#55) * MOB-446 create new add price triggers panel screen (#58) * SL/TP Routing and price triggers panel screen * Update deeplink to match iOS * Renaming * MOB-443 add limit price to price triggers screen (#60) * Feature/mob 356 trade input (#57) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * move modifier to param * Feature/mob 257 weekly dates (#61) * Added end time to rewards date range * lint * Update SharingStarted usages from Lazily to WhileSubscribed(). (#62) * Fix issue of text input losing calculated value when not focused (#64) * Inject coroutine scopes and dispatchers instead of hardcoding. (#65) * Revert "Update SharingStarted usages from Lazily to WhileSubscribed(). (#62)" (#66) This reverts commit de98092. * Fix margin issues with portfolio position items (#67) * Fix threading issue (#68) * Bump Abacus and v4-client (#69) * MOB-440 TP/SL order submission and data binding (#63) * Wire up input data * Submission * WIP * Bump Abacus and toggle size section * Update PlatformInfoScaffold * submissionStatus = _submissionStatus * Simplify TriggerOrderStream * Fix an issue of order/fill status display (#72) * Fix dollar() formatting crash in FR locale. (#74) * Add formatting functions for size specified in double (1000.0, 0.001,… (#73) * Add formatting functions for size specified in double (1000.0, 0.001, etc) * Clean up * Clean up * Clean up BigDecimals * Remove rounded(bigDecimal: * Fix rounding issue on leverage slider when locale is French (#75) * MOB-441 add TP/SL display to market screen (Android) (#71) * Wire up input data * Submission * WIP * Bump Abacus and toggle size section * MarketInfo buttons * Clean up * Clean up TriggerOrderStream * MOB-442 Support error states for TP/SL inputs (#77) * Wire up input data * Submission * WIP * Bump Abacus and toggle size section * MarketInfo buttons * Validation * Show validation error at sections * Highlighting error/warning field * Slide size formatting * Clean up * Clean up TriggerOrderStream * Clean up * Clean up * Made localizer a computed property (#78) * MOB-455 Add retry to trade and close order submission (#76) * Add retry to trade and close order submission. * _submissionStatus.asStateFlow() * Turn on Kotlin incremental classpath snapshots. (#80) * Fixing threading issues (#79) * Fixing threading issues. * Clean up * Feature/mob 360 target leverage (#59) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * MOB-360 rough UX for target leverage screen * Fixed PR * move modifier to param * lint * There is no longer InputFieldScarfold * Put back InputFieldScaffold * Fix market info's stats/about tab animation issue (#83) * MOB-14 Disable sparkline touching on market list (#84) * Disable sparkline touching on market list * Clean up * Bump version (#81) * Bump Abacus and add script to use locally built Abacus (#86) * Bump Abacus and add script to use locally built Abacus * Usage * Update * Feature/mob 400 adjust margin screen (#85) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * MOB-360 rough UX for target leverage screen * Fixed PR * move modifier to param * In the middle of coding * lint * There is no longer InputFieldScarfold * Put back InputFieldScaffold * More placeholder code and it compiles * rough amount input * Formatting "Add Margin" and "Remove Margin" --------- Co-authored-by: prashanDYDX <163016611+prashanDYDX@users.noreply.github.com> Co-authored-by: Prashan Dharmasena <prashan@dydx.exchange> Co-authored-by: John Huang <johnqh@yahoo.com>
* Update .gitignore to ignore all .idea files and all build directories. (#20) * Turn on Gradle parallel execution and caching. * Add "app_deployment" key (#21) * Add "app_deployment" key * Lint * Initial setup of StrictMode - only logging in debug. (#22) * Initial setup of StrictMode - only logging in debug. * Revert injection changes * Use limitedParallelism and MainScope() in AbacusThreadingImp. (#25) * Handle exception with invalid URLs (#26) * MOB-348 Show Squid routing error on deposit/withdrawal (#28) * Update AppModule.kt and used dependencies to follow Dagger Best Practices guide (in Notion). (#27) * Correlate x-request-id to correlate route requests from Squid transactions (#23) * Fix build (#29) * MOB-362: Some url links don't work with the deployment build (#31) * Test * Check for deeplink path during routing * Clean up * Clean up * Update rest of Dagger modules to follow best practices. (#30) * Remove network selector from settings for release build (#33) * MOB-363: Android: "System" theme setting not working (#32) * Observe system theme * Recompose when theme changes * Fix a crash on url tapping (#34) * Remove hardcoded scheme in the setting links. (#35) * Add Firebase Performance monitoring. (#37) * Bump Abacus and update the system link. (#36) * Fix the release build issue of wallet amount not showing up on deposit (#38) * Fix Subaccount transfer for France (#39) * Fix Subaccount transfer for France * Lint * Update function name to be consistent with iOS * Clean up the start-up sequence (#41) * Clean up the start-up sequence * Lint * Update Cartera and WalletConnnect to the latest version (#40) * Update Cartera * Lint * Add comments * MOB-285: Call startTrade() after setMarket() (#43) * Update the v4-native-client.js to replace # with ___ (#42) * Add script * Update v4-client.js * Safer replacement * Safer replacement * Move startWorkers back to Activity.onCreate() (#44) * Move startWorkers back to Activity.start() * Comment * MOB-410 Add tracking for onboarding, transfer, wallet connection (#46) * Adding Onboarding/Transfer/Wallet events * Add userID and userProperties * Optimiazation * Add link to send logcat messages via email (#45) * Add link to send logcat messages via email * Clean up * Error handling * Make file provider depending on applicationId * MOB-432 previous branch was based on a wrong branch (#48) * MOB-432 previous branch was based on a wrong branch * PR * Bump Abacus (#50) * Bump Abacus * Revert * MOB-421 add settings control to turn in-app notifications on/off completely (#49) * MOB-421 add settings control to turn in-app notifications on/off completely * MOB-421 add settings control to turn in-app notifications on/off completely * Clean up * Feature/mob 396 position cell with margin type (#51) * MOB-432 previous branch was based on a wrong branch * PR * MOB-396 skeleton for position cell * Better layout for place holder views (when there is no position, fill or transfers) * Convert AbacusState flows into StateFlows. (#52) * MOB-422 Withdrawal gating (#53) * Withdrawal Gating * Clean up * Doing the paddings better. (#56) * Update Android Gradle Plugin (#55) * MOB-446 create new add price triggers panel screen (#58) * SL/TP Routing and price triggers panel screen * Update deeplink to match iOS * Renaming * MOB-443 add limit price to price triggers screen (#60) * Feature/mob 356 trade input (#57) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * move modifier to param * Feature/mob 257 weekly dates (#61) * Added end time to rewards date range * lint * Update SharingStarted usages from Lazily to WhileSubscribed(). (#62) * Fix issue of text input losing calculated value when not focused (#64) * Inject coroutine scopes and dispatchers instead of hardcoding. (#65) * Revert "Update SharingStarted usages from Lazily to WhileSubscribed(). (#62)" (#66) This reverts commit de98092. * Fix margin issues with portfolio position items (#67) * Fix threading issue (#68) * Bump Abacus and v4-client (#69) * MOB-440 TP/SL order submission and data binding (#63) * Wire up input data * Submission * WIP * Bump Abacus and toggle size section * Update PlatformInfoScaffold * submissionStatus = _submissionStatus * Simplify TriggerOrderStream * Fix an issue of order/fill status display (#72) * Fix dollar() formatting crash in FR locale. (#74) * Add formatting functions for size specified in double (1000.0, 0.001,… (#73) * Add formatting functions for size specified in double (1000.0, 0.001, etc) * Clean up * Clean up * Clean up BigDecimals * Remove rounded(bigDecimal: * Fix rounding issue on leverage slider when locale is French (#75) * MOB-441 add TP/SL display to market screen (Android) (#71) * Wire up input data * Submission * WIP * Bump Abacus and toggle size section * MarketInfo buttons * Clean up * Clean up TriggerOrderStream * MOB-442 Support error states for TP/SL inputs (#77) * Wire up input data * Submission * WIP * Bump Abacus and toggle size section * MarketInfo buttons * Validation * Show validation error at sections * Highlighting error/warning field * Slide size formatting * Clean up * Clean up TriggerOrderStream * Clean up * Clean up * Made localizer a computed property (#78) * MOB-455 Add retry to trade and close order submission (#76) * Add retry to trade and close order submission. * _submissionStatus.asStateFlow() * Turn on Kotlin incremental classpath snapshots. (#80) * Fixing threading issues (#79) * Fixing threading issues. * Clean up * Feature/mob 360 target leverage (#59) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * MOB-360 rough UX for target leverage screen * Fixed PR * move modifier to param * lint * There is no longer InputFieldScarfold * Put back InputFieldScaffold * Fix market info's stats/about tab animation issue (#83) * MOB-14 Disable sparkline touching on market list (#84) * Disable sparkline touching on market list * Clean up * Bump version (#81) * Bump Abacus and add script to use locally built Abacus (#86) * Bump Abacus and add script to use locally built Abacus * Usage * Update * Feature/mob 400 adjust margin screen (#85) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * MOB-360 rough UX for target leverage screen * Fixed PR * move modifier to param * In the middle of coding * lint * There is no longer InputFieldScarfold * Put back InputFieldScaffold * More placeholder code and it compiles * rough amount input * Formatting "Add Margin" and "Remove Margin" * MOB-466 Integrate Abacus changes for trigger order status notification (#89) * MOB-466 Integrate Abacus changes for trigger order status notification * Clean up PlatformInfoScaffold * Update FF logic to SL/TP trigger (#91) * MOB-445 Add TP | SL button to market info page when there are open positions for the market (#82) * MOB-469: Add basic order lines to market chart (#90) * MOB-469: Add basic order lines to market chart * Only display open orders. * MOB-468: Clean up market prices chart (#92) * Clean up SL/TP (#93) * Clean up SL/TP * Cleanup * MOB-470 MOB-471 Add order line annotations. (#94) * Add Portfolio header selector (#95) * Features/mob 400 adjust margin screen bottom (#87) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * MOB-360 rough UX for target leverage screen * Fixed PR * move modifier to param * In the middle of coding * lint * There is no longer InputFieldScarfold * Put back InputFieldScaffold * More placeholder code and it compiles * rough amount input * Formatting "Add Margin" and "Remove Margin" * MOB-400 placeholder for bottom * Adjust margin receipt area * MOB-400 rearranging receipt data * MOB-400 liquidation price * Fix copy and modified code * PR review * spotless * fix build * Update abacus to 1.7.6 (#97) * MOB-480 MOB-484: Order-lines formatting, localization, rendering clean-up. (#96) * Update Abacus (#98) * Bump v4-client and AGP (#101) * MOB-495: Add entry and liquidation lines. (#99) * Feature/mob 497 integration margin type (#102) * Set margin type into tradeInput * Layout changes * Update Abacus * Fine tuning Isolated margin trade input * Margin dialog fine tuning * MOB-487 Android: Log error into Crashlytics (#100) * WIP * Timber * Use Logging with consistency * Cleanup * Clean up * Clean up * Lint * Feature/mob 498 integration target leverage (#103) * UX working * Sync up text formatting * Update Abacus * compile issue * Feature/fix trigger (#104) * Turn on V2 abacus manager in debug. (#106) * Bump Cartera and add log message (#108) * Reduct params of v4-client calls from logs (#107) * Stop app from exiting at region restriction (#110) * Stop app from exiting at region restriction * Not showing the button * Lint * MOB-511 Fix JS runner in webview of older devices (#109) * Fix deployment issues with mainnet test users (#111) * Stop app from exiting at region restriction * Not showing the button * Lint * Force TESTNET when user debugging is enabled. * Force deployment web host * Fix URL * Clean up * Made ethereumAddress null instead empty string * Update version to 1.0.2 * Increase heap size * Update from TESTNET to TESTFLIGHT * Fix build --------- Co-authored-by: prashanDYDX <163016611+prashanDYDX@users.noreply.github.com> Co-authored-by: Prashan Dharmasena <prashan@dydx.exchange> Co-authored-by: John Huang <johnqh@yahoo.com>
* Update .gitignore to ignore all .idea files and all build directories. (#20) * Turn on Gradle parallel execution and caching. * Add "app_deployment" key (#21) * Add "app_deployment" key * Lint * Initial setup of StrictMode - only logging in debug. (#22) * Initial setup of StrictMode - only logging in debug. * Revert injection changes * Use limitedParallelism and MainScope() in AbacusThreadingImp. (#25) * Handle exception with invalid URLs (#26) * MOB-348 Show Squid routing error on deposit/withdrawal (#28) * Update AppModule.kt and used dependencies to follow Dagger Best Practices guide (in Notion). (#27) * Correlate x-request-id to correlate route requests from Squid transactions (#23) * Fix build (#29) * MOB-362: Some url links don't work with the deployment build (#31) * Test * Check for deeplink path during routing * Clean up * Clean up * Update rest of Dagger modules to follow best practices. (#30) * Remove network selector from settings for release build (#33) * MOB-363: Android: "System" theme setting not working (#32) * Observe system theme * Recompose when theme changes * Fix a crash on url tapping (#34) * Remove hardcoded scheme in the setting links. (#35) * Add Firebase Performance monitoring. (#37) * Bump Abacus and update the system link. (#36) * Fix the release build issue of wallet amount not showing up on deposit (#38) * Fix Subaccount transfer for France (#39) * Fix Subaccount transfer for France * Lint * Update function name to be consistent with iOS * Clean up the start-up sequence (#41) * Clean up the start-up sequence * Lint * Update Cartera and WalletConnnect to the latest version (#40) * Update Cartera * Lint * Add comments * MOB-285: Call startTrade() after setMarket() (#43) * Update the v4-native-client.js to replace # with ___ (#42) * Add script * Update v4-client.js * Safer replacement * Safer replacement * Move startWorkers back to Activity.onCreate() (#44) * Move startWorkers back to Activity.start() * Comment * MOB-410 Add tracking for onboarding, transfer, wallet connection (#46) * Adding Onboarding/Transfer/Wallet events * Add userID and userProperties * Optimiazation * Add link to send logcat messages via email (#45) * Add link to send logcat messages via email * Clean up * Error handling * Make file provider depending on applicationId * MOB-432 previous branch was based on a wrong branch (#48) * MOB-432 previous branch was based on a wrong branch * PR * Bump Abacus (#50) * Bump Abacus * Revert * MOB-421 add settings control to turn in-app notifications on/off completely (#49) * MOB-421 add settings control to turn in-app notifications on/off completely * MOB-421 add settings control to turn in-app notifications on/off completely * Clean up * Feature/mob 396 position cell with margin type (#51) * MOB-432 previous branch was based on a wrong branch * PR * MOB-396 skeleton for position cell * Better layout for place holder views (when there is no position, fill or transfers) * Convert AbacusState flows into StateFlows. (#52) * MOB-422 Withdrawal gating (#53) * Withdrawal Gating * Clean up * Doing the paddings better. (#56) * Update Android Gradle Plugin (#55) * MOB-446 create new add price triggers panel screen (#58) * SL/TP Routing and price triggers panel screen * Update deeplink to match iOS * Renaming * MOB-443 add limit price to price triggers screen (#60) * Feature/mob 356 trade input (#57) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * move modifier to param * Feature/mob 257 weekly dates (#61) * Added end time to rewards date range * lint * Update SharingStarted usages from Lazily to WhileSubscribed(). (#62) * Fix issue of text input losing calculated value when not focused (#64) * Inject coroutine scopes and dispatchers instead of hardcoding. (#65) * Revert "Update SharingStarted usages from Lazily to WhileSubscribed(). (#62)" (#66) This reverts commit de98092. * Fix margin issues with portfolio position items (#67) * Fix threading issue (#68) * Bump Abacus and v4-client (#69) * MOB-440 TP/SL order submission and data binding (#63) * Wire up input data * Submission * WIP * Bump Abacus and toggle size section * Update PlatformInfoScaffold * submissionStatus = _submissionStatus * Simplify TriggerOrderStream * Fix an issue of order/fill status display (#72) * Fix dollar() formatting crash in FR locale. (#74) * Add formatting functions for size specified in double (1000.0, 0.001,… (#73) * Add formatting functions for size specified in double (1000.0, 0.001, etc) * Clean up * Clean up * Clean up BigDecimals * Remove rounded(bigDecimal: * Fix rounding issue on leverage slider when locale is French (#75) * MOB-441 add TP/SL display to market screen (Android) (#71) * Wire up input data * Submission * WIP * Bump Abacus and toggle size section * MarketInfo buttons * Clean up * Clean up TriggerOrderStream * MOB-442 Support error states for TP/SL inputs (#77) * Wire up input data * Submission * WIP * Bump Abacus and toggle size section * MarketInfo buttons * Validation * Show validation error at sections * Highlighting error/warning field * Slide size formatting * Clean up * Clean up TriggerOrderStream * Clean up * Clean up * Made localizer a computed property (#78) * MOB-455 Add retry to trade and close order submission (#76) * Add retry to trade and close order submission. * _submissionStatus.asStateFlow() * Turn on Kotlin incremental classpath snapshots. (#80) * Fixing threading issues (#79) * Fixing threading issues. * Clean up * Feature/mob 360 target leverage (#59) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * MOB-360 rough UX for target leverage screen * Fixed PR * move modifier to param * lint * There is no longer InputFieldScarfold * Put back InputFieldScaffold * Fix market info's stats/about tab animation issue (#83) * MOB-14 Disable sparkline touching on market list (#84) * Disable sparkline touching on market list * Clean up * Bump version (#81) * Bump Abacus and add script to use locally built Abacus (#86) * Bump Abacus and add script to use locally built Abacus * Usage * Update * Feature/mob 400 adjust margin screen (#85) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * MOB-360 rough UX for target leverage screen * Fixed PR * move modifier to param * In the middle of coding * lint * There is no longer InputFieldScarfold * Put back InputFieldScaffold * More placeholder code and it compiles * rough amount input * Formatting "Add Margin" and "Remove Margin" * MOB-466 Integrate Abacus changes for trigger order status notification (#89) * MOB-466 Integrate Abacus changes for trigger order status notification * Clean up PlatformInfoScaffold * Update FF logic to SL/TP trigger (#91) * MOB-445 Add TP | SL button to market info page when there are open positions for the market (#82) * MOB-469: Add basic order lines to market chart (#90) * MOB-469: Add basic order lines to market chart * Only display open orders. * MOB-468: Clean up market prices chart (#92) * Clean up SL/TP (#93) * Clean up SL/TP * Cleanup * MOB-470 MOB-471 Add order line annotations. (#94) * Add Portfolio header selector (#95) * Features/mob 400 adjust margin screen bottom (#87) * Margin type and leverage screens skeleton * MOB-356 MOB-358 Margin mode screen * Change bg color * MOB-360 rough UX for target leverage screen * Fixed PR * move modifier to param * In the middle of coding * lint * There is no longer InputFieldScarfold * Put back InputFieldScaffold * More placeholder code and it compiles * rough amount input * Formatting "Add Margin" and "Remove Margin" * MOB-400 placeholder for bottom * Adjust margin receipt area * MOB-400 rearranging receipt data * MOB-400 liquidation price * Fix copy and modified code * PR review * spotless * fix build * Update abacus to 1.7.6 (#97) * MOB-480 MOB-484: Order-lines formatting, localization, rendering clean-up. (#96) * Update Abacus (#98) * Bump v4-client and AGP (#101) * MOB-495: Add entry and liquidation lines. (#99) * Feature/mob 497 integration margin type (#102) * Set margin type into tradeInput * Layout changes * Update Abacus * Fine tuning Isolated margin trade input * Margin dialog fine tuning * MOB-487 Android: Log error into Crashlytics (#100) * WIP * Timber * Use Logging with consistency * Cleanup * Clean up * Clean up * Lint * Feature/mob 498 integration target leverage (#103) * UX working * Sync up text formatting * Update Abacus * compile issue * Feature/fix trigger (#104) * Turn on V2 abacus manager in debug. (#106) * Bump Cartera and add log message (#108) * Reduct params of v4-client calls from logs (#107) * Stop app from exiting at region restriction (#110) * Stop app from exiting at region restriction * Not showing the button * Lint * MOB-511 Fix JS runner in webview of older devices (#109) * Fix deployment issues with mainnet test users (#111) * Stop app from exiting at region restriction * Not showing the button * Lint * Force TESTNET when user debugging is enabled. * Force deployment web host * Fix URL * Clean up * Made ethereumAddress null instead empty string * Update version to 1.0.2 * Increase heap size * Update from TESTNET to TESTFLIGHT * MOB-513 Clean up force update logic (#113) * MOB-516 Add NavigatePage event (#114) * Bump app version to 1.0.3 (#115) --------- Co-authored-by: prashanDYDX <163016611+prashanDYDX@users.noreply.github.com> Co-authored-by: Prashan Dharmasena <prashan@dydx.exchange> Co-authored-by: John Huang <johnqh@yahoo.com>
Wiring up Abacus and order submission now works.
Also adding the Gain/Loss in to the section header and adding the "clear" button. There are still weird issues when updating the triggers and will fix them later.
untitled.webm