diff --git a/lib/commands.py b/lib/commands.py index e9c6cf277..df66f2288 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -647,8 +647,7 @@ class Commands: util.print_error('Got Response for %s' % address) except BaseException as e: util.print_error(str(e)) - h = self.network.addr_to_scripthash(address) - self.network.send([('blockchain.scripthash.subscribe', [h])], callback) + self.network.subscribe_to_addresses([addr], callback) return True @command('wn') diff --git a/lib/websockets.py b/lib/websockets.py index 587119f97..5462dd161 100644 --- a/lib/websockets.py +++ b/lib/websockets.py @@ -84,9 +84,7 @@ class WsClientThread(util.DaemonThread): l = self.subscriptions.get(addr, []) l.append((ws, amount)) self.subscriptions[addr] = l - h = self.network.addr_to_scripthash(addr) - self.network.send([('blockchain.scripthash.subscribe', [h])], self.response_queue.put) - + self.network.subscribe_to_addresses([addr], self.response_queue.put) def run(self): threading.Thread(target=self.reading_thread).start()