Set tx field to none if include_raw
is false
`del_tx` pulls the TransactionDetails object using `select_transaction_details_by_txid` method which gets the transaction details' data with a non-None transaction field even if the `include_raw` argument is `false`. So it becomes necessary to Set the transaction field in transactiondetails to None in `del_tx`, when we make a call to it with `include_raw=false`.
This commit is contained in:
parent
06310f1dd0
commit
e06c3f945c
@ -744,11 +744,13 @@ impl BatchOperations for SqliteDatabase {
|
||||
include_raw: bool,
|
||||
) -> Result<Option<TransactionDetails>, Error> {
|
||||
match self.select_transaction_details_by_txid(txid)? {
|
||||
Some(transaction_details) => {
|
||||
Some(mut transaction_details) => {
|
||||
self.delete_transaction_details_by_txid(txid)?;
|
||||
|
||||
if include_raw {
|
||||
self.delete_transaction_by_txid(txid)?;
|
||||
} else {
|
||||
transaction_details.transaction = None;
|
||||
}
|
||||
Ok(Some(transaction_details))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user