Skip to content

Commit

Permalink
CW-834 Empty error when spending in wownero
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCyjaneK committed Dec 11, 2024
1 parent 9590aa2 commit a931395
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 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 = (() {
final status = wownero.PendingTransaction_status(transactionPointer.cast());
String? error = (() {
final status = monero.PendingTransaction_status(transactionPointer.cast());
if (status == 0) {
return null;
}
return wownero.Wallet_errorString(wptr!);
return monero.PendingTransaction_errorString(transactionPointer.cast());
})();
if (error == null) {
error = (() {
final status = monero.Wallet_status(wptr!);
if (status == 0) {
return null;
}
return monero.Wallet_errorString(wptr!);
})();

}

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

0 comments on commit a931395

Please sign in to comment.