mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
v4.25.0 Release Candidate (#2153)
* v4.25.0 Release Candidate * update rest of platforms version [skip ci] * replace macos icons [skip ci] * fix: incorrect balance reporting (#2155) * fix: monero frozen coins, call updateSendingBalance, display "ALL" balance properly * fix: decred formatting on send page --------- Co-authored-by: cyan <cyjan@mrcyjanek.net>
This commit is contained in:
@@ -45,20 +45,17 @@ class TransactionsPage extends StatelessWidget {
|
||||
Observer(builder: (_) {
|
||||
final status = dashboardViewModel.status;
|
||||
if (status is SyncingSyncStatus) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(24, 0, 24, 8),
|
||||
child: DashBoardRoundedCardWidget(
|
||||
key: ValueKey('transactions_page_syncing_alert_card_key'),
|
||||
onTap: () {
|
||||
try {
|
||||
final uri = Uri.parse(
|
||||
"https://docs.cakewallet.com/faq/funds-not-appearing");
|
||||
launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} catch (_) {}
|
||||
},
|
||||
title: S.of(context).syncing_wallet_alert_title,
|
||||
subTitle: S.of(context).syncing_wallet_alert_content,
|
||||
),
|
||||
return DashBoardRoundedCardWidget(
|
||||
key: ValueKey('transactions_page_syncing_alert_card_key'),
|
||||
onTap: () {
|
||||
try {
|
||||
final uri = Uri.parse(
|
||||
"https://docs.cakewallet.com/faq/funds-not-appearing");
|
||||
launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} catch (_) {}
|
||||
},
|
||||
title: S.of(context).syncing_wallet_alert_title,
|
||||
subTitle: S.of(context).syncing_wallet_alert_content,
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
@@ -72,7 +69,6 @@ class TransactionsPage extends StatelessWidget {
|
||||
child: Observer(
|
||||
builder: (_) {
|
||||
final items = dashboardViewModel.items;
|
||||
final amount = items.length + 1;
|
||||
return items.isNotEmpty
|
||||
? ListView.builder(
|
||||
key: ValueKey('transactions_page_list_view_builder_key'),
|
||||
|
||||
@@ -94,6 +94,9 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||
sendViewModel.updateSendingBalance();
|
||||
});
|
||||
|
||||
/// if the current wallet doesn't match the one in the qr code
|
||||
if (initialPaymentRequest != null &&
|
||||
@@ -244,38 +247,47 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
|
||||
currencyValueValidator: output.sendAll
|
||||
? sendViewModel.allAmountValidator
|
||||
: sendViewModel.amountValidator,
|
||||
allAmountCallback: () async => output.setSendAll(sendViewModel.sendingBalance)),
|
||||
allAmountCallback: () async => output.setSendAll(await sendViewModel.sendingBalance)),
|
||||
Divider(
|
||||
height: 1,
|
||||
color: Theme.of(context).extension<SendPageTheme>()!.textFieldHintColor),
|
||||
Observer(
|
||||
builder: (_) => Padding(
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(
|
||||
S.of(context).available_balance + ':',
|
||||
style: TextStyle(
|
||||
builder: (_) {
|
||||
// force rebuild on mobx
|
||||
final _ = sendViewModel.coinTypeToSpendFrom;
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(
|
||||
S.of(context).available_balance + ':',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color:
|
||||
Theme.of(context).extension<SendPageTheme>()!.textFieldHintColor),
|
||||
),
|
||||
),
|
||||
FutureBuilder<String>(
|
||||
future: sendViewModel.sendingBalance,
|
||||
builder: (context, snapshot) {
|
||||
return Text(
|
||||
snapshot.data ?? sendViewModel.balance, // default to balance while loading
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color:
|
||||
Theme.of(context).extension<SendPageTheme>()!.textFieldHintColor),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
sendViewModel.sendingBalance,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color:
|
||||
Theme.of(context).extension<SendPageTheme>()!.textFieldHintColor),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
if (!sendViewModel.isFiatDisabled)
|
||||
CurrencyAmountTextField(
|
||||
@@ -509,9 +521,9 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
|
||||
}
|
||||
});
|
||||
|
||||
reaction((_) => sendViewModel.selectedCryptoCurrency, (Currency currency) {
|
||||
reaction((_) => sendViewModel.selectedCryptoCurrency, (Currency currency) async {
|
||||
if (output.sendAll) {
|
||||
output.setSendAll(sendViewModel.sendingBalance);
|
||||
output.setSendAll(await sendViewModel.sendingBalance);
|
||||
}
|
||||
|
||||
output.setCryptoAmount(cryptoAmountController.text);
|
||||
|
||||
Reference in New Issue
Block a user