@stackedapp/utils 2.40.1 → 2.41.1

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.
@@ -1001,6 +1001,20 @@ function evaluateContractInteraction(cond, ctx) {
1001
1001
  function evaluateTwitterVerification(cond, ctx) {
1002
1002
  const tracker = ctx.completionTrackers?.twitterVerification?.[cond.id];
1003
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
+ }
1004
1018
  const actionTextMap = {
1005
1019
  follow: `Follow @${cond.targetUsername || '?'} on X`,
1006
1020
  retweet: 'Retweet a post on X',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackedapp/utils",
3
- "version": "2.40.1",
3
+ "version": "2.41.1",
4
4
  "description": "Public utilities for Stacked platform SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",