mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-28 06:28:41 +01:00
Cw 865 create new seed UI for show seed keys page to match onboarding seed verification UI (#1961)
* update wallet keys page UI * localisation * hide keys tab for electrum wallets * Fix padding for tab view * Fix more padding * add height box for isLegacySeedOnly * revert adding tar.gz files [skip ci] --------- Co-authored-by: tuxpizza <tuxsudo@tux.pizza>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/widgets/seedphrase_grid_widget.dart';
|
||||
import 'package:cake_wallet/src/widgets/warning_box_widget.dart';
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
||||
import 'package:cake_wallet/utils/clipboard_util.dart';
|
||||
import 'package:cake_wallet/utils/share_util.dart';
|
||||
import 'package:cake_wallet/utils/responsive_layout_util.dart';
|
||||
import 'package:cake_wallet/utils/show_bar.dart';
|
||||
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
@@ -16,14 +16,9 @@ import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/view_model/wallet_seed_view_model.dart';
|
||||
|
||||
import '../../../themes/extensions/send_page_theme.dart';
|
||||
|
||||
class WalletSeedPage extends BasePage {
|
||||
WalletSeedPage(this.walletSeedViewModel, {required this.isNewWalletCreated});
|
||||
|
||||
final imageLight = Image.asset('assets/images/crypto_lock_light.png');
|
||||
final imageDark = Image.asset('assets/images/crypto_lock.png');
|
||||
|
||||
@override
|
||||
String get title => S.current.seed_title;
|
||||
|
||||
@@ -68,7 +63,6 @@ class WalletSeedPage extends BasePage {
|
||||
return WillPopScope(
|
||||
onWillPop: () async => false,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
||||
alignment: Alignment.center,
|
||||
child: ConstrainedBox(
|
||||
constraints:
|
||||
@@ -79,46 +73,14 @@ class WalletSeedPage extends BasePage {
|
||||
Observer(
|
||||
builder: (_) {
|
||||
return Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 22, right: 22),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: currentTheme.type == ThemeType.dark
|
||||
? Color.fromRGBO(132, 110, 64, 1)
|
||||
: Color.fromRGBO(194, 165, 94, 1),
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
border: Border.all(
|
||||
color: currentTheme.type == ThemeType.dark
|
||||
? Color.fromRGBO(177, 147, 41, 1)
|
||||
: Color.fromRGBO(125, 122, 15, 1),
|
||||
width: 2.0,
|
||||
)),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.warning_amber_rounded,
|
||||
size: 64,
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
),
|
||||
SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: Text(
|
||||
S.current.cake_seeds_save_disclaimer,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: currentTheme.type == ThemeType.dark
|
||||
? Colors.white.withOpacity(0.75)
|
||||
: Colors.white.withOpacity(0.85),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
WarningBox(
|
||||
content: S.current.cake_seeds_save_disclaimer,
|
||||
currentTheme: currentTheme),
|
||||
SizedBox(height: 20),
|
||||
Text(
|
||||
key: ValueKey('wallet_seed_page_wallet_name_text_key'),
|
||||
@@ -131,70 +93,19 @@ class WalletSeedPage extends BasePage {
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
Expanded(
|
||||
child: GridView.builder(
|
||||
itemCount: walletSeedViewModel.seedSplit.length,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
childAspectRatio: 2.8,
|
||||
mainAxisSpacing: 8.0,
|
||||
crossAxisSpacing: 8.0,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
final item = walletSeedViewModel.seedSplit[index];
|
||||
final numberCount = index + 1;
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).cardColor,
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
child: Text(
|
||||
//maxLines: 1,
|
||||
numberCount.toString(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
height: 1,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.buttonTextColor
|
||||
.withOpacity(0.5)),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'${item[0].toLowerCase()}${item.substring(1)}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
height: 0.8,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.buttonTextColor),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
child: SeedPhraseGridWidget(list: walletSeedViewModel.seedSplit),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
Row(
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
@@ -233,6 +144,7 @@ class WalletSeedPage extends BasePage {
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:cake_wallet/entities/qr_view_data.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/widgets/list_row.dart';
|
||||
import 'package:cake_wallet/src/widgets/section_divider.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||
import 'package:cake_wallet/src/widgets/seedphrase_grid_widget.dart';
|
||||
import 'package:cake_wallet/src/widgets/text_info_box.dart';
|
||||
import 'package:cake_wallet/src/widgets/warning_box_widget.dart';
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
import 'package:cake_wallet/utils/brightness_util.dart';
|
||||
import 'package:cake_wallet/utils/clipboard_util.dart';
|
||||
import 'package:cake_wallet/utils/show_bar.dart';
|
||||
import 'package:cake_wallet/view_model/wallet_keys_view_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
||||
|
||||
class WalletKeysPage extends BasePage {
|
||||
WalletKeysPage(this.walletKeysViewModel);
|
||||
@@ -24,95 +26,290 @@ class WalletKeysPage extends BasePage {
|
||||
final WalletKeysViewModel walletKeysViewModel;
|
||||
|
||||
@override
|
||||
Widget trailing(BuildContext context) => IconButton(
|
||||
key: ValueKey('wallet_keys_page_fullscreen_qr_button_key'),
|
||||
onPressed: () async {
|
||||
final url = await walletKeysViewModel.url;
|
||||
Widget body(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 14, right: 14, bottom: 8),
|
||||
child: WarningBox(
|
||||
key: const ValueKey('wallet_keys_page_share_warning_text_key'),
|
||||
content: S.of(context).do_not_share_warning_text.toUpperCase(),
|
||||
currentTheme: currentTheme,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: WalletKeysPageBody(
|
||||
walletKeysViewModel: walletKeysViewModel,
|
||||
currentTheme: currentTheme,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
BrightnessUtil.changeBrightnessForFunction(() async {
|
||||
await Navigator.pushNamed(
|
||||
context,
|
||||
Routes.fullscreenQR,
|
||||
arguments: QrViewData(data: url.toString(), version: QrVersions.auto),
|
||||
);
|
||||
});
|
||||
},
|
||||
splashColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
icon: Image.asset(
|
||||
'assets/images/qr_code_icon.png',
|
||||
),
|
||||
);
|
||||
class WalletKeysPageBody extends StatefulWidget {
|
||||
WalletKeysPageBody({
|
||||
required this.walletKeysViewModel,
|
||||
required this.currentTheme,
|
||||
});
|
||||
|
||||
final WalletKeysViewModel walletKeysViewModel;
|
||||
final ThemeBase currentTheme;
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
State<StatefulWidget> createState() => _WalletKeysPageBodyState();
|
||||
}
|
||||
|
||||
class _WalletKeysPageBodyState extends State<WalletKeysPageBody>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late TabController _tabController;
|
||||
late bool showKeyTab;
|
||||
late bool showLegacySeedTab;
|
||||
late bool isLegacySeedOnly;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
showKeyTab = widget.walletKeysViewModel.items.isNotEmpty;
|
||||
showLegacySeedTab = widget.walletKeysViewModel.legacySeedSplit.isNotEmpty;
|
||||
isLegacySeedOnly = widget.walletKeysViewModel.isLegacySeedOnly;
|
||||
|
||||
final totalTabs = 1 + (showKeyTab ? 1 : 0) + (showLegacySeedTab ? 1 : 0);
|
||||
|
||||
_tabController = TabController(length: totalTabs, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_tabController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 22, right: 22, top: 0),
|
||||
child: TabBar(
|
||||
controller: _tabController,
|
||||
splashFactory: NoSplash.splashFactory,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
isScrollable: true,
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'Lato',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Theme.of(context).appBarTheme.titleTextStyle!.color,
|
||||
),
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'Lato',
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Theme.of(context).appBarTheme.titleTextStyle!.color?.withOpacity(0.5),
|
||||
),
|
||||
labelColor: Theme.of(context).appBarTheme.titleTextStyle!.color,
|
||||
indicatorColor: Theme.of(context).appBarTheme.titleTextStyle!.color,
|
||||
indicatorPadding: EdgeInsets.zero,
|
||||
labelPadding: const EdgeInsets.only(right: 24),
|
||||
tabAlignment: TabAlignment.start,
|
||||
dividerColor: Colors.transparent,
|
||||
padding: EdgeInsets.zero,
|
||||
tabs: [
|
||||
Tab(text: S.of(context).widgets_seed),
|
||||
if (showKeyTab) Tab(text: S.of(context).keys),
|
||||
if (showLegacySeedTab) Tab(text: S.of(context).legacy),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 22, right: 22,),
|
||||
child: _buildSeedTab(context, false),
|
||||
),
|
||||
if (showKeyTab)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 22, right: 22),
|
||||
child: _buildKeysTab(context),
|
||||
),
|
||||
if (showLegacySeedTab)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 22, right: 22),
|
||||
child: _buildSeedTab(context, showLegacySeedTab),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSeedTab(BuildContext context, bool isLegacySeed) {
|
||||
return Column(
|
||||
children: [
|
||||
if (isLegacySeedOnly || isLegacySeed) _buildHeightBox(),
|
||||
const SizedBox(height: 20),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
color: Theme.of(context).cardColor,
|
||||
),
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: AutoSizeText(
|
||||
key: ValueKey('wallet_keys_page_share_warning_text_key'),
|
||||
S.of(context).do_not_share_warning_text.toUpperCase(),
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 4,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: SeedPhraseGridWidget(
|
||||
list: isLegacySeed
|
||||
? widget.walletKeysViewModel.legacySeedSplit
|
||||
: widget.walletKeysViewModel.seedSplit,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 7,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: 20.0, bottom: 20.0),
|
||||
child: Observer(
|
||||
builder: (_) {
|
||||
return ListView.separated(
|
||||
key: ValueKey('wallet_keys_page_credentials_list_view_key'),
|
||||
separatorBuilder: (context, index) => Container(
|
||||
height: 1,
|
||||
padding: EdgeInsets.only(left: 24),
|
||||
color: Theme.of(context).extension<PickerTheme>()!.dividerColor,
|
||||
child: const HorizontalSectionDivider(),
|
||||
),
|
||||
itemCount: walletKeysViewModel.items.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
final item = walletKeysViewModel.items[index];
|
||||
|
||||
return GestureDetector(
|
||||
key: item.key,
|
||||
onTap: () {
|
||||
ClipboardUtil.setSensitiveDataToClipboard(ClipboardData(text: item.value));
|
||||
showBar<void>(context, S.of(context).copied_key_to_clipboard(item.title));
|
||||
},
|
||||
child: ListRow(
|
||||
title: item.title + ':',
|
||||
value: item.value,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
_buildBottomActionPanel(
|
||||
titleForClipboard: S.of(context).wallet_seed.toLowerCase(),
|
||||
dataToCopy: isLegacySeed
|
||||
? widget.walletKeysViewModel.legacySeed
|
||||
: widget.walletKeysViewModel.seed,
|
||||
onShowQR: () async => _showQR(context, false),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildKeysTab(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
itemCount: widget.walletKeysViewModel.items.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item = widget.walletKeysViewModel.items[index];
|
||||
return TextInfoBox(
|
||||
key: item.key,
|
||||
title: item.title,
|
||||
value: item.value,
|
||||
onCopy: (context) => _onCopy(item.title, item.value, context),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) => const SizedBox(height: 20),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildHeightBox() {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 14),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).cardColor,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
S.of(context).block_height,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor.withOpacity(0.5),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: FutureBuilder<String?>(
|
||||
future: widget.walletKeysViewModel.restoreHeight,
|
||||
builder: (context, snapshot) {
|
||||
final textToDisplay = snapshot.connectionState == ConnectionState.waiting
|
||||
? 'Fetching...'
|
||||
: (snapshot.data ?? '---');
|
||||
|
||||
return Text(
|
||||
textToDisplay,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget _buildBottomActionPanel({
|
||||
required String titleForClipboard,
|
||||
required String dataToCopy,
|
||||
required VoidCallback onShowQR,
|
||||
}) {
|
||||
return Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(right: 8.0, top: 8.0),
|
||||
child: PrimaryButton(
|
||||
key: const ValueKey('wallet_keys_page_copy_seeds_button_key'),
|
||||
onPressed: () => _onCopy(titleForClipboard, dataToCopy, context),
|
||||
text: S.of(context).copy,
|
||||
color: Theme.of(context).cardColor,
|
||||
textColor: widget.currentTheme.type == ThemeType.dark
|
||||
? Theme.of(context).extension<DashboardPageTheme>()!.textColor
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(left: 8.0, top: 8.0),
|
||||
child: PrimaryButton(
|
||||
key: const ValueKey('wallet_keys_page_show_qr_seeds_button_key'),
|
||||
onPressed: onShowQR,
|
||||
text: S.current.show + ' QR',
|
||||
color: Theme.of(context).primaryColor,
|
||||
textColor: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _onCopy(String title, String text, BuildContext context) async {
|
||||
await ClipboardUtil.setSensitiveDataToClipboard(ClipboardData(text: text));
|
||||
showBar<void>(context, S.of(context).copied_key_to_clipboard(title));
|
||||
}
|
||||
|
||||
Future<void> _showQR(BuildContext context, bool isLegacySeed) async {
|
||||
final url = await widget.walletKeysViewModel.getUrl(isLegacySeed);
|
||||
|
||||
BrightnessUtil.changeBrightnessForFunction(() async {
|
||||
await Navigator.pushNamed(
|
||||
context,
|
||||
Routes.fullscreenQR,
|
||||
arguments: QrViewData(data: url.toString(), version: QrVersions.auto),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SeedPhraseGridWidget extends StatelessWidget {
|
||||
const SeedPhraseGridWidget({
|
||||
super.key,
|
||||
required this.list,
|
||||
});
|
||||
|
||||
final List<String> list;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GridView.builder(
|
||||
itemCount: list.length,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
childAspectRatio: 2.8,
|
||||
mainAxisSpacing: 8.0,
|
||||
crossAxisSpacing: 8.0,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
final item = list[index];
|
||||
final numberCount = index + 1;
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).cardColor,
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
child: Text(
|
||||
//maxLines: 1,
|
||||
numberCount.toString(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
height: 1,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.buttonTextColor
|
||||
.withOpacity(0.5)),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'${item[0].toLowerCase()}${item.substring(1)}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
height: 0.8,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TextInfoBox extends StatelessWidget {
|
||||
const TextInfoBox({Key? key, required this.title, required this.value, this.onCopy})
|
||||
: super(key: key);
|
||||
|
||||
final String title;
|
||||
final String value;
|
||||
final void Function(BuildContext context)? onCopy;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).cardColor,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(title,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.buttonTextColor
|
||||
.withOpacity(0.5))),
|
||||
GestureDetector(
|
||||
onTap: onCopy != null ? () => onCopy!(context) : null,
|
||||
child: Icon(Icons.copy,
|
||||
size: 13,
|
||||
color: Theme.of(context).textTheme.bodyLarge?.color?.withOpacity(0.7))),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(value,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class WarningBox extends StatelessWidget {
|
||||
const WarningBox({required this.content, required this.currentTheme, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
final String content;
|
||||
final ThemeBase currentTheme;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: currentTheme.type == ThemeType.dark
|
||||
? Color.fromRGBO(132, 110, 64, 1)
|
||||
: Color.fromRGBO(194, 165, 94, 1),
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
border: Border.all(
|
||||
color: currentTheme.type == ThemeType.dark
|
||||
? Color.fromRGBO(177, 147, 41, 1)
|
||||
: Color.fromRGBO(125, 122, 15, 1),
|
||||
width: 2.0,
|
||||
)),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.warning_amber_rounded,
|
||||
size: 64,
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
),
|
||||
SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: Text(
|
||||
content,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: currentTheme.type == ThemeType.dark
|
||||
? Colors.white.withOpacity(0.75)
|
||||
: Colors.white.withOpacity(0.85),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import 'package:cake_wallet/haven/haven.dart';
|
||||
import 'package:cake_wallet/monero/monero.dart';
|
||||
import 'package:cake_wallet/reactions/wallet_connect.dart';
|
||||
import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart';
|
||||
import 'package:cake_wallet/src/widgets/text_info_box.dart';
|
||||
import 'package:cake_wallet/store/app_store.dart';
|
||||
import 'package:cake_wallet/wownero/wownero.dart';
|
||||
import 'package:cw_core/transaction_direction.dart';
|
||||
@@ -20,32 +21,29 @@ class WalletKeysViewModel = WalletKeysViewModelBase with _$WalletKeysViewModel;
|
||||
|
||||
abstract class WalletKeysViewModelBase with Store {
|
||||
WalletKeysViewModelBase(this._appStore)
|
||||
: title = _appStore.wallet!.type == WalletType.bitcoin ||
|
||||
_appStore.wallet!.type == WalletType.litecoin ||
|
||||
_appStore.wallet!.type == WalletType.bitcoinCash
|
||||
? S.current.wallet_seed
|
||||
: S.current.wallet_keys,
|
||||
: title = S.current.wallet_keys,
|
||||
_wallet = _appStore.wallet!,
|
||||
_walletName = _appStore.wallet!.type.name,
|
||||
_restoreHeight = _appStore.wallet!.walletInfo.restoreHeight,
|
||||
_restoreHeightByTransactions = 0,
|
||||
items = ObservableList<StandartListItem>() {
|
||||
_populateItems();
|
||||
_populateKeysItems();
|
||||
|
||||
reaction((_) => _appStore.wallet, (WalletBase? _wallet) {
|
||||
_populateItems();
|
||||
_populateKeysItems();
|
||||
});
|
||||
|
||||
if (_appStore.wallet!.type == WalletType.monero ||
|
||||
_appStore.wallet!.type == WalletType.haven ||
|
||||
_appStore.wallet!.type == WalletType.wownero) {
|
||||
final accountTransactions = _getWalletTransactions(_appStore.wallet!);
|
||||
if (_wallet.type == WalletType.monero ||
|
||||
_wallet.type == WalletType.haven ||
|
||||
_wallet.type == WalletType.wownero) {
|
||||
final accountTransactions = _getWalletTransactions(_wallet);
|
||||
if (accountTransactions.isNotEmpty) {
|
||||
final incomingAccountTransactions =
|
||||
accountTransactions.where((tx) => tx.direction == TransactionDirection.incoming);
|
||||
if (incomingAccountTransactions.isNotEmpty) {
|
||||
incomingAccountTransactions.toList().sort((a, b) => a.date.compareTo(b.date));
|
||||
_restoreHeightByTransactions = _getRestoreHeightByTransactions(
|
||||
_appStore.wallet!.type, incomingAccountTransactions.first.date);
|
||||
_restoreHeightByTransactions =
|
||||
_getRestoreHeightByTransactions(_wallet.type, incomingAccountTransactions.first.date);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,26 +52,61 @@ abstract class WalletKeysViewModelBase with Store {
|
||||
final ObservableList<StandartListItem> items;
|
||||
|
||||
final String title;
|
||||
|
||||
final WalletBase _wallet;
|
||||
final String _walletName;
|
||||
|
||||
AppStore get appStore => _appStore;
|
||||
|
||||
final AppStore _appStore;
|
||||
|
||||
final int _restoreHeight;
|
||||
|
||||
int _restoreHeightByTransactions;
|
||||
|
||||
void _populateItems() {
|
||||
AppStore get appStore => _appStore;
|
||||
|
||||
String get seed => _wallet.seed != null ? _wallet.seed! : '';
|
||||
|
||||
bool get isLegacySeedOnly =>
|
||||
(_wallet.type == WalletType.monero || _wallet.type == WalletType.wownero) &&
|
||||
_wallet.seed != null &&
|
||||
!Polyseed.isValidSeed(_wallet.seed!);
|
||||
|
||||
String get legacySeed {
|
||||
if ((_wallet.type == WalletType.monero || _wallet.type == WalletType.wownero) &&
|
||||
_wallet.seed != null &&
|
||||
Polyseed.isValidSeed(_wallet.seed!)) {
|
||||
final langName = PolyseedLang.getByPhrase(_wallet.seed!).nameEnglish;
|
||||
|
||||
if (_wallet.type == WalletType.monero) {
|
||||
return (_wallet as MoneroWalletBase).seedLegacy(langName);
|
||||
} else if (_wallet.type == WalletType.wownero) {
|
||||
return wownero!.getLegacySeed(_wallet, langName);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
String get legacyRestoreHeight {
|
||||
if (_wallet.type == WalletType.monero) {
|
||||
return monero!.getRestoreHeight(_wallet)?.toString() ?? '';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/// The Regex split the words based on any whitespace character.
|
||||
///
|
||||
/// Either standard ASCII space (U+0020) or the full-width space character (U+3000) used by the Japanese.
|
||||
List<String> get seedSplit => seed.isNotEmpty ? seed.split(RegExp(r'\s+')) : [];
|
||||
|
||||
List<String> get legacySeedSplit => legacySeed.isNotEmpty ? legacySeed.split(RegExp(r'\s+')) : [];
|
||||
|
||||
void _populateKeysItems() {
|
||||
items.clear();
|
||||
|
||||
if (_appStore.wallet!.type == WalletType.monero) {
|
||||
final keys = monero!.getKeys(_appStore.wallet!);
|
||||
if (_wallet.type == WalletType.monero) {
|
||||
final keys = monero!.getKeys(_wallet);
|
||||
|
||||
items.addAll([
|
||||
if (keys['primaryAddress'] != null)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_primary_address_item_key'),
|
||||
title: S.current.primary_address,
|
||||
value: keys['primaryAddress']!),
|
||||
if (keys['publicSpendKey'] != null)
|
||||
@@ -100,43 +133,16 @@ abstract class WalletKeysViewModelBase with Store {
|
||||
title: S.current.view_key_private,
|
||||
value: keys['privateViewKey']!,
|
||||
),
|
||||
if (_appStore.wallet!.seed!.isNotEmpty)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_seed_item_key'),
|
||||
title: S.current.wallet_seed,
|
||||
value: _appStore.wallet!.seed!,
|
||||
),
|
||||
]);
|
||||
|
||||
if (_appStore.wallet?.seed != null && Polyseed.isValidSeed(_appStore.wallet!.seed!)) {
|
||||
final lang = PolyseedLang.getByPhrase(_appStore.wallet!.seed!);
|
||||
items.add(
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_seed_legacy_item_key'),
|
||||
title: S.current.wallet_seed_legacy,
|
||||
value: (_appStore.wallet as MoneroWalletBase).seedLegacy(lang.nameEnglish),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final restoreHeight = monero!.getRestoreHeight(_appStore.wallet!);
|
||||
if (restoreHeight != null) {
|
||||
items.add(
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_restore_height_item_key'),
|
||||
title: S.current.wallet_recovery_height,
|
||||
value: restoreHeight.toString(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (_appStore.wallet!.type == WalletType.haven) {
|
||||
final keys = haven!.getKeys(_appStore.wallet!);
|
||||
if (_wallet.type == WalletType.haven) {
|
||||
final keys = haven!.getKeys(_wallet);
|
||||
|
||||
items.addAll([
|
||||
if (keys['primaryAddress'] != null)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_primary_address_item_key'),
|
||||
title: S.current.primary_address,
|
||||
value: keys['primaryAddress']!),
|
||||
if (keys['publicSpendKey'] != null)
|
||||
@@ -163,21 +169,16 @@ abstract class WalletKeysViewModelBase with Store {
|
||||
title: S.current.view_key_private,
|
||||
value: keys['privateViewKey']!,
|
||||
),
|
||||
if (_appStore.wallet!.seed!.isNotEmpty)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_seed_item_key'),
|
||||
title: S.current.wallet_seed,
|
||||
value: _appStore.wallet!.seed!,
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
if (_appStore.wallet!.type == WalletType.wownero) {
|
||||
final keys = wownero!.getKeys(_appStore.wallet!);
|
||||
if (_wallet.type == WalletType.wownero) {
|
||||
final keys = wownero!.getKeys(_wallet);
|
||||
|
||||
items.addAll([
|
||||
if (keys['primaryAddress'] != null)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_primary_address_item_key'),
|
||||
title: S.current.primary_address,
|
||||
value: keys['primaryAddress']!),
|
||||
if (keys['publicSpendKey'] != null)
|
||||
@@ -204,108 +205,73 @@ abstract class WalletKeysViewModelBase with Store {
|
||||
title: S.current.view_key_private,
|
||||
value: keys['privateViewKey']!,
|
||||
),
|
||||
if (_appStore.wallet!.seed!.isNotEmpty)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_seed_item_key'),
|
||||
title: S.current.wallet_seed,
|
||||
value: _appStore.wallet!.seed!,
|
||||
),
|
||||
]);
|
||||
|
||||
if (_appStore.wallet?.seed != null && Polyseed.isValidSeed(_appStore.wallet!.seed!)) {
|
||||
final lang = PolyseedLang.getByPhrase(_appStore.wallet!.seed!);
|
||||
items.add(
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_seed_legacy_item_key'),
|
||||
title: S.current.wallet_seed_legacy,
|
||||
value: wownero!.getLegacySeed(_appStore.wallet!, lang.nameEnglish),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (_appStore.wallet!.type == WalletType.bitcoin ||
|
||||
_appStore.wallet!.type == WalletType.litecoin ||
|
||||
_appStore.wallet!.type == WalletType.bitcoinCash) {
|
||||
// final keys = bitcoin!.getWalletKeys(_appStore.wallet!);
|
||||
|
||||
items.addAll([
|
||||
// if (keys['wif'] != null)
|
||||
// StandartListItem(title: "WIF", value: keys['wif']!),
|
||||
// if (keys['privateKey'] != null)
|
||||
// StandartListItem(title: S.current.private_key, value: keys['privateKey']!),
|
||||
// if (keys['publicKey'] != null)
|
||||
// StandartListItem(title: S.current.public_key, value: keys['publicKey']!),
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_seed_item_key'),
|
||||
title: S.current.wallet_seed,
|
||||
value: _appStore.wallet!.seed!,
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
if (isEVMCompatibleChain(_appStore.wallet!.type) ||
|
||||
_appStore.wallet!.type == WalletType.solana ||
|
||||
_appStore.wallet!.type == WalletType.tron) {
|
||||
// if (_wallet.type == WalletType.bitcoin ||
|
||||
// _wallet.type == WalletType.litecoin ||
|
||||
// _wallet.type == WalletType.bitcoinCash) {
|
||||
// final keys = bitcoin!.getWalletKeys(_appStore.wallet!);
|
||||
//
|
||||
// items.addAll([
|
||||
// if (keys['wif'] != null)
|
||||
// StandartListItem(title: "WIF", value: keys['wif']!),
|
||||
// if (keys['privateKey'] != null)
|
||||
// StandartListItem(title: S.current.private_key, value: keys['privateKey']!),
|
||||
// if (keys['publicKey'] != null)
|
||||
// StandartListItem(title: S.current.public_key, value: keys['publicKey']!),
|
||||
// ]);
|
||||
// }
|
||||
|
||||
if (isEVMCompatibleChain(_wallet.type) ||
|
||||
_wallet.type == WalletType.solana ||
|
||||
_wallet.type == WalletType.tron) {
|
||||
items.addAll([
|
||||
if (_appStore.wallet!.privateKey != null)
|
||||
if (_wallet.privateKey != null)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_private_key_item_key'),
|
||||
title: S.current.private_key,
|
||||
value: _appStore.wallet!.privateKey!,
|
||||
),
|
||||
if (_appStore.wallet!.seed != null)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_seed_item_key'),
|
||||
title: S.current.wallet_seed,
|
||||
value: _appStore.wallet!.seed!,
|
||||
value: _wallet.privateKey!,
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
bool nanoBased =
|
||||
_appStore.wallet!.type == WalletType.nano || _appStore.wallet!.type == WalletType.banano;
|
||||
bool nanoBased = _wallet.type == WalletType.nano || _wallet.type == WalletType.banano;
|
||||
|
||||
if (nanoBased) {
|
||||
// we always have the hex version of the seed and private key:
|
||||
items.addAll([
|
||||
if (_appStore.wallet!.seed != null)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_seed_item_key'),
|
||||
title: S.current.wallet_seed,
|
||||
value: _appStore.wallet!.seed!,
|
||||
),
|
||||
if (_appStore.wallet!.hexSeed != null)
|
||||
if (_wallet.hexSeed != null)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_hex_seed_key'),
|
||||
title: S.current.seed_hex_form,
|
||||
value: _appStore.wallet!.hexSeed!,
|
||||
value: _wallet.hexSeed!,
|
||||
),
|
||||
if (_appStore.wallet!.privateKey != null)
|
||||
if (_wallet.privateKey != null)
|
||||
StandartListItem(
|
||||
key: ValueKey('${_walletName}_wallet_private_key_item_key'),
|
||||
title: S.current.private_key,
|
||||
value: _appStore.wallet!.privateKey!,
|
||||
value: _wallet.privateKey!,
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Future<int?> _currentHeight() async {
|
||||
if (_appStore.wallet!.type == WalletType.haven) {
|
||||
if (_wallet.type == WalletType.haven) {
|
||||
return await haven!.getCurrentHeight();
|
||||
}
|
||||
if (_appStore.wallet!.type == WalletType.monero) {
|
||||
if (_wallet.type == WalletType.monero) {
|
||||
return await monero!.getCurrentHeight();
|
||||
}
|
||||
if (_appStore.wallet!.type == WalletType.wownero) {
|
||||
if (_wallet.type == WalletType.wownero) {
|
||||
return await wownero!.getCurrentHeight();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
String get _scheme {
|
||||
switch (_appStore.wallet!.type) {
|
||||
switch (_wallet.type) {
|
||||
case WalletType.monero:
|
||||
return 'monero-wallet';
|
||||
case WalletType.bitcoin:
|
||||
@@ -331,7 +297,7 @@ abstract class WalletKeysViewModelBase with Store {
|
||||
case WalletType.wownero:
|
||||
return 'wownero-wallet';
|
||||
default:
|
||||
throw Exception('Unexpected wallet type: ${_appStore.wallet!.type.toString()}');
|
||||
throw Exception('Unexpected wallet type: ${_wallet.type.toString()}');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,19 +315,26 @@ abstract class WalletKeysViewModelBase with Store {
|
||||
Future<Map<String, String>> get _queryParams async {
|
||||
final restoreHeightResult = await restoreHeight;
|
||||
return {
|
||||
if (_appStore.wallet!.seed != null) 'seed': _appStore.wallet!.seed!,
|
||||
if (_appStore.wallet!.seed == null && _appStore.wallet!.hexSeed != null)
|
||||
'hexSeed': _appStore.wallet!.hexSeed!,
|
||||
if (_appStore.wallet!.seed == null && _appStore.wallet!.privateKey != null)
|
||||
'private_key': _appStore.wallet!.privateKey!,
|
||||
if (_wallet.seed != null) 'seed': _wallet.seed!,
|
||||
if (_wallet.seed == null && _wallet.hexSeed != null) 'hexSeed': _wallet.hexSeed!,
|
||||
if (_wallet.seed == null && _wallet.privateKey != null) 'private_key': _wallet.privateKey!,
|
||||
if (restoreHeightResult != null) ...{'height': restoreHeightResult},
|
||||
if (_appStore.wallet!.passphrase != null) 'passphrase': _appStore.wallet!.passphrase!
|
||||
if (_wallet.passphrase != null) 'passphrase': _wallet.passphrase!
|
||||
};
|
||||
}
|
||||
|
||||
Future<Uri> get url async => Uri(
|
||||
Future<Map<String, String>> get _queryParamsForLegacy async {
|
||||
final restoreHeightResult = await restoreHeight;
|
||||
return {
|
||||
if (legacySeed.isNotEmpty) 'seed': legacySeed,
|
||||
if (restoreHeightResult != null) ...{'height': restoreHeightResult},
|
||||
if (_wallet.passphrase != null) 'passphrase': _wallet.passphrase!
|
||||
};
|
||||
}
|
||||
|
||||
Future<Uri> getUrl(bool isLegacySeed) async => Uri(
|
||||
scheme: _scheme,
|
||||
queryParameters: await _queryParams,
|
||||
queryParameters: isLegacySeed ? await _queryParamsForLegacy : await _queryParams,
|
||||
);
|
||||
|
||||
List<TransactionInfo> _getWalletTransactions(WalletBase wallet) {
|
||||
|
||||
Reference in New Issue
Block a user