|
|
@ -1,6 +1,7 @@ |
|
|
|
package cash.z.ecc.android.ui.setup |
|
|
|
|
|
|
|
import android.content.Context |
|
|
|
import android.util.Log |
|
|
|
import androidx.lifecycle.ViewModel |
|
|
|
import cash.z.ecc.android.ZcashWalletApp |
|
|
|
import cash.z.ecc.android.di.DependenciesHolder |
|
|
@ -91,6 +92,7 @@ class WalletSetupViewModel : ViewModel() { |
|
|
|
* known by this point. |
|
|
|
*/ |
|
|
|
private suspend fun loadConfig(): Initializer.Config { |
|
|
|
|
|
|
|
twig("Loading config variables") |
|
|
|
var overwriteVks = false |
|
|
|
val network = ZcashWalletApp.instance.defaultNetwork |
|
|
@ -100,6 +102,10 @@ class WalletSetupViewModel : ViewModel() { |
|
|
|
val host = prefs[Const.Pref.SERVER_HOST] ?: Const.Default.Server.HOST |
|
|
|
val port = prefs[Const.Pref.SERVER_PORT] ?: Const.Default.Server.PORT |
|
|
|
|
|
|
|
Log.d("SilentDragon", "host: $host") |
|
|
|
|
|
|
|
// TODO: Maybe check server availability here |
|
|
|
|
|
|
|
twig("Done loading config variables") |
|
|
|
return Initializer.Config { |
|
|
|
it.importWallet(vk, birthdayHeight, network, LightWalletEndpoint(host, port, true)) |
|
|
|