From 3553810158864fe58d5d5f3a46b2d0e7348bb6a3 Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Fri, 19 Jan 2024 13:13:41 +0100 Subject: [PATCH] Feature: Add payment type --- src/aleph/web/controllers/prices.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aleph/web/controllers/prices.py b/src/aleph/web/controllers/prices.py index 9b1c61cba..913e11cba 100644 --- a/src/aleph/web/controllers/prices.py +++ b/src/aleph/web/controllers/prices.py @@ -87,4 +87,5 @@ async def message_price(request: web.Request): else: required_tokens = compute_cost(session=session, content=content) - return web.json_response({"required_tokens": float(required_tokens)}) + return web.json_response({"required_tokens": float(required_tokens), + "payment_type": content.payment.type if content.payment else None})