mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
Merge branch 'staging' into ui-fixes
This commit is contained in:
commit
2765bea4a9
19 changed files with 1171 additions and 1403 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit de29931dacc9aefaf42a9ca139a8754a42adc40d
|
Subproject commit d636f16aa0079c7ef47f0c8547fba1635e5eb33b
|
|
@ -2,10 +2,10 @@ FROM ubuntu:20.04 as base
|
||||||
COPY . /stack_wallet
|
COPY . /stack_wallet
|
||||||
WORKDIR /stack_wallet/scripts/linux
|
WORKDIR /stack_wallet/scripts/linux
|
||||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y git=1:2.25.1-1ubuntu3.6 make=4.2.1-1.2 curl=7.68.0-1ubuntu2.14 cargo=0.62.0ubuntu0libgit2-0ubuntu0.20.04.1 \
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y git=1:2.25.1-1ubuntu3.6 make=4.2.1-1.2 curl=7.68.0-1ubuntu2.14 cargo=0.62.0ubuntu0libgit2-0ubuntu0.20.04.1 \
|
||||||
file=1:5.38-4 ca-certificates=20211016~20.04.1 cmake=3.16.3-1ubuntu1.20.04.1 cmake-data=3.16.3-1ubuntu1.20.04.1 g++=4:9.3.0-1ubuntu2 libgmp-dev=2:6.2.0+dfsg-4ubuntu0.1 libssl-dev=1.1.1f-1ubuntu2.16 libclang-dev=1:10.0-50~exp1 \
|
file=1:5.38-4 ca-certificates=20211016ubuntu0.20.04.1 cmake=3.16.3-1ubuntu1.20.04.1 cmake-data=3.16.3-1ubuntu1.20.04.1 g++=4:9.3.0-1ubuntu2 libgmp-dev=2:6.2.0+dfsg-4ubuntu0.1 libssl-dev=1.1.1f-1ubuntu2.16 \
|
||||||
unzip=6.0-25ubuntu1.1 python3=3.8.2-0ubuntu2 pkg-config=0.29.1-0ubuntu4 libglib2.0-dev=2.64.6-1~ubuntu20.04.4 libgcrypt20-dev=1.8.5-5ubuntu1.1 gettext-base=0.19.8.1-10build1 libgirepository1.0-dev=1.64.1-1~ubuntu20.04.1 \
|
libclang-dev=1:10.0-50~exp1 unzip=6.0-25ubuntu1.1 python3=3.8.2-0ubuntu2 pkg-config=0.29.1-0ubuntu4 libglib2.0-dev=2.64.6-1~ubuntu20.04.4 libgcrypt20-dev=1.8.5-5ubuntu1.1 gettext-base=0.19.8.1-10build1 \
|
||||||
valac=0.48.6-0ubuntu1 xsltproc=1.1.34-4ubuntu0.20.04.1 docbook-xsl=1.79.1+dfsg-2 python3-pip=20.0.2-5ubuntu1.6 ninja-build=1.10.0-1build1 clang=1:10.0-50~exp1 libgtk-3-dev=3.24.20-0ubuntu1.1 \
|
libgirepository1.0-dev=1.64.1-1~ubuntu20.04.1 valac=0.48.6-0ubuntu1 xsltproc=1.1.34-4ubuntu0.20.04.1 docbook-xsl=1.79.1+dfsg-2 python3-pip=20.0.2-5ubuntu1.6 ninja-build=1.10.0-1build1 clang=1:10.0-50~exp1 \
|
||||||
libunbound-dev=1.9.4-2ubuntu1.4 libzmq3-dev=4.3.2-2ubuntu1 libtool=2.4.6-14 autoconf=2.69-11.1 automake=1:1.16.1-4ubuntu6 bison=2:3.5.1+dfsg-1 \
|
libgtk-3-dev=3.24.20-0ubuntu1.1 libunbound-dev=1.9.4-2ubuntu1.4 libzmq3-dev=4.3.2-2ubuntu1 libtool=2.4.6-14 autoconf=2.69-11.1 automake=1:1.16.1-4ubuntu6 bison=2:3.5.1+dfsg-1 \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& pip3 install --upgrade meson==0.64.1 markdown==3.4.1 markupsafe==2.1.1 jinja2==3.1.2 pygments==2.13.0 toml==0.10.2 typogrify==2.0.7 tomli==2.0.1 && cd .. && ./prebuild.sh && cd linux && ./build_all.sh
|
&& pip3 install --upgrade meson==0.64.1 markdown==3.4.1 markupsafe==2.1.1 jinja2==3.1.2 pygments==2.13.0 toml==0.10.2 typogrify==2.0.7 tomli==2.0.1 && cd .. && ./prebuild.sh && cd linux && ./build_all.sh
|
||||||
|
|
|
@ -19,6 +19,7 @@ import 'package:stackwallet/utilities/logger.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
import 'package:stackwallet/utilities/util.dart';
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
||||||
|
@ -105,8 +106,25 @@ class _NewWalletRecoveryPhraseWarningViewState
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: ConditionalParent(
|
||||||
padding: EdgeInsets.all(isDesktop ? 0 : 16),
|
condition: !isDesktop,
|
||||||
|
builder: (child) => LayoutBuilder(
|
||||||
|
builder: (context, constraints) {
|
||||||
|
return SingleChildScrollView(
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: constraints.maxHeight,
|
||||||
|
),
|
||||||
|
child: IntrinsicHeight(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: child,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: isDesktop
|
crossAxisAlignment: isDesktop
|
||||||
? CrossAxisAlignment.center
|
? CrossAxisAlignment.center
|
||||||
|
@ -315,9 +333,11 @@ class _NewWalletRecoveryPhraseWarningViewState
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 20,
|
width: 20,
|
||||||
),
|
),
|
||||||
Text(
|
Expanded(
|
||||||
"Do not show them to anyone.",
|
child: Text(
|
||||||
style: STextStyles.navBarTitle(context),
|
"Do not show them to anyone.",
|
||||||
|
style: STextStyles.navBarTitle(context),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -327,6 +347,10 @@ class _NewWalletRecoveryPhraseWarningViewState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (!isDesktop) const Spacer(),
|
if (!isDesktop) const Spacer(),
|
||||||
|
if (!isDesktop)
|
||||||
|
const SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
if (isDesktop)
|
if (isDesktop)
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 32,
|
height: 32,
|
||||||
|
|
|
@ -23,8 +23,6 @@ import 'package:stackwallet/utilities/util.dart';
|
||||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
||||||
import 'package:stackwallet/widgets/rounded_date_picker/flutter_rounded_date_picker_widget.dart'
|
|
||||||
as datePicker;
|
|
||||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
|
@ -154,10 +152,46 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
|
||||||
await Future<void>.delayed(const Duration(milliseconds: 125));
|
await Future<void>.delayed(const Duration(milliseconds: 125));
|
||||||
}
|
}
|
||||||
|
|
||||||
final date = await datePicker.showRoundedDatePicker(
|
final date = await showRoundedDatePicker(
|
||||||
context: context,
|
context: context,
|
||||||
initialDate: DateTime.now(),
|
initialDate: DateTime.now(),
|
||||||
height: height * 0.5,
|
height: height / 3.0,
|
||||||
|
theme: ThemeData(
|
||||||
|
primarySwatch: Util.createMaterialColor(fetchedColor),
|
||||||
|
),
|
||||||
|
//TODO pick a better initial date
|
||||||
|
// 2007 chosen as that is just before bitcoin launched
|
||||||
|
firstDate: DateTime(2007),
|
||||||
|
lastDate: DateTime.now(),
|
||||||
|
borderRadius: Constants.size.circularBorderRadius * 2,
|
||||||
|
|
||||||
|
textPositiveButton: "SELECT",
|
||||||
|
|
||||||
|
styleDatePicker: _buildDatePickerStyle(),
|
||||||
|
styleYearPicker: _buildYearPickerStyle(),
|
||||||
|
);
|
||||||
|
if (date != null) {
|
||||||
|
_restoreFromDate = date;
|
||||||
|
_dateController.text = Format.formatDate(date);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> chooseDesktopDate() async {
|
||||||
|
final height = MediaQuery.of(context).size.height;
|
||||||
|
final fetchedColor =
|
||||||
|
Theme.of(context).extension<StackColors>()!.accentColorDark;
|
||||||
|
// check and hide keyboard
|
||||||
|
if (FocusScope.of(context).hasFocus) {
|
||||||
|
FocusScope.of(context).unfocus();
|
||||||
|
await Future<void>.delayed(const Duration(milliseconds: 125));
|
||||||
|
}
|
||||||
|
|
||||||
|
final now = DateTime.now();
|
||||||
|
|
||||||
|
final date = await showRoundedDatePicker(
|
||||||
|
context: context,
|
||||||
|
initialDate: DateTime.now(),
|
||||||
|
height: height / 3.0,
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
primarySwatch: Util.createMaterialColor(fetchedColor),
|
primarySwatch: Util.createMaterialColor(fetchedColor),
|
||||||
),
|
),
|
||||||
|
@ -283,15 +317,22 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
|
||||||
(coin == Coin.wownero &&
|
(coin == Coin.wownero &&
|
||||||
ref.watch(mnemonicWordCountStateProvider.state).state ==
|
ref.watch(mnemonicWordCountStateProvider.state).state ==
|
||||||
25))
|
25))
|
||||||
|
if (!isDesktop)
|
||||||
// if (!isDesktop)
|
RestoreFromDatePicker(
|
||||||
RestoreFromDatePicker(
|
onTap: chooseDate,
|
||||||
onTap: chooseDate,
|
controller: _dateController,
|
||||||
controller: _dateController,
|
),
|
||||||
),
|
if (coin == Coin.monero ||
|
||||||
|
coin == Coin.epicCash ||
|
||||||
// if (isDesktop)
|
(coin == Coin.wownero &&
|
||||||
// // TODO desktop date picker
|
ref.watch(mnemonicWordCountStateProvider.state).state ==
|
||||||
|
25))
|
||||||
|
if (isDesktop)
|
||||||
|
// TODO desktop date picker
|
||||||
|
RestoreFromDatePicker(
|
||||||
|
onTap: chooseDesktopDate,
|
||||||
|
controller: _dateController,
|
||||||
|
),
|
||||||
if (coin == Coin.monero ||
|
if (coin == Coin.monero ||
|
||||||
coin == Coin.epicCash ||
|
coin == Coin.epicCash ||
|
||||||
(coin == Coin.wownero &&
|
(coin == Coin.wownero &&
|
||||||
|
@ -412,7 +453,6 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
|
||||||
isDesktop: isDesktop,
|
isDesktop: isDesktop,
|
||||||
onPressed: _nextEnabled ? nextPressed : null,
|
onPressed: _nextEnabled ? nextPressed : null,
|
||||||
),
|
),
|
||||||
|
|
||||||
if (isDesktop)
|
if (isDesktop)
|
||||||
const Spacer(
|
const Spacer(
|
||||||
flex: 15,
|
flex: 15,
|
||||||
|
|
|
@ -736,6 +736,8 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
TextFormField(
|
TextFormField(
|
||||||
|
autocorrect: !isDesktop,
|
||||||
|
enableSuggestions: !isDesktop,
|
||||||
textCapitalization:
|
textCapitalization:
|
||||||
TextCapitalization.none,
|
TextCapitalization.none,
|
||||||
key: Key(
|
key: Key(
|
||||||
|
@ -831,6 +833,8 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
TextFormField(
|
TextFormField(
|
||||||
|
autocorrect: !isDesktop,
|
||||||
|
enableSuggestions: !isDesktop,
|
||||||
textCapitalization:
|
textCapitalization:
|
||||||
TextCapitalization.none,
|
TextCapitalization.none,
|
||||||
key: Key(
|
key: Key(
|
||||||
|
@ -954,6 +958,8 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.symmetric(vertical: 4),
|
const EdgeInsets.symmetric(vertical: 4),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
autocorrect: !isDesktop,
|
||||||
|
enableSuggestions: !isDesktop,
|
||||||
textCapitalization:
|
textCapitalization:
|
||||||
TextCapitalization.none,
|
TextCapitalization.none,
|
||||||
key: Key("restoreMnemonicFormField_$i"),
|
key: Key("restoreMnemonicFormField_$i"),
|
||||||
|
|
|
@ -409,8 +409,9 @@ class _GenerateUriQrCodeViewState extends State<GenerateUriQrCodeView> {
|
||||||
height: 1.8,
|
height: 1.8,
|
||||||
)
|
)
|
||||||
: STextStyles.field(context),
|
: STextStyles.field(context),
|
||||||
keyboardType:
|
keyboardType: Util.isDesktop
|
||||||
const TextInputType.numberWithOptions(decimal: true),
|
? null
|
||||||
|
: const TextInputType.numberWithOptions(decimal: true),
|
||||||
onChanged: (_) => setState(() {}),
|
onChanged: (_) => setState(() {}),
|
||||||
decoration: standardInputDecoration(
|
decoration: standardInputDecoration(
|
||||||
"Amount",
|
"Amount",
|
||||||
|
|
|
@ -1111,10 +1111,12 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
const Key("amountInputFieldCryptoTextFieldKey"),
|
const Key("amountInputFieldCryptoTextFieldKey"),
|
||||||
controller: cryptoAmountController,
|
controller: cryptoAmountController,
|
||||||
focusNode: _cryptoFocus,
|
focusNode: _cryptoFocus,
|
||||||
keyboardType: const TextInputType.numberWithOptions(
|
keyboardType: Util.isDesktop
|
||||||
signed: false,
|
? null
|
||||||
decimal: true,
|
: const TextInputType.numberWithOptions(
|
||||||
),
|
signed: false,
|
||||||
|
decimal: true,
|
||||||
|
),
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
// regex to validate a crypto amount with 8 decimal places
|
// regex to validate a crypto amount with 8 decimal places
|
||||||
|
@ -1168,11 +1170,12 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
const Key("amountInputFieldFiatTextFieldKey"),
|
const Key("amountInputFieldFiatTextFieldKey"),
|
||||||
controller: baseAmountController,
|
controller: baseAmountController,
|
||||||
focusNode: _baseFocus,
|
focusNode: _baseFocus,
|
||||||
keyboardType:
|
keyboardType: Util.isDesktop
|
||||||
const TextInputType.numberWithOptions(
|
? null
|
||||||
signed: false,
|
: const TextInputType.numberWithOptions(
|
||||||
decimal: true,
|
signed: false,
|
||||||
),
|
decimal: true,
|
||||||
|
),
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
// regex to validate a fiat amount with 2 decimal places
|
// regex to validate a fiat amount with 2 decimal places
|
||||||
|
|
|
@ -391,7 +391,8 @@ class _EpiBoxInfoFormState extends ConsumerState<EpicBoxInfoForm> {
|
||||||
enableSuggestions: Util.isDesktop ? false : true,
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: portController,
|
controller: portController,
|
||||||
decoration: const InputDecoration(hintText: "Port"),
|
decoration: const InputDecoration(hintText: "Port"),
|
||||||
keyboardType: const TextInputType.numberWithOptions(),
|
keyboardType:
|
||||||
|
Util.isDesktop ? null : const TextInputType.numberWithOptions(),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 8,
|
height: 8,
|
||||||
|
|
|
@ -739,10 +739,12 @@ class _TransactionSearchViewState
|
||||||
controller: _amountTextEditingController,
|
controller: _amountTextEditingController,
|
||||||
focusNode: amountTextFieldFocusNode,
|
focusNode: amountTextFieldFocusNode,
|
||||||
onChanged: (_) => setState(() {}),
|
onChanged: (_) => setState(() {}),
|
||||||
keyboardType: const TextInputType.numberWithOptions(
|
keyboardType: Util.isDesktop
|
||||||
signed: false,
|
? null
|
||||||
decimal: true,
|
: const TextInputType.numberWithOptions(
|
||||||
),
|
signed: false,
|
||||||
|
decimal: true,
|
||||||
|
),
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
// regex to validate a crypto amount with 8 decimal places
|
// regex to validate a crypto amount with 8 decimal places
|
||||||
TextInputFormatter.withFunction((oldValue, newValue) =>
|
TextInputFormatter.withFunction((oldValue, newValue) =>
|
||||||
|
|
|
@ -42,6 +42,9 @@ class _ContactListItemState extends ConsumerState<ContactListItem> {
|
||||||
final contact = ref.watch(addressBookServiceProvider
|
final contact = ref.watch(addressBookServiceProvider
|
||||||
.select((value) => value.getContactById(contactId)));
|
.select((value) => value.getContactById(contactId)));
|
||||||
|
|
||||||
|
// hack fix until we use a proper database (not Hive)
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
return RoundedWhiteContainer(
|
return RoundedWhiteContainer(
|
||||||
padding: const EdgeInsets.all(0),
|
padding: const EdgeInsets.all(0),
|
||||||
borderColor: Theme.of(context).extension<StackColors>()!.background,
|
borderColor: Theme.of(context).extension<StackColors>()!.background,
|
||||||
|
@ -70,7 +73,8 @@ class _ContactListItemState extends ConsumerState<ContactListItem> {
|
||||||
filterByCoin != null ? e.coin == filterByCoin! : true)
|
filterByCoin != null ? e.coin == filterByCoin! : true)
|
||||||
.map(
|
.map(
|
||||||
(e) => Column(
|
(e) => Column(
|
||||||
key: Key("contactAddress_${e.address}_${e.label}_key"),
|
key: Key(
|
||||||
|
"contactAddress_${e.address}_${e.label}_${++i}_key"),
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
|
|
@ -140,17 +140,21 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
),
|
),
|
||||||
Padding(
|
Row(
|
||||||
padding: const EdgeInsets.only(
|
children: [
|
||||||
right: 32,
|
Expanded(
|
||||||
),
|
child: SecondaryButton(
|
||||||
child: SecondaryButton(
|
buttonHeight: ButtonHeight.l,
|
||||||
buttonHeight: ButtonHeight.l,
|
label: "Ok",
|
||||||
label: "Ok",
|
onPressed: () {
|
||||||
onPressed: () {
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context).pop();
|
},
|
||||||
},
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 32,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -319,13 +323,13 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wasCancelled && mounted) {
|
if (!wasCancelled && mounted) {
|
||||||
|
txData["note"] = _note ?? "";
|
||||||
|
txData["address"] = _address;
|
||||||
// pop building dialog
|
// pop building dialog
|
||||||
Navigator.of(
|
Navigator.of(
|
||||||
context,
|
context,
|
||||||
rootNavigator: true,
|
rootNavigator: true,
|
||||||
).pop();
|
).pop();
|
||||||
txData["note"] = _note;
|
|
||||||
txData["address"] = _address;
|
|
||||||
|
|
||||||
unawaited(
|
unawaited(
|
||||||
showDialog(
|
showDialog(
|
||||||
|
@ -394,22 +398,24 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
),
|
),
|
||||||
Padding(
|
Row(
|
||||||
padding: const EdgeInsets.only(
|
children: [
|
||||||
right: 32,
|
Expanded(
|
||||||
),
|
child: SecondaryButton(
|
||||||
child: Expanded(
|
buttonHeight: ButtonHeight.l,
|
||||||
child: SecondaryButton(
|
label: "Ok",
|
||||||
buttonHeight: ButtonHeight.l,
|
onPressed: () {
|
||||||
label: "Yes",
|
Navigator.of(
|
||||||
onPressed: () {
|
context,
|
||||||
Navigator.of(
|
rootNavigator: true,
|
||||||
context,
|
).pop();
|
||||||
rootNavigator: true,
|
},
|
||||||
).pop();
|
),
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(
|
||||||
|
width: 32,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1002,10 +1008,12 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
||||||
key: const Key("amountInputFieldCryptoTextFieldKey"),
|
key: const Key("amountInputFieldCryptoTextFieldKey"),
|
||||||
controller: cryptoAmountController,
|
controller: cryptoAmountController,
|
||||||
focusNode: _cryptoFocus,
|
focusNode: _cryptoFocus,
|
||||||
keyboardType: const TextInputType.numberWithOptions(
|
keyboardType: Util.isDesktop
|
||||||
signed: false,
|
? null
|
||||||
decimal: true,
|
: const TextInputType.numberWithOptions(
|
||||||
),
|
signed: false,
|
||||||
|
decimal: true,
|
||||||
|
),
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
// regex to validate a crypto amount with 8 decimal places
|
// regex to validate a crypto amount with 8 decimal places
|
||||||
|
@ -1056,10 +1064,12 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
||||||
key: const Key("amountInputFieldFiatTextFieldKey"),
|
key: const Key("amountInputFieldFiatTextFieldKey"),
|
||||||
controller: baseAmountController,
|
controller: baseAmountController,
|
||||||
focusNode: _baseFocus,
|
focusNode: _baseFocus,
|
||||||
keyboardType: const TextInputType.numberWithOptions(
|
keyboardType: Util.isDesktop
|
||||||
signed: false,
|
? null
|
||||||
decimal: true,
|
: const TextInputType.numberWithOptions(
|
||||||
),
|
signed: false,
|
||||||
|
decimal: true,
|
||||||
|
),
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
// regex to validate a fiat amount with 2 decimal places
|
// regex to validate a fiat amount with 2 decimal places
|
||||||
|
|
|
@ -2666,8 +2666,8 @@ class BitcoinCashWallet extends CoinServiceAPI {
|
||||||
], // dust limit is the minimum amount a change output should be
|
], // dust limit is the minimum amount a change output should be
|
||||||
))["vSize"] as int;
|
))["vSize"] as int;
|
||||||
//todo: check if print needed
|
//todo: check if print needed
|
||||||
debugPrint("vSizeForOneOutput $vSizeForOneOutput");
|
// debugPrint("vSizeForOneOutput $vSizeForOneOutput");
|
||||||
debugPrint("vSizeForTwoOutPuts $vSizeForTwoOutPuts");
|
// debugPrint("vSizeForTwoOutPuts $vSizeForTwoOutPuts");
|
||||||
|
|
||||||
// Assume 1 output, only for recipient and no change
|
// Assume 1 output, only for recipient and no change
|
||||||
var feeForOneOutput = estimateTxFee(
|
var feeForOneOutput = estimateTxFee(
|
||||||
|
|
|
@ -178,7 +178,7 @@ abstract class CoinServiceAPI {
|
||||||
walletId: walletId,
|
walletId: walletId,
|
||||||
walletName: walletName,
|
walletName: walletName,
|
||||||
coin: coin,
|
coin: coin,
|
||||||
secureStore: secureStorageInterface,
|
secureStorage: secureStorageInterface,
|
||||||
// tracker: tracker,
|
// tracker: tracker,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -51,6 +51,7 @@ class NotesService extends ChangeNotifier {
|
||||||
_notes[txid] = note;
|
_notes[txid] = note;
|
||||||
await DB.instance
|
await DB.instance
|
||||||
.put<dynamic>(boxName: walletId, key: 'notes', value: _notes);
|
.put<dynamic>(boxName: walletId, key: 'notes', value: _notes);
|
||||||
|
//todo: check if this is needed
|
||||||
Logging.instance.log("editOrAddNote: tx note saved", level: LogLevel.Info);
|
Logging.instance.log("editOrAddNote: tx note saved", level: LogLevel.Info);
|
||||||
await _refreshNotes();
|
await _refreshNotes();
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ abstract class DefaultNodes {
|
||||||
isDown: false);
|
isDown: false);
|
||||||
|
|
||||||
static NodeModel get bitcoinTestnet => NodeModel(
|
static NodeModel get bitcoinTestnet => NodeModel(
|
||||||
host: "electrumx-testnet.cypherstack.com",
|
host: "bitcoin-testnet.cypherstack.com",
|
||||||
port: 51002,
|
port: 51002,
|
||||||
name: defaultName,
|
name: defaultName,
|
||||||
id: _nodeId(Coin.bitcoinTestNet),
|
id: _nodeId(Coin.bitcoinTestNet),
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
import 'package:stackwallet/widgets/loading_indicator.dart';
|
import 'package:stackwallet/widgets/loading_indicator.dart';
|
||||||
|
|
||||||
class ExchangeTextField extends StatefulWidget {
|
class ExchangeTextField extends StatefulWidget {
|
||||||
|
@ -62,6 +63,8 @@ class _ExchangeTextFieldState extends State<ExchangeTextField> {
|
||||||
late final void Function(String)? onChanged;
|
late final void Function(String)? onChanged;
|
||||||
late final void Function(String)? onSubmitted;
|
late final void Function(String)? onSubmitted;
|
||||||
|
|
||||||
|
final isDesktop = Util.isDesktop;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
borderRadius = widget.borderRadius;
|
borderRadius = widget.borderRadius;
|
||||||
|
@ -100,10 +103,12 @@ class _ExchangeTextFieldState extends State<ExchangeTextField> {
|
||||||
enableSuggestions: false,
|
enableSuggestions: false,
|
||||||
autocorrect: false,
|
autocorrect: false,
|
||||||
readOnly: widget.readOnly,
|
readOnly: widget.readOnly,
|
||||||
keyboardType: const TextInputType.numberWithOptions(
|
keyboardType: isDesktop
|
||||||
signed: false,
|
? null
|
||||||
decimal: true,
|
: const TextInputType.numberWithOptions(
|
||||||
),
|
signed: false,
|
||||||
|
decimal: true,
|
||||||
|
),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
contentPadding: const EdgeInsets.only(
|
contentPadding: const EdgeInsets.only(
|
||||||
top: 12,
|
top: 12,
|
||||||
|
|
45
pubspec.lock
45
pubspec.lock
|
@ -42,7 +42,7 @@ packages:
|
||||||
name: archive
|
name: archive
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.11"
|
version: "3.3.0"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -63,7 +63,7 @@ packages:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.8.2"
|
version: "2.9.0"
|
||||||
barcode_scan2:
|
barcode_scan2:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -190,14 +190,7 @@ packages:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.1"
|
||||||
charcode:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: charcode
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.1"
|
|
||||||
checked_yaml:
|
checked_yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -218,7 +211,7 @@ packages:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.1"
|
||||||
code_builder:
|
code_builder:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -288,7 +281,7 @@ packages:
|
||||||
name: coverage
|
name: coverage
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.5.0"
|
||||||
cross_file:
|
cross_file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -442,7 +435,7 @@ packages:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.1"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -871,21 +864,21 @@ packages:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.11"
|
version: "0.12.12"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.4"
|
version: "0.1.5"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.0"
|
version: "1.8.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -997,7 +990,7 @@ packages:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.2"
|
||||||
path_drawing:
|
path_drawing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1373,7 +1366,7 @@ packages:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.2"
|
version: "1.9.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1417,7 +1410,7 @@ packages:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.1"
|
||||||
string_validator:
|
string_validator:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -1431,35 +1424,35 @@ packages:
|
||||||
name: sync_http
|
name: sync_http
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.3.1"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.1"
|
||||||
test:
|
test:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test
|
name: test
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.21.1"
|
version: "1.21.4"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.9"
|
version: "0.4.12"
|
||||||
test_core:
|
test_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_core
|
name: test_core
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.13"
|
version: "0.4.16"
|
||||||
time:
|
time:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1508,7 +1501,7 @@ packages:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.1"
|
||||||
universal_io:
|
universal_io:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1592,7 +1585,7 @@ packages:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.2.2"
|
version: "9.0.0"
|
||||||
wakelock:
|
wakelock:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
# Create template lib/external_api_keys.dart file if it doesn't already exist
|
# Create template lib/external_api_keys.dart file if it doesn't already exist
|
||||||
KEYS=../lib/external_api_keys.dart
|
KEYS=../lib/external_api_keys.dart
|
||||||
if ! test -f "$KEYS"; then
|
if ! test -f "$KEYS"; then
|
||||||
|
@ -6,13 +8,14 @@ if ! test -f "$KEYS"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create template wallet test parameter files if they don't already exist
|
# Create template wallet test parameter files if they don't already exist
|
||||||
declare -a coins=("bitcoin" "bitcoincash" "dogecoin" "namecoin" "firo" "particl") # TODO add monero and wownero when those tests are updated to use the .gitignored test wallet setup: when doing that, make sure to update the test vectors for a new, private development seed
|
declare -a coins
|
||||||
|
coins=("bitcoin" "bitcoincash" "dogecoin" "namecoin" "firo" "particl") # TODO add monero and wownero when those tests are updated to use the .gitignored test wallet setup: when doing that, make sure to update the test vectors for a new, private development seed
|
||||||
|
|
||||||
for coin in "${coins[@]}"
|
for coin in "${coins[@]}"
|
||||||
do
|
do
|
||||||
WALLETTESTPARAMFILE="../test/services/coins/${coin}/${coin}_wallet_test_parameters.dart"
|
WALLETTESTPARAMFILE="../test/services/coins/${coin}/${coin}_wallet_test_parameters.dart"
|
||||||
if ! test -f "$WALLETTESTPARAMFILE"; then
|
if ! test -f "$WALLETTESTPARAMFILE"; then
|
||||||
echo "prebuild.sh: creating template test/services/coins/${coin}/${coin}_wallet_test_parameters.dart file"
|
echo "prebuild.sh: creating template test/services/coins/${coin}/${coin}_wallet_test_parameters.dart file"
|
||||||
printf 'const TEST_MNEMONIC = "";\nconst ROOT_WIF = "";\nconst NODE_WIF_84 = "";\n' > $WALLETTESTPARAMFILE
|
printf 'const TEST_MNEMONIC = "";\nconst ROOT_WIF = "";\nconst NODE_WIF_84 = "";\n' > "$WALLETTESTPARAMFILE"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue