CW-834 Empty error when spending in wownero (#1870)
Some checks are pending
Cache Dependencies / test (push) Waiting to run

* CW-834 Empty error when spending in wownero

* monero -> wownero
This commit is contained in:
cyan 2024-12-11 16:03:34 -05:00 committed by GitHub
parent 1320b3ea3c
commit fd6801cafb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -181,14 +181,24 @@ 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.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);
}