diff --git a/gradle.properties b/gradle.properties index accf27adf..f4b49f4dc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -211,7 +211,7 @@ ZIP_321_VERSION = 0.0.6 # WARNING: Ensure a non-snapshot version is used before releasing to production ZCASH_BIP39_VERSION=1.0.9 # WARNING: Ensure a non-snapshot version is used before releasing to production -ZCASH_SDK_VERSION=2.2.11 +ZCASH_SDK_VERSION=2.2.11-SNAPSHOT # Toolchain is the Java version used to build the application, which is separate from the # Java version used to run the application. diff --git a/ui-design-lib/src/main/java/co/electriccoin/zcash/ui/design/component/ZashiYearMonthWheelDatePicker.kt b/ui-design-lib/src/main/java/co/electriccoin/zcash/ui/design/component/ZashiYearMonthWheelDatePicker.kt index ebab9e735..bfd9809cb 100644 --- a/ui-design-lib/src/main/java/co/electriccoin/zcash/ui/design/component/ZashiYearMonthWheelDatePicker.kt +++ b/ui-design-lib/src/main/java/co/electriccoin/zcash/ui/design/component/ZashiYearMonthWheelDatePicker.kt @@ -13,6 +13,7 @@ import androidx.compose.foundation.lazy.LazyListState import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.runtime.Immutable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.derivedStateOf import androidx.compose.runtime.getValue @@ -39,40 +40,34 @@ import java.text.DateFormatSymbols import java.time.Month import java.time.Year import java.time.YearMonth +import kotlin.math.absoluteValue import kotlin.math.pow @Suppress("MagicNumber") @Composable fun ZashiYearMonthWheelDatePicker( + selection: YearMonth, onSelectionChange: (YearMonth) -> Unit, modifier: Modifier = Modifier, verticallyVisibleItems: Int = 3, - startYear: Year = Year.of(2016), - endYear: Year = Year.now(), - selectionYear: YearMonth = YearMonth.now(), + startInclusive: YearMonth = YearMonth.of(2018, 10), + endInclusive: YearMonth = YearMonth.now(), ) { val latestOnSelectionChanged by rememberUpdatedState(onSelectionChange) - var selectedDate by remember { mutableStateOf(selectionYear) } - val months = - listOf( - Month.JANUARY, - Month.FEBRUARY, - Month.MARCH, - Month.APRIL, - Month.MAY, - Month.JUNE, - Month.JULY, - Month.AUGUST, - Month.SEPTEMBER, - Month.OCTOBER, - Month.NOVEMBER, - Month.DECEMBER - ) - val years = (startYear.value..endYear.value).toList() - LaunchedEffect(selectedDate) { - Twig.debug { "Selection changed: $selectedDate" } - latestOnSelectionChanged(selectedDate) + var state by remember { + mutableStateOf( + InternalState( + selectedDate = selection, + months = getMonthsForYear(Year.of(selection.year), startInclusive, endInclusive), + years = (startInclusive.year..endInclusive.year).map { Year.of(it) }.toList() + ) + ) + } + + LaunchedEffect(state.selectedDate) { + Twig.debug { "Selection changed: ${state.selectedDate}" } + latestOnSelectionChanged(state.selectedDate) } Box(modifier = modifier) { @@ -92,14 +87,18 @@ fun ZashiYearMonthWheelDatePicker( Spacer(Modifier.weight(.5f)) WheelLazyList( modifier = Modifier.weight(1f), - selection = maxOf(months.indexOf(selectedDate.month), 0), - itemCount = months.size, + selection = state.selectedMonthIndex, + itemCount = state.months.size, itemVerticalOffset = verticallyVisibleItems, - isInfiniteScroll = true, - onFocusItem = { selectedDate = selectedDate.withMonth(months[it].value) }, + isInfiniteScroll = false, + onFocusItem = { + state = state.copy( + selectedDate = state.selectedDate.withMonth(state.months[it].value) + ) + }, itemContent = { Text( - text = DateFormatSymbols().months[months[it].value - 1], + text = DateFormatSymbols().months[state.months[it].value - 1], textAlign = TextAlign.Center, modifier = Modifier.fillParentMaxWidth(), style = ZashiTypography.header6, @@ -110,14 +109,28 @@ fun ZashiYearMonthWheelDatePicker( ) WheelLazyList( modifier = Modifier.weight(.75f), - selection = years.indexOf(selectedDate.year), - itemCount = years.size, + selection = state.selectedYearIndex, + itemCount = state.years.size, itemVerticalOffset = verticallyVisibleItems, isInfiniteScroll = false, - onFocusItem = { selectedDate = selectedDate.withYear(years[it]) }, + onFocusItem = { + val year = state.years[it] + val normalizedSelectedMonth = getSelectedMonthForYear( + year = year, + selectedMonth = state.selectedDate.month, + startYearMonth = startInclusive, + endYearMonth = endInclusive + ) + val months = getMonthsForYear(year, startInclusive, endInclusive) + val selectedDate = state.selectedDate.withYear(year.value).withMonth(normalizedSelectedMonth.value) + state = state.copy( + selectedDate = selectedDate, + months = months + ) + }, itemContent = { Text( - text = years[it].toString(), + text = state.years[it].toString(), textAlign = TextAlign.Center, modifier = Modifier.fillParentMaxWidth(), style = ZashiTypography.header6, @@ -131,6 +144,79 @@ fun ZashiYearMonthWheelDatePicker( } } +private fun getMonthsForYear(year: Year, startYearMonth: YearMonth, endYearMonth: YearMonth): List { + return when (year.value) { + startYearMonth.year -> { + (startYearMonth.month.value..Month.DECEMBER.value).map { index -> + Month.entries.first { it.value == index } + } + } + + endYearMonth.year -> { + (Month.JANUARY.value..endYearMonth.month.value).map { index -> + Month.entries.first { it.value == index } + } + } + + else -> { + listOf( + Month.JANUARY, + Month.FEBRUARY, + Month.MARCH, + Month.APRIL, + Month.MAY, + Month.JUNE, + Month.JULY, + Month.AUGUST, + Month.SEPTEMBER, + Month.OCTOBER, + Month.NOVEMBER, + Month.DECEMBER + ) + } + } +} + +private fun getSelectedMonthForYear( + year: Year, + selectedMonth: Month, + startYearMonth: YearMonth, + endYearMonth: YearMonth +): Month { + return when (year.value) { + startYearMonth.year -> { + val months = (startYearMonth.month.value..Month.DECEMBER.value).map { index -> + Month.entries.first { it.value == index } + } + if (selectedMonth in months) selectedMonth else months.findClosest(selectedMonth) + } + + endYearMonth.year -> { + val months = (Month.JANUARY.value..endYearMonth.month.value).map { index -> + Month.entries.first { it.value == index } + } + if (selectedMonth in months) selectedMonth else months.findClosest(selectedMonth) + } + + else -> selectedMonth + } +} + +private fun List.findClosest(target: Month): Month { + var closestNumber = this[0] // Initialize with the first element + var minDifference = (this[0].value - target.value).absoluteValue + + for (number in this) { + val difference = (number.value - target.value).absoluteValue + if (difference < minDifference) { + minDifference = difference + closestNumber = number + } + } + + return closestNumber +} + @Suppress("MagicNumber", "ContentSlotReused") @Composable private fun WheelLazyList( @@ -155,9 +241,7 @@ private fun WheelLazyList( val isScrollInProgress = state.isScrollInProgress LaunchedEffect(itemCount) { - coroutineScope.launch { - state.scrollToItem(startIndex) - } + state.scrollToItem(startIndex) } LaunchedEffect(key1 = isScrollInProgress) { @@ -286,3 +370,13 @@ private fun calculateIndexToFocus( } return index } + +@Immutable +private data class InternalState( + val selectedDate: YearMonth, + val months: List, + val years: List +) { + val selectedYearIndex = years.map { it.value }.indexOf(selectedDate.year) + val selectedMonthIndex = maxOf(months.indexOf(selectedDate.month), 0) +} diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/onboarding/OnboardingNavigation.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/onboarding/OnboardingNavigation.kt index 053d3aad8..b1c2686ec 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/onboarding/OnboardingNavigation.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/onboarding/OnboardingNavigation.kt @@ -134,10 +134,10 @@ fun MainActivity.OnboardingNavigation() { AndroidRestoreBDHeight(it.toRoute()) } composable { - AndroidRestoreBDDate() + AndroidRestoreBDDate(it.toRoute()) } composable { - AndroidRestoreBDEstimation() + AndroidRestoreBDEstimation(it.toRoute()) } dialog( dialogProperties = diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/AndroidRestoreBDDate.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/AndroidRestoreBDDate.kt index 5a3d40ff9..4e1b3e401 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/AndroidRestoreBDDate.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/AndroidRestoreBDDate.kt @@ -6,14 +6,15 @@ import androidx.compose.runtime.getValue import androidx.lifecycle.compose.collectAsStateWithLifecycle import kotlinx.serialization.Serializable import org.koin.androidx.compose.koinViewModel +import org.koin.core.parameter.parametersOf @Composable -fun AndroidRestoreBDDate() { - val vm = koinViewModel() +fun AndroidRestoreBDDate(args: RestoreBDDate) { + val vm = koinViewModel { parametersOf(args) } val state by vm.state.collectAsStateWithLifecycle() - RestoreBDDateView(state) - BackHandler { state.onBack() } + BackHandler(enabled = state != null) { state?.onBack?.invoke() } + state?.let { RestoreBDDateView(it) } } @Serializable -data object RestoreBDDate +data class RestoreBDDate(val seed: String) diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateState.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateState.kt index 0192cf861..9e54ab661 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateState.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateState.kt @@ -2,9 +2,12 @@ package co.electriccoin.zcash.ui.screen.restore.date import co.electriccoin.zcash.ui.design.component.ButtonState import co.electriccoin.zcash.ui.design.component.IconButtonState +import java.time.YearMonth data class RestoreBDDateState( + val selection: YearMonth, val next: ButtonState, val dialogButton: IconButtonState, - val onBack: () -> Unit + val onBack: () -> Unit, + val onYearMonthChange: (YearMonth) -> Unit, ) diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateView.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateView.kt index e7a74eeb0..67e3c1cd2 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateView.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateView.kt @@ -42,6 +42,7 @@ import co.electriccoin.zcash.ui.design.theme.typography.ZashiTypography import co.electriccoin.zcash.ui.design.util.orDark import co.electriccoin.zcash.ui.design.util.scaffoldPadding import co.electriccoin.zcash.ui.design.util.stringRes +import java.time.YearMonth @Composable fun RestoreBDDateView(state: RestoreBDDateState) { @@ -84,7 +85,8 @@ private fun Content( Spacer(Modifier.height(24.dp)) ZashiYearMonthWheelDatePicker( - onSelectionChange = {}, + selection = state.selection, + onSelectionChange = state.onYearMonthChange, modifier = Modifier.fillMaxWidth(), ) @@ -150,8 +152,10 @@ private fun Preview() = state = RestoreBDDateState( next = ButtonState(stringRes("Estimate")) {}, - dialogButton = IconButtonState(R.drawable.ic_restore_dialog) {}, - onBack = {} + dialogButton = IconButtonState(R.drawable.ic_help) {}, + onBack = {}, + onYearMonthChange = {}, + selection = YearMonth.now() ) ) } diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateViewModel.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateViewModel.kt index 0397265cd..b40dbdbc0 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateViewModel.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/date/RestoreBDDateViewModel.kt @@ -1,6 +1,12 @@ package co.electriccoin.zcash.ui.screen.restore.date +import android.content.Context import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import cash.z.ecc.android.sdk.SdkSynchronizer +import cash.z.ecc.android.sdk.model.ZcashNetwork +import cash.z.ecc.sdk.ANDROID_STATE_FLOW_TIMEOUT +import cash.z.ecc.sdk.type.fromResources import co.electriccoin.zcash.ui.NavigationRouter import co.electriccoin.zcash.ui.R import co.electriccoin.zcash.ui.design.component.ButtonState @@ -9,27 +15,64 @@ import co.electriccoin.zcash.ui.design.util.stringRes import co.electriccoin.zcash.ui.screen.restore.estimation.RestoreBDEstimation import co.electriccoin.zcash.ui.screen.restore.info.SeedInfo import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.WhileSubscribed import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.launch +import kotlinx.datetime.Clock +import kotlinx.datetime.toKotlinInstant +import java.time.YearMonth +import java.time.ZoneId class RestoreBDDateViewModel( - private val navigationRouter: NavigationRouter + private val args: RestoreBDDate, + private val navigationRouter: NavigationRouter, + private val context: Context, ) : ViewModel() { - val state: StateFlow = MutableStateFlow(createState()).asStateFlow() - private fun createState() = + private val selection = MutableStateFlow(YearMonth.now()) + + val state: StateFlow = selection + .map { + createState(it) + } + .stateIn( + scope = viewModelScope, + started = SharingStarted.WhileSubscribed(ANDROID_STATE_FLOW_TIMEOUT), + initialValue = null + ) + + private fun createState(selection: YearMonth) = RestoreBDDateState( next = ButtonState(stringRes(R.string.restore_bd_height_btn), onClick = ::onEstimateClick), dialogButton = IconButtonState( - icon = co.electriccoin.zcash.ui.design.R.drawable.ic_info, + icon = R.drawable.ic_help, onClick = ::onInfoButtonClick, ), onBack = ::onBack, + onYearMonthChange = ::onYearMonthChange, + selection = selection ) private fun onEstimateClick() { - navigationRouter.forward(RestoreBDEstimation) + viewModelScope.launch { + val instant = selection.value.atDay(1) + .atStartOfDay() + .atZone(ZoneId.systemDefault()) + .toInstant() + .toKotlinInstant() + val bday = SdkSynchronizer.estimateBirthdayHeight( + context = context, + date = instant, + network = ZcashNetwork.fromResources(context) + ) + navigationRouter.forward(RestoreBDEstimation(seed = args.seed, blockHeight = bday.value)) + } } private fun onBack() { @@ -39,4 +82,8 @@ class RestoreBDDateViewModel( private fun onInfoButtonClick() { navigationRouter.forward(SeedInfo) } + + private fun onYearMonthChange(yearMonth: YearMonth) { + selection.update { yearMonth } + } } diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/AndroidRestoreBDEstimation.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/AndroidRestoreBDEstimation.kt index 815b75cf7..07d3f5735 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/AndroidRestoreBDEstimation.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/AndroidRestoreBDEstimation.kt @@ -6,14 +6,18 @@ import androidx.compose.runtime.getValue import androidx.lifecycle.compose.collectAsStateWithLifecycle import kotlinx.serialization.Serializable import org.koin.androidx.compose.koinViewModel +import org.koin.core.parameter.parametersOf @Composable -fun AndroidRestoreBDEstimation() { - val vm = koinViewModel() +fun AndroidRestoreBDEstimation(args: RestoreBDEstimation) { + val vm = koinViewModel { parametersOf(args) } val state by vm.state.collectAsStateWithLifecycle() RestoreBDEstimationView(state) BackHandler { state.onBack() } } @Serializable -data object RestoreBDEstimation +data class RestoreBDEstimation( + val seed: String, + val blockHeight: Long +) diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/RestoreBDEstimationView.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/RestoreBDEstimationView.kt index 90ce99b55..f5fd1007b 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/RestoreBDEstimationView.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/RestoreBDEstimationView.kt @@ -133,7 +133,7 @@ private fun Preview() = state = RestoreBDEstimationState( restore = ButtonState(stringRes("Estimate")) {}, - dialogButton = IconButtonState(R.drawable.ic_restore_dialog) {}, + dialogButton = IconButtonState(R.drawable.ic_help) {}, onBack = {}, text = stringRes("123456"), copy = ButtonState(stringRes("Copy"), icon = R.drawable.ic_copy) {} diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/RestoreBDEstimationViewModel.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/RestoreBDEstimationViewModel.kt index 116b8e465..b92a1127d 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/RestoreBDEstimationViewModel.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/estimation/RestoreBDEstimationViewModel.kt @@ -1,8 +1,11 @@ package co.electriccoin.zcash.ui.screen.restore.estimation import androidx.lifecycle.ViewModel +import cash.z.ecc.android.sdk.model.BlockHeight +import cash.z.ecc.android.sdk.model.SeedPhrase import co.electriccoin.zcash.ui.NavigationRouter import co.electriccoin.zcash.ui.R +import co.electriccoin.zcash.ui.common.usecase.RestoreWalletUseCase import co.electriccoin.zcash.ui.design.component.ButtonState import co.electriccoin.zcash.ui.design.component.IconButtonState import co.electriccoin.zcash.ui.design.util.stringRes @@ -12,7 +15,9 @@ import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow class RestoreBDEstimationViewModel( - private val navigationRouter: NavigationRouter + private val args: RestoreBDEstimation, + private val navigationRouter: NavigationRouter, + private val restoreWallet: RestoreWalletUseCase ) : ViewModel() { val state: StateFlow = MutableStateFlow(createState()).asStateFlow() @@ -20,17 +25,20 @@ class RestoreBDEstimationViewModel( RestoreBDEstimationState( dialogButton = IconButtonState( - icon = co.electriccoin.zcash.ui.design.R.drawable.ic_info, + icon = R.drawable.ic_help, onClick = ::onInfoButtonClick, ), onBack = ::onBack, - text = stringRes("123456"), + text = stringRes(args.blockHeight.toString()), copy = ButtonState(stringRes(R.string.restore_bd_estimation_copy), icon = R.drawable.ic_copy) {}, restore = ButtonState(stringRes(R.string.restore_bd_estimation_restore), onClick = ::onRestoreClick), ) private fun onRestoreClick() { - // do nothing + restoreWallet( + seedPhrase = SeedPhrase.new(args.seed), + birthday = BlockHeight.new(args.blockHeight) + ) } private fun onBack() { diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/height/RestoreBDHeightView.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/height/RestoreBDHeightView.kt index 3dfd0e14d..68189da2d 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/height/RestoreBDHeightView.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/height/RestoreBDHeightView.kt @@ -205,7 +205,7 @@ private fun Preview() = state = RestoreBDHeightState( onBack = {}, - dialogButton = IconButtonState(R.drawable.ic_restore_dialog) {}, + dialogButton = IconButtonState(R.drawable.ic_help) {}, blockHeight = TextFieldState(stringRes("")) {}, estimate = ButtonState(stringRes("Estimate")) {}, restore = ButtonState(stringRes("Restore")) {} diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/height/RestoreBDHeightViewModel.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/height/RestoreBDHeightViewModel.kt index 42457d6d3..ff2261d34 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/height/RestoreBDHeightViewModel.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/height/RestoreBDHeightViewModel.kt @@ -54,7 +54,7 @@ class RestoreBDHeightViewModel( onBack = ::onBack, dialogButton = IconButtonState( - icon = co.electriccoin.zcash.ui.design.R.drawable.ic_info, + icon = R.drawable.ic_help, onClick = ::onInfoButtonClick, ), restore = @@ -74,7 +74,7 @@ class RestoreBDHeightViewModel( } private fun onEstimateClick() { - navigationRouter.forward(RestoreBDDate) + navigationRouter.forward(RestoreBDDate(seed = restoreBDHeight.seed)) } private fun onRestoreClick() { diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/seed/RestoreSeedView.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/seed/RestoreSeedView.kt index 386fd1cb5..e9fbd49c6 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/seed/RestoreSeedView.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/seed/RestoreSeedView.kt @@ -297,7 +297,7 @@ private fun Preview() = } ), onBack = {}, - dialogButton = IconButtonState(R.drawable.ic_restore_dialog) {}, + dialogButton = IconButtonState(R.drawable.ic_help) {}, nextButton = ButtonState( text = stringRes("Next"), diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/seed/RestoreSeedViewModel.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/seed/RestoreSeedViewModel.kt index d1ac290e2..408670364 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/seed/RestoreSeedViewModel.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/screen/restore/seed/RestoreSeedViewModel.kt @@ -130,7 +130,7 @@ class RestoreSeedViewModel( onBack = ::onBack, dialogButton = IconButtonState( - icon = co.electriccoin.zcash.ui.design.R.drawable.ic_info, + icon = R.drawable.ic_help, onClick = ::onInfoButtonClick ), nextButton = diff --git a/ui-lib/src/main/res/ui/restore/drawable/ic_restore_dialog.xml b/ui-lib/src/main/res/ui/restore/drawable/ic_restore_dialog.xml deleted file mode 100644 index 222f46289..000000000 --- a/ui-lib/src/main/res/ui/restore/drawable/ic_restore_dialog.xml +++ /dev/null @@ -1,13 +0,0 @@ - - -