mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-05-05 02:42:15 +00:00
Merge branch 'release-4.2.4' into CAKE-345-batch-sending
# Conflicts: # lib/src/screens/send/send_page.dart
This commit is contained in:
commit
a1c6b0be3f
4 changed files with 33 additions and 21 deletions
ios
lib
bitcoin
src/screens/unspent_coins
|
@ -290,5 +290,6 @@ SPEC CHECKSUMS:
|
||||||
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
|
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
|
||||||
webview_flutter: 9f491a9b5a66f2573946a389b2677987b0ff8c0b
|
webview_flutter: 9f491a9b5a66f2573946a389b2677987b0ff8c0b
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 82161cafcb98ddf3e6a0ff8149da3f656be3f1e3
|
||||||
|
|
||||||
COCOAPODS: 1.10.1
|
COCOAPODS: 1.9.3
|
||||||
|
|
4
lib/bitcoin/bitcoin_commit_transaction_exception.dart
Normal file
4
lib/bitcoin/bitcoin_commit_transaction_exception.dart
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
class BitcoinCommitTransactionException implements Exception {
|
||||||
|
@override
|
||||||
|
String toString() => 'Transaction commit is failed.';
|
||||||
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:cake_wallet/bitcoin/bitcoin_commit_transaction_exception.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin;
|
import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin;
|
||||||
import 'package:cake_wallet/core/pending_transaction.dart';
|
import 'package:cake_wallet/core/pending_transaction.dart';
|
||||||
|
@ -33,7 +34,13 @@ class PendingBitcoinTransaction with PendingTransaction {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> commit() async {
|
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()));
|
_listeners?.forEach((listener) => listener(transactionInfo()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,25 +15,25 @@ class UnspentCoinsListPage extends BasePage {
|
||||||
@override
|
@override
|
||||||
String get title => S.current.unspent_coins_title;
|
String get title => S.current.unspent_coins_title;
|
||||||
|
|
||||||
@override
|
//@override
|
||||||
Widget trailing(BuildContext context) {
|
//Widget trailing(BuildContext context) {
|
||||||
final questionImage = Image.asset('assets/images/question_mark.png',
|
// final questionImage = Image.asset('assets/images/question_mark.png',
|
||||||
color: Theme.of(context).primaryTextTheme.title.color);
|
// color: Theme.of(context).primaryTextTheme.title.color);
|
||||||
|
|
||||||
return SizedBox(
|
// return SizedBox(
|
||||||
height: 20.0,
|
// height: 20.0,
|
||||||
width: 20.0,
|
// width: 20.0,
|
||||||
child: ButtonTheme(
|
// child: ButtonTheme(
|
||||||
minWidth: double.minPositive,
|
// minWidth: double.minPositive,
|
||||||
child: FlatButton(
|
// child: FlatButton(
|
||||||
highlightColor: Colors.transparent,
|
// highlightColor: Colors.transparent,
|
||||||
splashColor: Colors.transparent,
|
// splashColor: Colors.transparent,
|
||||||
padding: EdgeInsets.all(0),
|
// padding: EdgeInsets.all(0),
|
||||||
onPressed: () => showUnspentCoinsAlert(context),
|
// onPressed: () => showUnspentCoinsAlert(context),
|
||||||
child: questionImage),
|
// child: questionImage),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
//}
|
||||||
|
|
||||||
final UnspentCoinsListViewModel unspentCoinsListViewModel;
|
final UnspentCoinsListViewModel unspentCoinsListViewModel;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ class UnspentCoinsListFormState extends State<UnspentCoinsListForm> {
|
||||||
}
|
}
|
||||||
|
|
||||||
void afterLayout(dynamic _) {
|
void afterLayout(dynamic _) {
|
||||||
showUnspentCoinsAlert(context);
|
//showUnspentCoinsAlert(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
Loading…
Reference in a new issue