Skip to content

Commit

Permalink
Merge branch 'feature/lottie-animation-recover-hd-account' into PERA-…
Browse files Browse the repository at this point in the history
…1353-bottomsheet-hd-wallet
  • Loading branch information
alexs60 committed Feb 28, 2025
2 parents 1e7ddf5 + 4da3cfb commit 4a9ba82
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import com.algorand.android.R
import com.algorand.android.models.FragmentConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import com.algorand.android.ui.compose.widget.PeraSecondaryButton
import dagger.hilt.android.AndroidEntryPoint
Expand All @@ -40,7 +40,7 @@ class VerifyLedgerInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_check),
contentDescription = stringResource(id = R.string.check),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import com.algorand.android.utils.splitMnemonic
import com.algorand.android.utils.toShortenedAddress
import com.algorand.wallet.account.detail.domain.model.AccountType
import com.algorand.wallet.account.detail.domain.model.AccountType.Companion.wordCount
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.flow
import java.util.Locale
import javax.inject.Inject
Expand Down Expand Up @@ -126,9 +127,14 @@ class RecoverWithPassphrasePreviewUseCase @Inject constructor(
)
}

@SuppressWarnings("MagicNumber")
fun validateEnteredMnemonics(preview: RecoverWithPassphrasePreview) = flow {
try {
emit(preview.copy(showLoadingDialogEvent = Event(Unit)))
// faking the duration of this process for some time before moving forward
// so the loading animation is effective.
// After deleting it delete also the @SuppressWarnings("MagicNumber")
delay(2500L)
val mnemonics = passphraseInputConfigurationUtil.getOrderedInput(preview.passphraseInputGroupConfiguration)
val privateKey = Sdk.mnemonicToPrivateKey(mnemonics.lowercase(Locale.ENGLISH))
if (privateKey == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraCard
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import com.algorand.android.ui.compose.widget.PeraTitleText
import com.algorand.wallet.account.detail.domain.model.AccountType
Expand All @@ -67,7 +67,7 @@ class RecoverAccountInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_key),
contentDescription = stringResource(id = R.string.key),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.algorand.android.models.FragmentConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import com.algorand.android.ui.compose.widget.PeraSecondaryButton
import dagger.hilt.android.AndroidEntryPoint
Expand All @@ -37,7 +37,7 @@ class RecoverAccountResultInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_check),
contentDescription = stringResource(id = R.string.check),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import com.algorand.android.models.FragmentConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import dagger.hilt.android.AndroidEntryPoint

Expand All @@ -38,7 +38,7 @@ class RekeyToLedgerAccountVerifyInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_check),
contentDescription = stringResource(id = R.string.check),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import com.algorand.android.models.FragmentConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import dagger.hilt.android.AndroidEntryPoint

Expand All @@ -52,7 +52,7 @@ class RekeyToStandardAccountVerifyInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_check),
contentDescription = stringResource(id = R.string.check),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import com.algorand.android.models.FragmentConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import dagger.hilt.android.AndroidEntryPoint

Expand All @@ -51,7 +51,7 @@ class UndoRekeyVerifyInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_check),
contentDescription = stringResource(id = R.string.check),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import com.algorand.android.ui.common.warningconfirmation.BackupInfoFragmentDire
import com.algorand.android.ui.common.warningconfirmation.BackupInfoFragmentDirections.Companion.actionBackupInfoFragmentToWriteDownInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import com.algorand.android.ui.compose.widget.PeraSecondaryButton
import com.algorand.android.utils.browser.openRecoveryPassphraseSupportUrl
Expand Down Expand Up @@ -60,7 +60,7 @@ class BackupInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_shield),
contentDescription = stringResource(R.string.shield),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import com.algorand.android.ui.common.warningconfirmation.WriteDownInfoFragmentD
import com.algorand.android.ui.common.warningconfirmation.WriteDownInfoFragmentDirections.Companion.actionWriteDownInfoFragmentToBackupPassphrasesNavigation
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import com.algorand.android.ui.compose.widget.PeraSecondaryButton
import dagger.hilt.android.AndroidEntryPoint
Expand All @@ -54,7 +54,7 @@ class WriteDownInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_pen),
contentDescription = stringResource(R.string.pen),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.algorand.android.models.ToolbarConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import com.algorand.android.ui.lockpreference.BiometricAuthenticationEnabledFragmentDirections.Companion.actionBiometricAuthenticationEnabledFragmentToHomeNavigation

