mirror of
https://github.com/valitydev/fistful-server.git
synced 2024-11-06 02:35:18 +00:00
IMP-293: Retires payouts methods and bumps damsel (#86)
* IMP-293: Retires payouts methods and bumps damsel * Bumps damsel * Bumps damsel
This commit is contained in:
parent
8460d6e691
commit
b0cf79aeac
2
.github/workflows/erlang-checks.yml
vendored
2
.github/workflows/erlang-checks.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
name: Run checks
|
name: Run checks
|
||||||
needs: setup
|
needs: setup
|
||||||
uses: valitydev/erlang-workflows/.github/workflows/erlang-parallel-build.yml@v1.0.14
|
uses: valitydev/erlang-workflows/.github/workflows/erlang-parallel-build.yml@v1.0.15
|
||||||
with:
|
with:
|
||||||
otp-version: ${{ needs.setup.outputs.otp-version }}
|
otp-version: ${{ needs.setup.outputs.otp-version }}
|
||||||
rebar-version: ${{ needs.setup.outputs.rebar-version }}
|
rebar-version: ${{ needs.setup.outputs.rebar-version }}
|
||||||
|
@ -281,7 +281,6 @@ domain_config_add_version(Options) ->
|
|||||||
wallet = #domain_WalletProvisionTerms{
|
wallet = #domain_WalletProvisionTerms{
|
||||||
withdrawals = #domain_WithdrawalProvisionTerms{
|
withdrawals = #domain_WithdrawalProvisionTerms{
|
||||||
currencies = {value, ?ordset([?cur(<<"RUB">>)])},
|
currencies = {value, ?ordset([?cur(<<"RUB">>)])},
|
||||||
payout_methods = {value, ?ordset([])},
|
|
||||||
cash_limit =
|
cash_limit =
|
||||||
{value,
|
{value,
|
||||||
?cashrng(
|
?cashrng(
|
||||||
@ -319,7 +318,6 @@ domain_config(Options) ->
|
|||||||
wallet = #domain_WalletProvisionTerms{
|
wallet = #domain_WalletProvisionTerms{
|
||||||
withdrawals = #domain_WithdrawalProvisionTerms{
|
withdrawals = #domain_WithdrawalProvisionTerms{
|
||||||
currencies = {value, ?ordset([?cur(<<"RUB">>)])},
|
currencies = {value, ?ordset([?cur(<<"RUB">>)])},
|
||||||
payout_methods = {value, ?ordset([])},
|
|
||||||
cash_limit =
|
cash_limit =
|
||||||
{value,
|
{value,
|
||||||
?cashrng(
|
?cashrng(
|
||||||
@ -352,7 +350,6 @@ domain_config(Options) ->
|
|||||||
wallet = #domain_WalletProvisionTerms{
|
wallet = #domain_WalletProvisionTerms{
|
||||||
withdrawals = #domain_WithdrawalProvisionTerms{
|
withdrawals = #domain_WithdrawalProvisionTerms{
|
||||||
currencies = {value, ?ordset([?cur(<<"RUB">>)])},
|
currencies = {value, ?ordset([?cur(<<"RUB">>)])},
|
||||||
payout_methods = {value, ?ordset([])},
|
|
||||||
cash_limit =
|
cash_limit =
|
||||||
{value,
|
{value,
|
||||||
?cashrng(
|
?cashrng(
|
||||||
@ -895,7 +892,6 @@ domain_config(Options) ->
|
|||||||
wallet = #domain_WalletProvisionTerms{
|
wallet = #domain_WalletProvisionTerms{
|
||||||
withdrawals = #domain_WithdrawalProvisionTerms{
|
withdrawals = #domain_WithdrawalProvisionTerms{
|
||||||
currencies = {value, ?ordset([?cur(<<"BTC">>)])},
|
currencies = {value, ?ordset([?cur(<<"BTC">>)])},
|
||||||
payout_methods = {value, ?ordset([])},
|
|
||||||
cash_limit =
|
cash_limit =
|
||||||
{value,
|
{value,
|
||||||
?cashrng(
|
?cashrng(
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
{applications, [
|
{applications, [
|
||||||
kernel,
|
kernel,
|
||||||
stdlib,
|
stdlib,
|
||||||
|
prometheus,
|
||||||
|
prometheus_cowboy,
|
||||||
woody,
|
woody,
|
||||||
erl_health,
|
erl_health,
|
||||||
scoper,
|
scoper,
|
||||||
|
@ -38,6 +38,7 @@ start() ->
|
|||||||
|
|
||||||
-spec start(normal, any()) -> {ok, pid()} | {error, any()}.
|
-spec start(normal, any()) -> {ok, pid()} | {error, any()}.
|
||||||
start(_StartType, _StartArgs) ->
|
start(_StartType, _StartArgs) ->
|
||||||
|
ok = setup_metrics(),
|
||||||
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
|
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
|
||||||
|
|
||||||
-spec stop(any()) -> ok.
|
-spec stop(any()) -> ok.
|
||||||
@ -192,3 +193,9 @@ get_namespace_schema('ff/w2w_transfer_v1') ->
|
|||||||
wrap_handler(Handler, WrapperOpts) ->
|
wrap_handler(Handler, WrapperOpts) ->
|
||||||
FullOpts = maps:merge(#{handler => Handler}, WrapperOpts),
|
FullOpts = maps:merge(#{handler => Handler}, WrapperOpts),
|
||||||
{ff_woody_wrapper, FullOpts}.
|
{ff_woody_wrapper, FullOpts}.
|
||||||
|
|
||||||
|
%%
|
||||||
|
|
||||||
|
setup_metrics() ->
|
||||||
|
ok = woody_ranch_prometheus_collector:setup(),
|
||||||
|
ok = woody_hackney_prometheus_collector:setup().
|
||||||
|
@ -1237,7 +1237,6 @@ build_party_varset(#{body := Body, wallet_id := WalletID, party_id := PartyID} =
|
|||||||
cost => ff_dmsl_codec:marshal(cash, Body),
|
cost => ff_dmsl_codec:marshal(cash, Body),
|
||||||
party_id => PartyID,
|
party_id => PartyID,
|
||||||
wallet_id => WalletID,
|
wallet_id => WalletID,
|
||||||
payout_method => #domain_PayoutMethodRef{id = wallet_info},
|
|
||||||
% TODO it's not fair, because it's PAYOUT not PAYMENT tool.
|
% TODO it's not fair, because it's PAYOUT not PAYMENT tool.
|
||||||
payment_tool => PaymentTool,
|
payment_tool => PaymentTool,
|
||||||
bin_data => ff_dmsl_codec:marshal(bin_data, BinData)
|
bin_data => ff_dmsl_codec:marshal(bin_data, BinData)
|
||||||
|
@ -321,9 +321,6 @@ do_validate_terms(CombinedTerms, PartyVarset, _Route, _RoutingContext) ->
|
|||||||
allow = Allow,
|
allow = Allow,
|
||||||
global_allow = GAllow,
|
global_allow = GAllow,
|
||||||
currencies = CurrenciesSelector,
|
currencies = CurrenciesSelector,
|
||||||
%% PayoutMethodsSelector is useless for withdrawals
|
|
||||||
%% so we can just ignore it
|
|
||||||
%% payout_methods = PayoutMethodsSelector,
|
|
||||||
cash_limit = CashLimitSelector
|
cash_limit = CashLimitSelector
|
||||||
} = CombinedTerms,
|
} = CombinedTerms,
|
||||||
valid = unwrap(validate_selectors_defined(CombinedTerms)),
|
valid = unwrap(validate_selectors_defined(CombinedTerms)),
|
||||||
@ -339,7 +336,6 @@ do_validate_terms(CombinedTerms, PartyVarset, _Route, _RoutingContext) ->
|
|||||||
validate_selectors_defined(Terms) ->
|
validate_selectors_defined(Terms) ->
|
||||||
Selectors = [
|
Selectors = [
|
||||||
Terms#domain_WithdrawalProvisionTerms.currencies,
|
Terms#domain_WithdrawalProvisionTerms.currencies,
|
||||||
Terms#domain_WithdrawalProvisionTerms.payout_methods,
|
|
||||||
Terms#domain_WithdrawalProvisionTerms.cash_limit,
|
Terms#domain_WithdrawalProvisionTerms.cash_limit,
|
||||||
Terms#domain_WithdrawalProvisionTerms.cash_flow
|
Terms#domain_WithdrawalProvisionTerms.cash_flow
|
||||||
],
|
],
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
shop_id => dmsl_domain_thrift:'ShopID'(),
|
shop_id => dmsl_domain_thrift:'ShopID'(),
|
||||||
risk_score => dmsl_domain_thrift:'RiskScore'(),
|
risk_score => dmsl_domain_thrift:'RiskScore'(),
|
||||||
flow => instant | {hold, dmsl_domain_thrift:'HoldLifetime'()},
|
flow => instant | {hold, dmsl_domain_thrift:'HoldLifetime'()},
|
||||||
payout_method => dmsl_domain_thrift:'PayoutMethodRef'(),
|
|
||||||
wallet_id => dmsl_domain_thrift:'WalletID'(),
|
wallet_id => dmsl_domain_thrift:'WalletID'(),
|
||||||
identification_level => dmsl_domain_thrift:'ContractorIdentificationLevel'(),
|
identification_level => dmsl_domain_thrift:'ContractorIdentificationLevel'(),
|
||||||
bin_data => dmsl_domain_thrift:'BinData'()
|
bin_data => dmsl_domain_thrift:'BinData'()
|
||||||
@ -46,7 +45,6 @@ encode_contract_terms_varset(Varset) ->
|
|||||||
currency = genlib_map:get(currency, Varset),
|
currency = genlib_map:get(currency, Varset),
|
||||||
amount = genlib_map:get(cost, Varset),
|
amount = genlib_map:get(cost, Varset),
|
||||||
shop_id = genlib_map:get(shop_id, Varset),
|
shop_id = genlib_map:get(shop_id, Varset),
|
||||||
payout_method = genlib_map:get(payout_method, Varset),
|
|
||||||
payment_tool = genlib_map:get(payment_tool, Varset),
|
payment_tool = genlib_map:get(payment_tool, Varset),
|
||||||
wallet_id = genlib_map:get(wallet_id, Varset),
|
wallet_id = genlib_map:get(wallet_id, Varset),
|
||||||
bin_data = genlib_map:get(bin_data, Varset)
|
bin_data = genlib_map:get(bin_data, Varset)
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
kernel,
|
kernel,
|
||||||
stdlib,
|
stdlib,
|
||||||
genlib,
|
genlib,
|
||||||
|
prometheus,
|
||||||
|
prometheus_cowboy,
|
||||||
ff_core,
|
ff_core,
|
||||||
snowflake,
|
snowflake,
|
||||||
machinery,
|
machinery,
|
||||||
|
@ -40,7 +40,7 @@ services:
|
|||||||
retries: 10
|
retries: 10
|
||||||
|
|
||||||
machinegun:
|
machinegun:
|
||||||
image: ghcr.io/valitydev/mg2:sha-436f723
|
image: ghcr.io/valitydev/mg2:sha-8bbcd29
|
||||||
command: /opt/machinegun/bin/machinegun foreground
|
command: /opt/machinegun/bin/machinegun foreground
|
||||||
volumes:
|
volumes:
|
||||||
- ./test/machinegun/config.yaml:/opt/machinegun/etc/config.yaml
|
- ./test/machinegun/config.yaml:/opt/machinegun/etc/config.yaml
|
||||||
|
@ -135,21 +135,15 @@
|
|||||||
}}
|
}}
|
||||||
]},
|
]},
|
||||||
|
|
||||||
{how_are_you, [
|
|
||||||
{metrics_publishers, [
|
|
||||||
% {hay_statsd_publisher, #{
|
|
||||||
% key_prefix => <<"fistful-server.">>,
|
|
||||||
% host => "localhost",
|
|
||||||
% port => 8125
|
|
||||||
% }}
|
|
||||||
]}
|
|
||||||
]},
|
|
||||||
|
|
||||||
{snowflake, [
|
{snowflake, [
|
||||||
% {machine_id, 42}
|
% {machine_id, 42}
|
||||||
]},
|
]},
|
||||||
|
|
||||||
{prometheus, [
|
{prometheus, [
|
||||||
{collectors, [default]}
|
{collectors, [default]}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{hackney, [
|
||||||
|
{mod_metrics, woody_hackney_prometheus}
|
||||||
]}
|
]}
|
||||||
].
|
].
|
||||||
|
@ -81,8 +81,6 @@
|
|||||||
{profiles, [
|
{profiles, [
|
||||||
{prod, [
|
{prod, [
|
||||||
{deps, [
|
{deps, [
|
||||||
{how_are_you, {git, "https://github.com/valitydev/how_are_you.git", {ref, "2fd80134"}}},
|
|
||||||
{woody_api_hay, {git, "https://github.com/valitydev/woody_api_hay.git", {ref, "4c39134cd"}}},
|
|
||||||
% Introspect a node running in production
|
% Introspect a node running in production
|
||||||
{recon, "2.5.2"},
|
{recon, "2.5.2"},
|
||||||
{logger_logstash_formatter,
|
{logger_logstash_formatter,
|
||||||
@ -101,8 +99,6 @@
|
|||||||
{logger_logstash_formatter, load},
|
{logger_logstash_formatter, load},
|
||||||
prometheus,
|
prometheus,
|
||||||
prometheus_cowboy,
|
prometheus_cowboy,
|
||||||
woody_api_hay,
|
|
||||||
how_are_you,
|
|
||||||
sasl,
|
sasl,
|
||||||
ff_server
|
ff_server
|
||||||
]},
|
]},
|
||||||
|
10
rebar.lock
10
rebar.lock
@ -25,15 +25,15 @@
|
|||||||
{<<"ctx">>,{pkg,<<"ctx">>,<<"0.6.0">>},2},
|
{<<"ctx">>,{pkg,<<"ctx">>,<<"0.6.0">>},2},
|
||||||
{<<"damsel">>,
|
{<<"damsel">>,
|
||||||
{git,"https://github.com/valitydev/damsel.git",
|
{git,"https://github.com/valitydev/damsel.git",
|
||||||
{ref,"3a25a01f89423e1fc7dbabc8a3f777647b659f45"}},
|
{ref,"8e034bc74b1f4ed0e00dd63d0c3ca9c922be1c47"}},
|
||||||
0},
|
0},
|
||||||
{<<"dmt_client">>,
|
{<<"dmt_client">>,
|
||||||
{git,"https://github.com/valitydev/dmt_client.git",
|
{git,"https://github.com/valitydev/dmt_client.git",
|
||||||
{ref,"b8bc0281dbf1e55a1a67ef6da861e0353ff14913"}},
|
{ref,"d8a4f490d49c038d96f1cbc2a279164c6f4039f9"}},
|
||||||
0},
|
0},
|
||||||
{<<"dmt_core">>,
|
{<<"dmt_core">>,
|
||||||
{git,"https://github.com/valitydev/dmt-core.git",
|
{git,"https://github.com/valitydev/dmt-core.git",
|
||||||
{ref,"75841332fe0b40a77da0c12ea8d5dbb994da8e82"}},
|
{ref,"19d8f57198f2cbe5b64aa4a923ba32774e505503"}},
|
||||||
1},
|
1},
|
||||||
{<<"erl_health">>,
|
{<<"erl_health">>,
|
||||||
{git,"https://github.com/valitydev/erlang-health.git",
|
{git,"https://github.com/valitydev/erlang-health.git",
|
||||||
@ -82,7 +82,7 @@
|
|||||||
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.1">>},2},
|
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.1">>},2},
|
||||||
{<<"party_client">>,
|
{<<"party_client">>,
|
||||||
{git,"https://github.com/valitydev/party-client-erlang.git",
|
{git,"https://github.com/valitydev/party-client-erlang.git",
|
||||||
{ref,"38c7782286877a63087c19de49f26ab175a37de7"}},
|
{ref,"a82682b6f55f41ff4962b2666bbd12cb5f1ece25"}},
|
||||||
0},
|
0},
|
||||||
{<<"prometheus">>,{pkg,<<"prometheus">>,<<"4.8.1">>},0},
|
{<<"prometheus">>,{pkg,<<"prometheus">>,<<"4.8.1">>},0},
|
||||||
{<<"prometheus_cowboy">>,{pkg,<<"prometheus_cowboy">>,<<"0.1.8">>},0},
|
{<<"prometheus_cowboy">>,{pkg,<<"prometheus_cowboy">>,<<"0.1.8">>},0},
|
||||||
@ -120,7 +120,7 @@
|
|||||||
0},
|
0},
|
||||||
{<<"woody">>,
|
{<<"woody">>,
|
||||||
{git,"https://github.com/valitydev/woody_erlang.git",
|
{git,"https://github.com/valitydev/woody_erlang.git",
|
||||||
{ref,"81219ba5408e1c67f5eaed3c7e566ede42da88d4"}},
|
{ref,"072825ee7179825a4078feb0649df71303c74157"}},
|
||||||
0}]}.
|
0}]}.
|
||||||
[
|
[
|
||||||
{pkg_hash,[
|
{pkg_hash,[
|
||||||
|
Loading…
Reference in New Issue
Block a user