diff --git a/wallet/src/display.rs b/wallet/src/display.rs index f5e24dbae..118118b19 100644 --- a/wallet/src/display.rs +++ b/wallet/src/display.rs @@ -177,7 +177,7 @@ pub fn txs( core::amount_to_hr_string(t.amount_debited - t.amount_credited, true) ) }; - let tx_data = match t.tx_hex { + let tx_data = match t.stored_tx { Some(t) => format!("{}", t), None => "None".to_owned(), }; diff --git a/wallet/src/libwallet/internal/selection.rs b/wallet/src/libwallet/internal/selection.rs index be2160ecb..3f6cda2b9 100644 --- a/wallet/src/libwallet/internal/selection.rs +++ b/wallet/src/libwallet/internal/selection.rs @@ -102,7 +102,7 @@ where let mut t = TxLogEntry::new(parent_key_id.clone(), TxLogEntryType::TxSent, log_id); t.tx_slate_id = Some(slate_id); let filename = format!("{}.grintx", slate_id); - t.tx_hex = Some(filename); + t.stored_tx = Some(filename); t.fee = Some(fee); let mut amount_debited = 0; t.num_inputs = lock_inputs.len(); diff --git a/wallet/src/libwallet/internal/tx.rs b/wallet/src/libwallet/internal/tx.rs index caac3359f..af7e1c906 100644 --- a/wallet/src/libwallet/internal/tx.rs +++ b/wallet/src/libwallet/internal/tx.rs @@ -196,7 +196,7 @@ where return Err(ErrorKind::TransactionDoesntExist(tx_id.to_string()))?; } let tx = tx_vec[0].clone(); - Ok((tx.confirmed, tx.tx_hex)) + Ok((tx.confirmed, tx.stored_tx)) } /// Update the stored transaction (this update needs to happen when the TX is finalised) diff --git a/wallet/src/libwallet/types.rs b/wallet/src/libwallet/types.rs index e49998111..29911a585 100644 --- a/wallet/src/libwallet/types.rs +++ b/wallet/src/libwallet/types.rs @@ -600,9 +600,8 @@ pub struct TxLogEntry { pub amount_debited: u64, /// Fee pub fee: Option, - // TODO: rename this to 'stored_tx_file' or something for mainnet - /// The transaction json itself, stored for reference or resending - pub tx_hex: Option, + /// Location of the store transaction, (reference or resending) + pub stored_tx: Option, } impl ser::Writeable for TxLogEntry { @@ -634,7 +633,7 @@ impl TxLogEntry { num_inputs: 0, num_outputs: 0, fee: None, - tx_hex: None, + stored_tx: None, } } diff --git a/wallet/src/lmdb_wallet.rs b/wallet/src/lmdb_wallet.rs index 4aa9da97e..49c015f5c 100644 --- a/wallet/src/lmdb_wallet.rs +++ b/wallet/src/lmdb_wallet.rs @@ -262,7 +262,7 @@ where } fn get_stored_tx(&self, entry: &TxLogEntry) -> Result, Error> { - let filename = match entry.tx_hex.clone() { + let filename = match entry.stored_tx.clone() { Some(f) => f, None => return Ok(None), };