@stackedapp/utils 2.40.0 → 2.41.0
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/conditions/handlers.js +20 -2
- package/package.json +1 -1
|
@@ -475,7 +475,8 @@ function evaluateIdentifiers(cond, ctx) {
|
|
|
475
475
|
}
|
|
476
476
|
else {
|
|
477
477
|
isMet = platformsToCheck.some((p) => playerPlatforms.has(p.toLowerCase()));
|
|
478
|
-
displayText =
|
|
478
|
+
displayText =
|
|
479
|
+
platformsToCheck.length > 1 ? `Link any of your ${(0, helpers_1.formatList)(platforms)} accounts` : `Link your ${platforms[0]} account`;
|
|
479
480
|
percentCompleted = isMet ? 100 : 0;
|
|
480
481
|
}
|
|
481
482
|
return {
|
|
@@ -627,7 +628,10 @@ function evaluateStackedAccount(cond, ctx) {
|
|
|
627
628
|
}
|
|
628
629
|
else {
|
|
629
630
|
met = platformsToCheck.some((p) => playerPlatforms.has(p.toLowerCase()));
|
|
630
|
-
displayText =
|
|
631
|
+
displayText =
|
|
632
|
+
platformsToCheck.length > 1
|
|
633
|
+
? `Link any of your ${(0, helpers_1.formatList)(platforms)} accounts in Stacked`
|
|
634
|
+
: `Link your ${platforms[0]} account in Stacked`;
|
|
631
635
|
percentCompleted = met ? 100 : 0;
|
|
632
636
|
}
|
|
633
637
|
if (!met)
|
|
@@ -997,6 +1001,20 @@ function evaluateContractInteraction(cond, ctx) {
|
|
|
997
1001
|
function evaluateTwitterVerification(cond, ctx) {
|
|
998
1002
|
const tracker = ctx.completionTrackers?.twitterVerification?.[cond.id];
|
|
999
1003
|
const isMet = tracker?.verified === true;
|
|
1004
|
+
if (cond.action === 'likeAndRetweet') {
|
|
1005
|
+
const makeDetail = (Action, text) => ({
|
|
1006
|
+
isMet,
|
|
1007
|
+
kind: 'twitterVerification',
|
|
1008
|
+
trackerAmount: isMet ? 1 : 0,
|
|
1009
|
+
trackerGoal: 1,
|
|
1010
|
+
percentCompleted: isMet ? 100 : 0,
|
|
1011
|
+
text: templateText(cond, { current: isMet ? 1 : 0, goal: 1, action: Action.toLowerCase(), Action }, text),
|
|
1012
|
+
});
|
|
1013
|
+
return {
|
|
1014
|
+
isMet,
|
|
1015
|
+
details: [makeDetail('Like', 'Like a post on X'), makeDetail('Retweet', 'Retweet a post on X')],
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
1000
1018
|
const actionTextMap = {
|
|
1001
1019
|
follow: `Follow @${cond.targetUsername || '?'} on X`,
|
|
1002
1020
|
retweet: 'Retweet a post on X',
|