From 467b0c09730241b8aa9e2fc3342a90b991d62f3c Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 28 Feb 2016 19:10:09 +0900 Subject: [PATCH] tx_dialog: make a deep copy of the tx I've confirmed this Fixes #1690 --- gui/qt/transaction_dialog.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py index a80885da..40b6b2d0 100644 --- a/gui/qt/transaction_dialog.py +++ b/gui/qt/transaction_dialog.py @@ -23,6 +23,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import copy import datetime import json @@ -51,8 +52,12 @@ class TxDialog(QDialog, MessageBoxMixin): '''Transactions in the wallet will show their description. Pass desc to give a description for txs not yet in the wallet. ''' - QDialog.__init__(self, parent=None) # Top-level window - self.tx = tx + # We want to be a top-level window + QDialog.__init__(self, parent=None) + # Take a copy; it might get updated in the main window by + # e.g. the FX plugin. If this happens during or after a long + # sign operation the signatures are lost. + self.tx = copy.deepcopy(tx) self.tx.deserialize() self.main_window = parent self.wallet = parent.wallet