Skip to content
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

(android) Backup channels and payments db #561

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ import fr.acinq.phoenix.android.components.Dialog
import fr.acinq.phoenix.android.components.openLink
import fr.acinq.phoenix.android.components.screenlock.LockPrompt
import fr.acinq.phoenix.android.home.HomeView
import fr.acinq.phoenix.android.init.CreateWalletView
import fr.acinq.phoenix.android.init.InitWallet
import fr.acinq.phoenix.android.init.RestoreWalletView
import fr.acinq.phoenix.android.initwallet.create.CreateWalletView
import fr.acinq.phoenix.android.initwallet.InitWallet
import fr.acinq.phoenix.android.initwallet.restore.RestoreWalletView
import fr.acinq.phoenix.android.intro.IntroView
import fr.acinq.phoenix.android.payments.ScanDataView
import fr.acinq.phoenix.android.payments.details.PaymentDetailsView
Expand Down Expand Up @@ -98,6 +98,8 @@ import fr.acinq.phoenix.android.settings.channels.ImportChannelsData
import fr.acinq.phoenix.android.settings.displayseed.DisplaySeedView
import fr.acinq.phoenix.android.settings.fees.AdvancedIncomingFeePolicy
import fr.acinq.phoenix.android.settings.fees.LiquidityPolicyView
import fr.acinq.phoenix.android.payments.liquidity.RequestLiquidityView
import fr.acinq.phoenix.android.services.LocalBackupWorker
import fr.acinq.phoenix.android.settings.walletinfo.FinalWalletInfo
import fr.acinq.phoenix.android.settings.walletinfo.SendSwapInRefundView
import fr.acinq.phoenix.android.settings.walletinfo.SwapInAddresses
Expand Down Expand Up @@ -229,10 +231,10 @@ fun AppView(
)
}
composable(Screen.CreateWallet.route) {
CreateWalletView(onSeedWritten = { navController.navigate(Screen.Startup.route) })
CreateWalletView(onWalletCreated = { navController.navigate(Screen.Startup.route) })
}
composable(Screen.RestoreWallet.route) {
RestoreWalletView(onSeedWritten = { navController.navigate(Screen.Startup.route) })
RestoreWalletView(onRestoreDone = { navController.navigate(Screen.Startup.route) })
}
composable(Screen.Home.route) {
RequireStarted(walletState) {
Expand Down Expand Up @@ -535,6 +537,9 @@ fun AppView(
val userPrefs = userPrefs
val exchangeRates = fiatRates
lastCompletedPayment?.let { payment ->
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
LocalBackupWorker.scheduleOnce(context)
}
LaunchedEffect(key1 = payment.walletPaymentId()) {
try {
if (isDataMigrationExpected == false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ fun FilledButton(
textStyle: TextStyle = MaterialTheme.typography.button.copy(color = MaterialTheme.colors.onPrimary),
padding: PaddingValues = PaddingValues(horizontal = 16.dp, vertical = 12.dp),
backgroundColor: Color = MaterialTheme.colors.primary,
horizontalArrangement: Arrangement.Horizontal = Arrangement.Center,
onClick: () -> Unit,
) {
Button(
Expand All @@ -120,6 +121,7 @@ fun FilledButton(
onClick = onClick,
shape = shape,
backgroundColor = backgroundColor,
horizontalArrangement = horizontalArrangement,
textStyle = textStyle,
padding = padding,
modifier = modifier
Expand Down

This file was deleted.

Loading