NTP-969 | gold widget bug fix (#11833)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* * Copyright © 2022-2023 by Navi Technologies Limited
|
||||
* * Copyright © 2022-2024 by Navi Technologies Limited
|
||||
* * All rights reserved. Strictly confidential
|
||||
*
|
||||
*/
|
||||
@@ -831,9 +831,11 @@ constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun updateAmountAndWeight(info: GoldConversionWidgetInfo) {
|
||||
fun updateAmountAndWeight(info: GoldConversionWidgetInfo, toResetError: Boolean = true) {
|
||||
this.info = info
|
||||
resetErrorState()
|
||||
if (toResetError) {
|
||||
resetErrorState()
|
||||
}
|
||||
binding.apply {
|
||||
val amount = info.actualAmount() ?: 0.0
|
||||
if (amount > 0.0) {
|
||||
@@ -1024,6 +1026,7 @@ constructor(
|
||||
fun setError() {
|
||||
setErrorBackgroundForAmountLayout()
|
||||
setActionButtonState()
|
||||
updateAmountAndWeight(info, false)
|
||||
binding.clError.isVisible = true
|
||||
binding.clRewardInfo.isVisible = false
|
||||
widgetCallback.widgetAnalytics(GenericAnalyticsData(eventName = INPUT_ERROR_EVENT))
|
||||
|
||||
Reference in New Issue
Block a user