Merge branch 'release-4.2.4' into CAKE-345-batch-sending

# Conflicts:
#	lib/src/screens/send/send_page.dart
This commit is contained in:
OleksandrSobol 2021-07-22 19:56:17 +03:00
commit a1c6b0be3f
4 changed files with 33 additions and 21 deletions

View file

@ -290,5 +290,6 @@ SPEC CHECKSUMS:
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
webview_flutter: 9f491a9b5a66f2573946a389b2677987b0ff8c0b
PODFILE CHECKSUM: 82161cafcb98ddf3e6a0ff8149da3f656be3f1e3
COCOAPODS: 1.10.1
COCOAPODS: 1.9.3

View file

@ -0,0 +1,4 @@
class BitcoinCommitTransactionException implements Exception {
@override
String toString() => 'Transaction commit is failed.';
}

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/bitcoin/bitcoin_commit_transaction_exception.dart';
import 'package:flutter/foundation.dart';
import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin;
import 'package:cake_wallet/core/pending_transaction.dart';
@ -33,7 +34,13 @@ class PendingBitcoinTransaction with PendingTransaction {
@override
Future<void> commit() async {
await electrumClient.broadcastTransaction(transactionRaw: _tx.toHex());
final result =
await electrumClient.broadcastTransaction(transactionRaw: _tx.toHex());
if (result.isEmpty) {
throw BitcoinCommitTransactionException();
}
_listeners?.forEach((listener) => listener(transactionInfo()));
}

View file

@ -15,25 +15,25 @@ class UnspentCoinsListPage extends BasePage {
@override
String get title => S.current.unspent_coins_title;
@override
Widget trailing(BuildContext context) {
final questionImage = Image.asset('assets/images/question_mark.png',
color: Theme.of(context).primaryTextTheme.title.color);
//@override
//Widget trailing(BuildContext context) {
// final questionImage = Image.asset('assets/images/question_mark.png',
// color: Theme.of(context).primaryTextTheme.title.color);
return SizedBox(
height: 20.0,
width: 20.0,
child: ButtonTheme(
minWidth: double.minPositive,
child: FlatButton(
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
padding: EdgeInsets.all(0),
onPressed: () => showUnspentCoinsAlert(context),
child: questionImage),
),
);
}
// return SizedBox(
// height: 20.0,
// width: 20.0,
// child: ButtonTheme(
// minWidth: double.minPositive,
// child: FlatButton(
// highlightColor: Colors.transparent,
// splashColor: Colors.transparent,
// padding: EdgeInsets.all(0),
// onPressed: () => showUnspentCoinsAlert(context),
// child: questionImage),
// ),
// );
//}
final UnspentCoinsListViewModel unspentCoinsListViewModel;
@ -64,7 +64,7 @@ class UnspentCoinsListFormState extends State<UnspentCoinsListForm> {
}
void afterLayout(dynamic _) {
showUnspentCoinsAlert(context);
//showUnspentCoinsAlert(context);
}
@override