Address review comments

This commit is contained in:
Carter Jernigan 2021-12-20 08:18:06 -05:00
parent 2e40af9390
commit b03d1500ee
1 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,7 @@ import androidx.compose.ui.Modifier
import androidx.core.content.res.ResourcesCompat import androidx.core.content.res.ResourcesCompat
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import cash.z.ecc.android.sdk.type.WalletBirthday
import cash.z.ecc.android.sdk.type.ZcashNetwork import cash.z.ecc.android.sdk.type.ZcashNetwork
import cash.z.ecc.sdk.model.PersistableWallet import cash.z.ecc.sdk.model.PersistableWallet
import cash.z.ecc.sdk.model.SeedPhrase import cash.z.ecc.sdk.model.SeedPhrase
@ -176,9 +177,10 @@ class MainActivity : ComponentActivity() {
// a backup, then the user has a valid backup. // a backup, then the user has a valid backup.
walletViewModel.persistBackupComplete() walletViewModel.persistBackupComplete()
val network = ZcashNetwork.fromResources(application)
val restoredWallet = PersistableWallet( val restoredWallet = PersistableWallet(
ZcashNetwork.fromResources(application), network,
null, WalletBirthday(network.saplingActivationHeight),
SeedPhrase(restoreViewModel.userWordList.current.value) SeedPhrase(restoreViewModel.userWordList.current.value)
) )
walletViewModel.persistExistingWallet(restoredWallet) walletViewModel.persistExistingWallet(restoredWallet)