mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 03:29:36 +00:00
CW-834 Empty error when spending in wownero (#1870)
Some checks are pending
Cache Dependencies / test (push) Waiting to run
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:
parent
1320b3ea3c
commit
fd6801cafb
1 changed files with 12 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue