From f523644804df81f218ba4ed84c0a11ad902c989e Mon Sep 17 00:00:00 2001 From: nfel Date: Mon, 17 Mar 2025 14:59:40 +0330 Subject: [PATCH] v2: discount Signed-off-by: nfel --- wallet/v1/msg.proto | 15 +++++++++++++-- wallet/v1/srv.proto | 2 ++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/wallet/v1/msg.proto b/wallet/v1/msg.proto index d18e005..a66985a 100644 --- a/wallet/v1/msg.proto +++ b/wallet/v1/msg.proto @@ -79,7 +79,6 @@ message Asset { AssetPrice price = 34; } - message AssetPrice { string updated_at = 1; double market_price = 2; @@ -479,9 +478,21 @@ message Commission { string created_at = 11; } -message LockAssetReq{ +message LockAssetReq { int64 asset_id = 1; double amount = 2; auth.v1.InternalIAM iam = 3; optional auth.v1.TFA tfa = 4; // if request is not internal } + +message AssetDiscountReq { + string code = 1; + string asset_id = 2; +} + +message AssetDiscountRes { + string code = 1; + string expires_at = 2; + double static_amount = 3; + double percentage = 4; +} diff --git a/wallet/v1/srv.proto b/wallet/v1/srv.proto index ef69b5f..f17fff9 100644 --- a/wallet/v1/srv.proto +++ b/wallet/v1/srv.proto @@ -50,4 +50,6 @@ service WalletService { rpc LockAsset(LockAssetReq) returns (base.v1.StatusRes); rpc ReleaseAsset(LockAssetReq) returns (base.v1.StatusRes); + + rpc AssetDiscount(AssetDiscountReq) returns (AssetDiscountRes); }