create-message-kit 1.1.10-beta.2 → 1.1.10

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -71,7 +71,6 @@ async function updatePackagejson(destDir, templateType) {
71
71
 
72
72
  packageTemplate.dependencies["@xmtp/message-kit"] = "latest";
73
73
  //Add for yarn in general
74
- packageTemplate.scripts.postinstall = "tsc";
75
74
  packageTemplate.packageManager = `yarn@4.5.1`;
76
75
 
77
76
  fs.writeJsonSync(resolve(destDir, "package.json"), packageTemplate, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-message-kit",
3
- "version": "1.1.10-beta.2",
3
+ "version": "1.1.10",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,5 +1,6 @@
1
1
  import { ensUrl } from "../index.js";
2
2
  import { XMTPContext, getUserInfo } from "@xmtp/message-kit";
3
+
3
4
  import type { skillAction } from "@xmtp/message-kit";
4
5
 
5
6
  export const registerSkill: skillAction[] = [
@@ -24,6 +24,19 @@ export async function handleTip(context: XMTPContext) {
24
24
  },
25
25
  },
26
26
  } = context;
27
- console.log("tip", address);
28
- await context.sendPay(1, "USDC", address);
27
+
28
+ if (!address) {
29
+ return {
30
+ code: 400,
31
+ message: "Please provide an address to tip.",
32
+ };
33
+ }
34
+ const data = await getUserInfo(address);
35
+
36
+ let sendUrl = `${txpayUrl}/?&amount=1&token=USDC&receiver=${address}`;
37
+
38
+ return {
39
+ code: 200,
40
+ message: sendUrl,
41
+ };
29
42
  }