HG-452: Fix pm_ruleset (#477)

* HG-452: Fix pm_ruleset

* HG-452: Revert ComputeGlobals

* HG-452: Slim down PR

* HG-452: Remove compute_globals

* HG-452: Remove unneeded reduce_payment_routing_decisions/3 clause
This commit is contained in:
ndiezel0 2020-09-11 13:11:35 +03:00 committed by GitHub
parent 7ee4679b1e
commit 6f4433bdc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,13 +20,14 @@ reduce_payment_routing_ruleset(RuleSet, VS, DomainRevision) ->
decisions = reduce_payment_routing_decisions(RuleSet#domain_PaymentRoutingRuleset.decisions, VS, DomainRevision)
}.
reduce_payment_routing_decisions({Type, []}, _, _) ->
{Type, []};
reduce_payment_routing_decisions({delegates, Delegates}, VS, Rev) ->
reduce_payment_routing_delegates(Delegates, VS, Rev);
reduce_payment_routing_decisions({candidates, Candidates}, VS, Rev) ->
reduce_payment_routing_candidates(Candidates, VS, Rev).
reduce_payment_routing_delegates([], _VS, _Rev) ->
{delegates, []};
reduce_payment_routing_delegates([D | Delegates], VS, Rev) ->
Predicate = D#domain_PaymentRoutingDelegate.allowed,
RuleSetRef = D#domain_PaymentRoutingDelegate.ruleset,