def close_offer(self, key, identifier): batches, signature = transaction_creation.close_offer( txn_key=key, batch_key=BATCH_KEY, identifier=identifier) batch_list = batch_pb2.BatchList(batches=batches) self._client.send_batches(batch_list) return self._client.get_statuses([signature], wait=10)
async def close_offer(request, offer_id): """Request by owner of Offer to close it""" signer = await common.get_signer(request) batches, batch_id = transaction_creation.close_offer( txn_key=signer, batch_key=request.app.config.SIGNER, identifier=offer_id) await messaging.send(request.app.config.VAL_CONN, request.app.config.TIMEOUT, batches) await messaging.check_batch_status(request.app.config.VAL_CONN, batch_id) return response.json('')
async def close_offer(request, offer_id): """Request by owner of Offer to close it""" signer = await common.get_signer(request) batches, batch_id = transaction_creation.close_offer( txn_key=signer, batch_key=request.app.config.SIGNER, identifier=offer_id) await messaging.send( request.app.config.VAL_CONN, request.app.config.TIMEOUT, batches) await messaging.check_batch_status(request.app.config.VAL_CONN, batch_id) return response.json('')