From 030ae8aa0274541cfc419a557a2eafa940e67b82 Mon Sep 17 00:00:00 2001 From: Daniel Gretzke Date: Mon, 9 Dec 2019 18:44:05 +0100 Subject: [PATCH] attempt to fix acceptPriceButton still visible after accepting --- plug_py/plug.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plug_py/plug.py b/plug_py/plug.py index e18c3a6..4d04a86 100644 --- a/plug_py/plug.py +++ b/plug_py/plug.py @@ -197,14 +197,14 @@ def acceptWindow(self, show): self.ui.acceptPriceButton.setVisible(True) self.ui.rejectButton.setVisible(True) else: - self.updateInfo('') self.ui.acceptPriceButton.setVisible(False) + self.updateInfo('') self.ui.rejectButton.setVisible(False) def resetToStart(self): self.updateInfo('') self.updateInfoCenter('') - self.ui.hourList.setVisible(False) + self.ui.hourList.setVisible(True) self.ui.hourLabel.setVisible(False) self.ui.infoCenterLabel.setVisible(False) self.ui.selectButton.setVisible(False) @@ -347,7 +347,7 @@ def run(self): asyncio.set_event_loop(self.loop) self.loop.run_until_complete(self.wsConnection()) else: - window.updateInfo('Error while connecting to smart socket') + window.updateInfo('Received wrong advertisement ID') window.updateInfoCenter('') except timeout: window.updateInfo('No smart socket found') @@ -518,6 +518,7 @@ async def initialized_P(self): 'Smart Contract verification failed') return else: + window.ui.acceptPriceButton.setVisible(False) window.updateInfoCenter( "Initializing Payment Channel...") transactionCount = web3.eth.getTransactionCount(