mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
fix back up views
This commit is contained in:
parent
5452598064
commit
3177fadea6
2 changed files with 17 additions and 15 deletions
|
@ -89,9 +89,10 @@ class WalletBackupView extends ConsumerWidget {
|
|||
Padding(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: CustomTextButton(
|
||||
text: switch (keyData.runtimeType) {
|
||||
const (XPrivData) => "xpriv(s)",
|
||||
const (CWKeyData) => "keys",
|
||||
text: switch (keyData) {
|
||||
final XPrivData _ => "xpriv(s)",
|
||||
final CWKeyData _ => "keys",
|
||||
final ViewOnlyWalletData _ => "keys",
|
||||
_ => throw UnimplementedError(
|
||||
"Don't forget to add your KeyDataInterface here! ${keyData.runtimeType}",
|
||||
),
|
||||
|
@ -454,10 +455,10 @@ class MobileKeyDataView extends ConsumerWidget {
|
|||
},
|
||||
),
|
||||
title: Text(
|
||||
"Wallet ${switch (keyData.runtimeType) {
|
||||
const (XPrivData) => "xpriv(s)",
|
||||
const (CWKeyData) => "keys",
|
||||
const (ViewOnlyWalletData) => "keys",
|
||||
"Wallet ${switch (keyData) {
|
||||
final XPrivData _ => "xpriv(s)",
|
||||
final CWKeyData _ => "keys",
|
||||
final ViewOnlyWalletData _ => "keys",
|
||||
_ => throw UnimplementedError(
|
||||
"Don't forget to add your KeyDataInterface here!",
|
||||
),
|
||||
|
@ -477,18 +478,18 @@ class MobileKeyDataView extends ConsumerWidget {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Expanded(
|
||||
child: switch (keyData.runtimeType) {
|
||||
const (XPrivData) => WalletXPrivs(
|
||||
child: switch (keyData) {
|
||||
final XPrivData e => WalletXPrivs(
|
||||
walletId: walletId,
|
||||
xprivData: keyData as XPrivData,
|
||||
xprivData: e,
|
||||
),
|
||||
const (CWKeyData) => CNWalletKeys(
|
||||
final CWKeyData e => CNWalletKeys(
|
||||
walletId: walletId,
|
||||
cwKeyData: keyData as CWKeyData,
|
||||
cwKeyData: e,
|
||||
),
|
||||
const (ViewOnlyWalletData) =>
|
||||
final ViewOnlyWalletData e =>
|
||||
ViewOnlyWalletDataWidget(
|
||||
data: keyData as ViewOnlyWalletData,
|
||||
data: e,
|
||||
),
|
||||
_ => throw UnimplementedError(
|
||||
"Don't forget to add your KeyDataInterface here!",
|
||||
|
|
|
@ -342,7 +342,8 @@ class _WalletSettingsViewState extends ConsumerState<WalletSettingsView> {
|
|||
if (context.mounted) {
|
||||
if (keyData != null &&
|
||||
wallet
|
||||
is ViewOnlyOptionInterface) {
|
||||
is ViewOnlyOptionInterface &&
|
||||
wallet.isViewOnly) {
|
||||
await Navigator.push(
|
||||
context,
|
||||
RouteGenerator.getRoute(
|
||||
|
|
Loading…
Reference in a new issue