Fixed bug in transaction waiting in send-sols command.

This commit is contained in:
Geoff Taylor 2022-02-28 18:25:32 +00:00
parent 06ea84ac38
commit b9700d50bf
2 changed files with 4 additions and 2 deletions

View File

@ -66,7 +66,7 @@ with mango.ContextBuilder.from_command_line_parameters(args) as context:
)
transaction.add(transfer(params))
signatures = context.client.send_transaction(transaction, wallet.keypair)
signatures = [context.client.send_transaction(transaction, wallet.keypair)]
if args.wait:
mango.output("Waiting on transaction signatures:")

View File

@ -278,8 +278,10 @@ class WebSocketTransactionMonitor(TransactionMonitor):
]
if len(to_remove) > 0:
self.__subscriptions.remove(to_remove[0])
else:
elif "result" in response:
self.__add_subscription_id(id, int(response["result"]))
else:
self._logger.warning(f"Unexpected response from websocket: {response}")
elif response["method"] == "signatureNotification":
params = response["params"]
id = params["subscription"]