Skip to content

Commit afa39d8

Browse files
committed
chore: simplify patch comment to single line
1 parent 3c66ff1 commit afa39d8

1 file changed

Lines changed: 9 additions & 36 deletions

File tree

patches/@metamask+transaction-pay-controller+19.2.1.patch

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,52 @@
11
diff --git a/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.cjs b/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.cjs
2-
index 66884ed..3763145 100644
2+
index 66884ed..d475de2 100644
33
--- a/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.cjs
44
+++ b/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.cjs
5-
@@ -238,7 +238,13 @@ exports.getPayStrategiesConfig = getPayStrategiesConfig;
5+
@@ -238,7 +238,8 @@ exports.getPayStrategiesConfig = getPayStrategiesConfig;
66
function isRelayExecuteEnabled(messenger) {
77
const state = messenger.call('RemoteFeatureFlagController:getState');
88
const featureFlags = state.remoteFeatureFlags?.confirmations_pay ?? {};
99
- return featureFlags.payStrategies?.relay?.executeEnabled ?? false;
10-
+ // Read from `gaslessEnabled` instead of `executeEnabled`. The original
11-
+ // flag name predates per-version gating in the feature flag service, so
12-
+ // any previously shipped client that only looks at `executeEnabled` would
13-
+ // re-enable the flow on older, broken builds as soon as the flag is
14-
+ // turned on. Renaming the key here ensures only clients carrying this
15-
+ // patch (i.e. >=19.2.1) pick up the flag.
10+
+ // Renamed from `executeEnabled` so the flag cannot re-enable the flow on older broken versions (predates version support).
1611
+ return featureFlags.payStrategies?.relay?.gaslessEnabled ?? false;
1712
}
1813
exports.isRelayExecuteEnabled = isRelayExecuteEnabled;
1914
/**
2015
diff --git a/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.mjs b/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.mjs
21-
index c8b2f8a..c7122c6 100644
16+
index c8b2f8a..5ab03a9 100644
2217
--- a/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.mjs
2318
+++ b/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.mjs
24-
@@ -232,7 +232,13 @@ export function getPayStrategiesConfig(messenger) {
19+
@@ -232,7 +232,7 @@ export function getPayStrategiesConfig(messenger) {
2520
export function isRelayExecuteEnabled(messenger) {
2621
const state = messenger.call('RemoteFeatureFlagController:getState');
2722
const featureFlags = state.remoteFeatureFlags?.confirmations_pay ?? {};
2823
- return featureFlags.payStrategies?.relay?.executeEnabled ?? false;
29-
+ // Read from `gaslessEnabled` instead of `executeEnabled`. The original
30-
+ // flag name predates per-version gating in the feature flag service, so
31-
+ // any previously shipped client that only looks at `executeEnabled` would
32-
+ // re-enable the flow on older, broken builds as soon as the flag is
33-
+ // turned on. Renaming the key here ensures only clients carrying this
34-
+ // patch (i.e. >=19.2.1) pick up the flag.
3524
+ return featureFlags.payStrategies?.relay?.gaslessEnabled ?? false;
3625
}
3726
/**
3827
* Get the origin gas overhead to include in Relay quote requests
3928
diff --git a/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.d.cts b/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.d.cts
40-
index 0ef444d..a23a5e6 100644
29+
index 0ef444d..0538026 100644
4130
--- a/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.d.cts
4231
+++ b/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.d.cts
43-
@@ -41,7 +41,15 @@ export type PayStrategiesConfigRaw = {
32+
@@ -41,7 +41,7 @@ export type PayStrategiesConfigRaw = {
4433
across?: AcrossConfigRaw;
4534
relay?: {
4635
enabled?: boolean;
4736
- executeEnabled?: boolean;
48-
+ /**
49-
+ * Renamed from `executeEnabled`. The original flag name predates
50-
+ * per-version gating in the feature flag service, so older clients
51-
+ * that only recognise `executeEnabled` would re-enable the Relay
52-
+ * /execute gasless flow on previously broken builds as soon as the
53-
+ * flag is toggled on. This patched name is only read by clients
54-
+ * carrying the rename patch (i.e. >=19.2.1).
55-
+ */
5637
+ gaslessEnabled?: boolean;
5738
originGasOverhead?: string;
5839
pollingInterval?: number;
5940
pollingTimeout?: number;
6041
diff --git a/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.d.mts b/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.d.mts
61-
index e08336e..42ade48 100644
42+
index e08336e..8dd8f42 100644
6243
--- a/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.d.mts
6344
+++ b/node_modules/@metamask/transaction-pay-controller/dist/utils/feature-flags.d.mts
64-
@@ -41,7 +41,15 @@ export type PayStrategiesConfigRaw = {
45+
@@ -41,7 +41,7 @@ export type PayStrategiesConfigRaw = {
6546
across?: AcrossConfigRaw;
6647
relay?: {
6748
enabled?: boolean;
6849
- executeEnabled?: boolean;
69-
+ /**
70-
+ * Renamed from `executeEnabled`. The original flag name predates
71-
+ * per-version gating in the feature flag service, so older clients
72-
+ * that only recognise `executeEnabled` would re-enable the Relay
73-
+ * /execute gasless flow on previously broken builds as soon as the
74-
+ * flag is toggled on. This patched name is only read by clients
75-
+ * carrying the rename patch (i.e. >=19.2.1).
76-
+ */
7750
+ gaslessEnabled?: boolean;
7851
originGasOverhead?: string;
7952
pollingInterval?: number;

0 commit comments

Comments
 (0)