@final-commerce/common 2.1.3 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +0 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1708,20 +1708,12 @@ function conditionMetLines(config, from, to, context) {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
function getAvailableTransitions(current, config, context) {
|
|
1710
1710
|
const candidates = [];
|
|
1711
|
-
for (const s of config.paymentStates) {
|
|
1712
|
-
if (s.id === current.payment) continue;
|
|
1713
|
-
candidates.push({ payment: s.id, fulfillment: current.fulfillment });
|
|
1714
|
-
}
|
|
1715
1711
|
for (const s of config.fulfillmentStates) {
|
|
1716
1712
|
if (s.id === current.fulfillment) continue;
|
|
1717
1713
|
candidates.push({ payment: current.payment, fulfillment: s.id });
|
|
1718
1714
|
}
|
|
1719
1715
|
const out = [];
|
|
1720
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1721
1716
|
for (const to of candidates) {
|
|
1722
|
-
const key = `${to.payment}:${to.fulfillment}`;
|
|
1723
|
-
if (seen.has(key)) continue;
|
|
1724
|
-
seen.add(key);
|
|
1725
1717
|
const result = canTransition({
|
|
1726
1718
|
from: current,
|
|
1727
1719
|
to,
|