Compare commits

..

No commits in common. "56ebf760b37474f9804f9c7979d625fb35df14bf" and "7c1fc04add1b354b2b1a36f28e873e8f0b0c0586" have entirely different histories.

4 changed files with 8 additions and 16 deletions

View File

@ -1 +1 @@
0.2.2b 0.2.2a

2
bal.py
View File

@ -132,5 +132,3 @@ class BalPlugin(BasePlugin):
will_settings['locktime']='1y' will_settings['locktime']='1y'
return will_settings return will_settings
def default_will_settings(self):
return {}

View File

@ -14,7 +14,6 @@ from electrum.transaction import PartialTxInput, PartialTxOutput,TxOutpoint,Part
import datetime import datetime
import urllib.request import urllib.request
import urllib.parse import urllib.parse
import random
from .util import Util from .util import Util
from .willexecutors import Willexecutors from .willexecutors import Willexecutors
if TYPE_CHECKING: if TYPE_CHECKING:
@ -113,9 +112,7 @@ def prepare_transactions(locktimes, available_utxos, fees, wallet):
change = get_change_output(wallet, in_amount, out_amount, fee) change = get_change_output(wallet, in_amount, out_amount, fee)
if change: if change:
outputs.append(change) outputs.append(change)
for i in range(0,100):
random.shuffle(outputs)
print(outputs)
tx = PartialTransaction.from_io(used_utxos, outputs, locktime=Util.parse_locktime_string(locktime,wallet), version=2) tx = PartialTransaction.from_io(used_utxos, outputs, locktime=Util.parse_locktime_string(locktime,wallet), version=2)
if len(description)>0: tx.description = description[:-1] if len(description)>0: tx.description = description[:-1]
else: tx.description = "" else: tx.description = ""

13
qt.py
View File

@ -628,7 +628,7 @@ class BalWindow(Logger):
heir_address.setText(str(heir[0])) heir_address.setText(str(heir[0]))
heir_amount = PercAmountEdit(self.window.get_decimal_point) heir_amount = PercAmountEdit(self.window.get_decimal_point)
if heir: if heir:
heir_amount.setText(str(Util.decode_amount(heir[1],self.window.get_decimal_point()))) heir_amount.setText(str(Util.decode_amount(heir[1],self.bal_plugin.config.get_decimal_point())))
heir_locktime = HeirsLockTimeEdit(self.window,0) heir_locktime = HeirsLockTimeEdit(self.window,0)
if heir: if heir:
heir_locktime.set_locktime(heir[2]) heir_locktime.set_locktime(heir[2])
@ -1107,6 +1107,7 @@ class BalWindow(Logger):
def check_transactions_task(self,will): def check_transactions_task(self,will):
start = time.time() start = time.time()
for wid,w in will.items(): for wid,w in will.items():
if w.we:
self.waiting_dialog.update("checking transaction: {}\n willexecutor: {}".format(wid,w.we['url'])) self.waiting_dialog.update("checking transaction: {}\n willexecutor: {}".format(wid,w.we['url']))
w.check_willexecutor() w.check_willexecutor()
@ -2193,7 +2194,7 @@ class HeirList(MyTreeView,MessageBoxMixin):
stretch_column=self.Columns.NAME, stretch_column=self.Columns.NAME,
editable_columns=[self.Columns.NAME,self.Columns.ADDRESS,self.Columns.AMOUNT], editable_columns=[self.Columns.NAME,self.Columns.ADDRESS,self.Columns.AMOUNT],
) )
self.decimal_point = bal_window.window.get_decimal_point() self.decimal_point = bal_window.bal_plugin.config.get_decimal_point()
self.bal_window = bal_window self.bal_window = bal_window
try: try:
@ -2415,7 +2416,7 @@ class PreviewList(MyTreeView):
) )
self.parent=parent self.parent=parent
self.bal_window=bal_window self.bal_window=bal_window
self.decimal_point=bal_window.window.get_decimal_point self.decimal_point=bal_window.bal_plugin.config.get_decimal_point
self.setModel(QStandardItemModel(self)) self.setModel(QStandardItemModel(self))
self.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection) self.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection)
@ -2630,11 +2631,7 @@ class PreviewList(MyTreeView):
self.update() self.update()
def check(self): def check(self):
will = {} self.bal_window.check_transactions(self.bal_window.willitems)
for wid, w in self.bal_window.willitems:
if w.get_status("VALID"):
will[wid]=w
self.bal_window.check_transactions(will)
self.update() self.update()
def invalidate_will(self): def invalidate_will(self):