Skip to content

Commit

Permalink
CW-834 Empty error when spending in wownero (#1870)
Browse files Browse the repository at this point in the history
* CW-834 Empty error when spending in wownero

* monero -> wownero
  • Loading branch information
MrCyjaneK authored Dec 11, 2024
1 parent 1320b3e commit fd6801c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cw_wownero/lib/api/transaction_history.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,23 @@ void commitTransaction({required wownero.PendingTransaction transactionPointer})

final txCommit = wownero.PendingTransaction_commit(transactionPointer, filename: '', overwrite: false);

final String? error = (() {
String? error = (() {
final status = wownero.PendingTransaction_status(transactionPointer.cast());
if (status == 0) {
return null;
}
return wownero.Wallet_errorString(wptr!);
return wownero.PendingTransaction_errorString(transactionPointer.cast());
})();
if (error == null) {
error = (() {
final status = wownero.Wallet_status(wptr!);
if (status == 0) {
return null;
}
return wownero.Wallet_errorString(wptr!);
})();

}

if (error != null) {
throw CreationTransactionException(message: error);
Expand Down

0 comments on commit fd6801c

Please sign in to comment.