Commit eaada992 authored by Vincent Texier's avatar Vincent Texier

[fix] fix bug in tx history table_model.py conditions field update

Fix test
parent f20cb71b
......@@ -147,7 +147,7 @@ class HistoryTableModel(QAbstractTableModel):
sources_conditions = [
source.conditions
for source in sources
if "%&&%" in source.conditions or "%||%" in source.conditions
if "&&" in source.conditions or "||" in source.conditions
]
transfer.conditions = (
sources_conditions[0] if len(sources_conditions) > 0 else None
......
......@@ -65,9 +65,13 @@ async def test_tx_history_table_model(
history_table_model.change_transfer(transfers[0])
assert len(history_table_model.transfers_data) == 2
conditions_data = history_table_model.transfers_data[1][
conditions_data = history_table_model.transfers_data[0][
HistoryTableModel.columns_types.index("conditions")
]
if conditions_data is None:
conditions_data = history_table_model.transfers_data[1][
HistoryTableModel.columns_types.index("conditions")
]
assert (
conditions_data
== "SIG(F3HWkYnUSbdpEueosKqzYd1m8ftwojwE2uXR7ScoAVKo) || (SIG(GfFUvqaVSgCt6nFDQCAuULWk6K16MUDckeyBJQFcaYj7) && CSV(604800))"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment