Changed way to committing of transactions.

This commit is contained in:
M
2020-01-13 14:34:50 +02:00
parent 465c69c776
commit b7e8abcb95
4 changed files with 66 additions and 21 deletions
+2 -6
View File
@@ -26,12 +26,6 @@ abstract class SendStoreBase with Store {
_pendingTransaction = null;
_cryptoNumberFormat = NumberFormat()..maximumFractionDigits = 12;
_fiatNumberFormat = NumberFormat()..maximumFractionDigits = 2;
reaction((_) => this.state, (SendingState state) async {
if (state is TransactionCreatedSuccessfully) {
await commitTransaction();
}
});
}
WalletService walletService;
@@ -89,7 +83,9 @@ abstract class SendStoreBase with Store {
Future commitTransaction() async {
try {
final transactionId = _pendingTransaction.hash;
state = TransactionCommiting();
await _pendingTransaction.commit();
state = TransactionCommitted();
if (settingsStore.shouldSaveRecipientAddress) {
await transactionDescriptions.add(TransactionDescription(