Skip to content

Commit

Permalink
Merge pull request #75 from MattSkala/fix-rawtx
Browse files Browse the repository at this point in the history
[FIX] Save rawtx to db in HDWalletTransaction.save
  • Loading branch information
mccwdev authored Jan 16, 2019
2 parents fd68f3c + 0aa4881 commit 12e42c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bitcoinlib/wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ def save(self):
wallet_id=self.hdwallet.wallet_id, hash=self.hash, block_height=self.block_height,
size=self.size, confirmations=self.confirmations, date=self.date, fee=self.fee, status=self.status,
input_total=self.input_total, output_total=self.output_total, network_name=self.network.name,
block_hash=self.block_hash)
block_hash=self.block_hash, raw=self.rawtx)
sess.add(new_tx)
sess.commit()
tx_id = new_tx.id
Expand All @@ -739,6 +739,7 @@ def save(self):
db_tx.input_total = self.input_total if self.input_total else db_tx.input_total
db_tx.output_total = self.output_total if self.output_total else db_tx.output_total
db_tx.network_name = self.network.name if self.network.name else db_tx.name
db_tx.raw = self.rawtx if self.rawtx else db_tx.raw
sess.commit()

assert tx_id
Expand Down

0 comments on commit 12e42c8

Please sign in to comment.