From fa92b40d050c78e61b20d3758eac2a2f6d9600ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D0=B5=D0=BC?= Date: Wed, 27 Aug 2025 09:47:55 +0300 Subject: [PATCH] bumped --- apps/limiter/src/lim_config_machine.erl | 6 +++--- apps/limiter/src/lim_payproc_context.erl | 4 ++-- apps/limiter/src/lim_wthdproc_context.erl | 3 ++- apps/limiter/test/lim_ct_helper.hrl | 6 +++--- rebar.config | 4 ++-- rebar.lock | 14 +++++++------- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/apps/limiter/src/lim_config_machine.erl b/apps/limiter/src/lim_config_machine.erl index c710824..cad612c 100644 --- a/apps/limiter/src/lim_config_machine.erl +++ b/apps/limiter/src/lim_config_machine.erl @@ -1016,8 +1016,8 @@ check_calculate_year_shard_id_test() -> -define(INVOICE(OwnerID, ShopID), #domain_Invoice{ id = <<"ID">>, - owner_id = OwnerID, - shop_id = ShopID, + party_ref = #domain_PartyConfigRef{id = OwnerID}, + shop_ref = #domain_ShopConfigRef{id = ShopID}, domain_revision = 1, created_at = <<"2000-02-02T12:12:12Z">>, status = {unpaid, #domain_InvoiceUnpaid{}}, @@ -1065,7 +1065,7 @@ check_calculate_year_shard_id_test() -> -define(WITHDRAWAL(OwnerID, PaymentTool), #wthd_domain_Withdrawal{ destination = PaymentTool, - sender = OwnerID, + sender = #domain_PartyConfigRef{id = OwnerID}, created_at = <<"2000-02-02T12:12:12Z">>, body = #domain_Cash{amount = 42, currency = #domain_CurrencyRef{symbolic_code = <<"CNY">>}} }). diff --git a/apps/limiter/src/lim_payproc_context.erl b/apps/limiter/src/lim_payproc_context.erl index e434d02..fa9c355 100644 --- a/apps/limiter/src/lim_payproc_context.erl +++ b/apps/limiter/src/lim_payproc_context.erl @@ -130,12 +130,12 @@ get_value(ValueName, _Operation, _Context) -> }). get_owner_id(?INVOICE(Invoice)) -> - {ok, Invoice#domain_Invoice.owner_id}; + {ok, Invoice#domain_Invoice.party_ref#domain_PartyConfigRef.id}; get_owner_id(_) -> {error, notfound}. get_shop_id(?INVOICE(Invoice)) -> - {ok, Invoice#domain_Invoice.shop_id}; + {ok, Invoice#domain_Invoice.shop_ref#domain_ShopConfigRef.id}; get_shop_id(_) -> {error, notfound}. diff --git a/apps/limiter/src/lim_wthdproc_context.erl b/apps/limiter/src/lim_wthdproc_context.erl index f9aad8e..f9b4430 100644 --- a/apps/limiter/src/lim_wthdproc_context.erl +++ b/apps/limiter/src/lim_wthdproc_context.erl @@ -3,6 +3,7 @@ -include_lib("limiter_proto/include/limproto_context_withdrawal_thrift.hrl"). -include_lib("limiter_proto/include/limproto_base_thrift.hrl"). -include_lib("damsel/include/dmsl_wthd_domain_thrift.hrl"). +-include_lib("damsel/include/dmsl_domain_thrift.hrl"). -behaviour(lim_context). -export([get_operation/1]). @@ -110,7 +111,7 @@ get_value(ValueName, _Operation, _Context) -> -define(SENDER_RECEIVER(V), ?AUTH_DATA({sender_receiver, V})). get_owner_id(?WITHDRAWAL(Wthd)) -> - {ok, Wthd#wthd_domain_Withdrawal.sender}; + {ok, Wthd#wthd_domain_Withdrawal.sender#domain_PartyConfigRef.id}; get_owner_id(_CtxWithdrawal) -> {error, notfound}. diff --git a/apps/limiter/test/lim_ct_helper.hrl b/apps/limiter/test/lim_ct_helper.hrl index bbd7d49..3f67b60 100644 --- a/apps/limiter/test/lim_ct_helper.hrl +++ b/apps/limiter/test/lim_ct_helper.hrl @@ -130,8 +130,8 @@ -define(invoice(OwnerID, ShopID, Cost), #domain_Invoice{ id = ?string, - owner_id = OwnerID, - shop_id = ShopID, + party_ref = #domain_PartyConfigRef{id = OwnerID}, + shop_ref = #domain_ShopConfigRef{id = ShopID}, domain_revision = 1, created_at = ?timestamp, status = {unpaid, #domain_InvoiceUnpaid{}}, @@ -243,7 +243,7 @@ body = Body, created_at = ?timestamp, destination = Destination, - sender = OwnerID, + sender = #domain_PartyConfigRef{id = OwnerID}, auth_data = AuthData }). diff --git a/rebar.config b/rebar.config index 76150c6..c7aa349 100644 --- a/rebar.config +++ b/rebar.config @@ -28,11 +28,11 @@ {deps, [ {prometheus, "4.11.0"}, {prometheus_cowboy, "0.1.9"}, - {damsel, {git, "https://github.com/valitydev/damsel.git", {tag, "v2.2.11"}}}, + {damsel, {git, "https://github.com/valitydev/damsel.git", {tag, "v2.2.12"}}}, {limiter_proto, {git, "https://github.com/valitydev/limiter-proto.git", {branch, "master"}}}, {liminator_proto, {git, "https://github.com/valitydev/liminator-proto.git", {branch, "master"}}}, {xrates_proto, {git, "https://github.com/valitydev/xrates-proto.git", {branch, "master"}}}, - {machinery, {git, "https://github.com/valitydev/machinery-erlang.git", {tag, "v1.1.7"}}}, + {machinery, {git, "https://github.com/valitydev/machinery-erlang.git", {tag, "v1.1.10"}}}, {erl_health, {git, "https://github.com/valitydev/erlang-health.git", {branch, "master"}}}, {genlib, {git, "https://github.com/valitydev/genlib.git", {tag, "v1.1.0"}}}, {scoper, {git, "https://github.com/valitydev/scoper.git", {tag, "v1.1.0"}}}, diff --git a/rebar.lock b/rebar.lock index 91906d8..5432767 100644 --- a/rebar.lock +++ b/rebar.lock @@ -5,7 +5,7 @@ {<<"cache">>,{pkg,<<"cache">>,<<"2.3.3">>},1}, {<<"canal">>, {git,"https://github.com/valitydev/canal", - {ref,"621d3821cd0a6036fee75d8e3b2d17167f3268e4"}}, + {ref,"89faedce3b054bcca7cc31ca64d2ead8a9402305"}}, 3}, {<<"certifi">>,{pkg,<<"certifi">>,<<"2.8.0">>},2}, {<<"cg_mon">>, @@ -19,7 +19,7 @@ {<<"ctx">>,{pkg,<<"ctx">>,<<"0.6.0">>},2}, {<<"damsel">>, {git,"https://github.com/valitydev/damsel.git", - {ref,"ff9b01f552f922ce4a16710827aa872325dbe5a9"}}, + {ref,"8cab698cd78125ac47489d0ba81169df376757a4"}}, 0}, {<<"dmt_client">>, {git,"https://github.com/valitydev/dmt_client.git", @@ -27,11 +27,11 @@ 0}, {<<"epg_connector">>, {git,"https://github.com/valitydev/epg_connector.git", - {ref,"dd93e27c00d492169e8a7bfc38976b911c6e7d05"}}, + {ref,"2e86da8083908d0d35a4eed3e2168c9ba6a8d04a"}}, 2}, {<<"epgsql">>, {git,"https://github.com/epgsql/epgsql.git", - {ref,"7ba52768cf0ea7d084df24d4275a88eef4db13c2"}}, + {ref,"28e9f84c95065a51e92baeb37d2cf1687fc4b9ce"}}, 3}, {<<"erl_health">>, {git,"https://github.com/valitydev/erlang-health.git", @@ -59,12 +59,12 @@ 0}, {<<"machinery">>, {git,"https://github.com/valitydev/machinery-erlang.git", - {ref,"74f49ff6c2a161ecad426e1bd0dcef6f508babab"}}, + {ref,"066f6cecd5d8f011c1b3bf8e45f6ad967c0e733d"}}, 0}, {<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},2}, {<<"mg_proto">>, {git,"https://github.com/valitydev/machinegun-proto", - {ref,"3decc8f8b13c9cd1701deab47781aacddd7dbc92"}}, + {ref,"cc2c27c30d30dc34c0c56fc7c7e96326d6bd6a14"}}, 1}, {<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.4.0">>},2}, {<<"opentelemetry">>,{pkg,<<"opentelemetry">>,<<"1.5.0">>},0}, @@ -75,7 +75,7 @@ {<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.1">>},2}, {<<"progressor">>, {git,"https://github.com/valitydev/progressor.git", - {ref,"4c44615f712ae8992ff1a654f227def9f44c8aa7"}}, + {ref,"d429410a0f2b42fbcc22b340cc8dc1915b13f119"}}, 1}, {<<"prometheus">>,{pkg,<<"prometheus">>,<<"4.11.0">>},0}, {<<"prometheus_cowboy">>,{pkg,<<"prometheus_cowboy">>,<<"0.1.9">>},0},