Expand All @@ -39,7 +39,7 @@ class BiometricAuthenticationEnabledFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_check),
contentDescription = stringResource(id = R.string.check),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.algorand.android.models.ToolbarConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import com.algorand.android.ui.compose.widget.PeraSecondaryButton
import com.algorand.android.utils.alertDialog
Expand All @@ -46,7 +46,7 @@ class BiometricRegistrationFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_faceid),
contentDescription = stringResource(R.string.face_id),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import com.algorand.android.models.ToolbarConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import com.algorand.android.ui.compose.widget.PeraSecondaryButton
import com.algorand.android.utils.preference.setLockDontAskAgain
Expand Down Expand Up @@ -71,7 +71,7 @@ class ChoosePasswordInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_locked),
contentDescription = stringResource(id = R.string.check),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.algorand.android.models.FragmentConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import dagger.hilt.android.AndroidEntryPoint

Expand All @@ -36,7 +36,7 @@ class PassphraseVerifiedInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_shield_check_large),
contentDescription = stringResource(id = R.string.check),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.algorand.android.models.FragmentConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import com.algorand.android.ui.compose.widget.PeraSecondaryButton
import dagger.hilt.android.AndroidEntryPoint
Expand All @@ -37,7 +37,7 @@ class CreateAccountResultInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_check),
contentDescription = stringResource(R.string.check),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import com.algorand.android.models.ToolbarConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import com.algorand.android.ui.compose.widget.PeraWarningText
import com.algorand.android.utils.browser.openWatchAccountSupportUrl
Expand All @@ -54,7 +54,7 @@ class WatchAccountInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_eye),
contentDescription = stringResource(R.string.eye),
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.algorand.android.models.FragmentConfiguration
import com.algorand.android.ui.common.BaseInfoFragment
import com.algorand.android.ui.compose.widget.PeraBodyText
import com.algorand.android.ui.compose.widget.PeraHeadlineText
import com.algorand.android.ui.compose.widget.PeraIconBig
import com.algorand.android.ui.compose.widget.PeraIcon
import com.algorand.android.ui.compose.widget.PeraPrimaryButton
import dagger.hilt.android.AndroidEntryPoint

Expand All @@ -36,7 +36,7 @@ class WatchAccountResultInfoFragment : BaseInfoFragment() {

@Composable
override fun Icon(modifier: Modifier) =
PeraIconBig(
PeraIcon(
painter = painterResource(id = R.drawable.ic_check),
contentDescription = stringResource(id = R.string.check),
modifier = modifier
Expand Down
7 changes: 6 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ktorContentNegotiation = "3.0.0"
legacySupport = "1.0.0"
lifecycle = "2.8.7"
lifecycleExt = "2.2.0"
lottie = "6.4.1"
lottie = "6.6.2"
material = "1.12.0"
mockito = "5.4.0"
mockk = "1.13.13"
Expand All @@ -84,6 +84,7 @@ tink = "1.14.0"
xhdwalletapi = "1.1.0"
walletConnectBom = "1.34.1"
zxing = "4.3.0"
uiTooling = "1.7.8"

[libraries]

Expand Down Expand Up @@ -170,6 +171,7 @@ exoplayer = { module = "com.google.android.exoplayer:exoplayer", version.ref = "
glide-image = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" }
lottie = { module = "com.airbnb.android:lottie", version.ref = "lottie" }
lottie-compose = { module = "com.airbnb.android:lottie-compose", version.ref = "lottie" }
mpandroidchart = { module = "com.github.PhilJay:MPAndroidChart", version.ref = "mpAndroidChart" }

# Sensors - Bluetooth / Camera
Expand Down Expand Up @@ -234,6 +236,9 @@ kotlinx-coroutines-iosSimulatorArm64 = { module = "org.jetbrains.kotlinx:kotlinx
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDatetime" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
perf-plugin = { module = "com.google.firebase:perf-plugin", version.ref = "firebasePerformance" }

androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "uiTooling" }

[bundles]
firebase = ["firebase-analytics",
Expand Down

0 comments on commit 4a9ba82

Please sign in to comment.