Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CW-834-investigate-the-empty-error-popup-when-sending-monero #1821

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions cw_monero/lib/api/transaction_history.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,23 @@ String? commitTransaction({required monero.PendingTransaction transactionPointer
? monero.PendingTransaction_commitUR(transactionPointer, 120)
: monero.PendingTransaction_commit(transactionPointer, filename: '', overwrite: false);

final String? error = (() {
String? error = (() {
final status = monero.PendingTransaction_status(transactionPointer.cast());
if (status == 0) {
return null;
}
return monero.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
Loading