mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 07:11:36 +02:00
Prevent wallet attempting to re-pay a cancelled invoice transaction (#707)
This commit is contained in:
@@ -680,6 +680,9 @@ where
|
||||
if t.tx_type == TxLogEntryType::TxSent {
|
||||
return Err(Error::TransactionAlreadyReceived(ret_slate.id.to_string()));
|
||||
}
|
||||
if t.tx_type == TxLogEntryType::TxSentCancelled {
|
||||
return Err(Error::TransactionWasCancelled(ret_slate.id.to_string()));
|
||||
}
|
||||
}
|
||||
|
||||
let height = w.w2n_client().get_chain_tip()?.0;
|
||||
|
||||
@@ -153,6 +153,10 @@ pub enum Error {
|
||||
#[error("Transaction {0} has already been received")]
|
||||
TransactionAlreadyReceived(String),
|
||||
|
||||
/// Transaction has been cancelled
|
||||
#[error("Transaction {0} has been cancelled")]
|
||||
TransactionWasCancelled(String),
|
||||
|
||||
/// Attempt to repost a transaction that's not completed and stored
|
||||
#[error("Transaction building not completed: {0}")]
|
||||
TransactionBuildingNotCompleted(u32),
|
||||
|
||||
Reference in New Issue
Block a user