Skip to content

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Sep 11, 2025

Resolves #17934

Summary by CodeRabbit

  • New Features

    • Coinbase integration: monitor a wallet by Address and Network selection; configure API keys.
    • Webhook management: list, create, and delete webhooks from the app.
    • New "New Wallet Event (Instant)" trigger: shared base for webhook handling, auto-creates/deletes webhooks, emits events with metadata, includes a sample test event.
  • Chores

    • Bumped component version to 0.1.0 and added Coinbase SDK dependency.

Copy link

vercel bot commented Sep 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Sep 12, 2025 4:55pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 12, 2025 4:55pm

Copy link
Contributor

coderabbitai bot commented Sep 11, 2025

Walkthrough

Adds a Coinbase Developer Platform integration: app-level Coinbase configuration and webhook management, a shared source base for webhook handling, a new wallet-based event source (with activate/deactivate and meta generation), a test event fixture, and package dependency/version updates. Minor formatting newline added to TimescaleDB app.

Changes

Cohort / File(s) Summary
Coinbase app
components/coinbase_developer_platform/coinbase_developer_platform.app.mjs
Replaces empty propDefinitions with walletAddress and networkId; replaces authKeys() with configure() using this.$auth; adds webhook methods listWebhooks(), createWebhook(opts), deleteWebhook(webhook); imports Coinbase and Webhook.
Package metadata
components/coinbase_developer_platform/package.json
Bumps version 0.0.10.1.0; adds dependencies @coinbase/coinbase-sdk@^0.25.0 and @pipedream/platform@^3.1.0.
Shared source base
components/coinbase_developer_platform/sources/common/base.mjs
Adds base source exporting props (coinbase, db, http), helpers _getWebhookId() / _setWebhookId(), generateMeta() stub (throws), and run(event) which emits incoming webhook payloads with meta.
New wallet event source
components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs
New source that extends common base; adds walletAddress and networkId props; activate creates wallet_activity webhook (stores id); deactivate deletes stored webhook; implements generateMeta(body); includes sampleEmit.
Test fixture
components/coinbase_developer_platform/sources/new-wallet-event/test-event.mjs
Adds sample ERC-20 transfer event object used as sampleEmit.
Formatting only
components/timescaledb/timescaledb.app.mjs
Adds trailing newline; no functional changes.

Sequence Diagram(s)

mermaid
sequenceDiagram
autonumber
rect rgb(240,248,255)
participant Source as New Wallet Source
participant Base as Common Base
participant App as Coinbase App
participant Coinbase as Coinbase SDK
participant DB as DB (persist webhookId)
note right of Coinbase: Coinbase SDK (Webhook API)
end
Source->>App: configure() (uses auth keys)
App->>Coinbase: Coinbase.configure(apiKeyName, privateKey)
Source->>App: activate(walletAddress, networkId, http.endpoint)
App->>Coinbase: create webhook {type: wallet_activity, networkId, eventTypeFilter}
Coinbase-->>App: webhook object (id)
App->>DB: _setWebhookId(id)
Note over Source, Coinbase: Incoming webhook events (HTTP -> Source.http.endpoint)
Coinbase->>Source: POST event body
Source->>Base: run(event)
Base->>Base: generateMeta(body)
Base->>Emitter: this.$emit(body, meta)
Source->>App: deactivate()
App->>DB: _getWebhookId()
App->>Coinbase: listWebhooks() -> find by id -> deleteWebhook(id)
Coinbase-->>App: deletion confirmation

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

"A rabbit hops, a webhook lands,
Tiny keys clasp gentle hands.
Networks hum, addresses sing,
I stitched a trigger, tied a string.
⚡️ New events — let workflows spring!"

Pre-merge checks (2 passed, 3 warnings)

❌ Failed checks (3 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning The changes implement wallet-based triggers and webhook management (new-wallet-event source, base helper, and create/list/delete webhook methods), addressing part of the linked issue [#17934]. However, the PR does not implement wallet-signed message (X402) triggers, nor does it add the requested on-shelf Web3 templates or include links to the relevant API documentation as specified in the same issue [#17934]. Therefore the PR partially satisfies the linked issue but does not fully meet all stated objectives. Either extend the PR to add X402 (wallet-signed message) support, create the requested Web3 → enterprise templates, and include API documentation links, or update the PR and issue to explicitly scope which objectives are completed and which remain; include tests or manual-verification steps for each completed objective.
Out of Scope Changes Check ⚠️ Warning Most edits are confined to components/coinbase_developer_platform and align with the feature request, but there is at least one unrelated change: a trailing newline added to components/timescaledb/timescaledb.app.mjs which is outside the linked issue's scope. That out-of-scope formatting change should be removed or justified so the PR remains focused and reviewable. Other component-level package changes appear localized to the coinbase component. Remove or revert the unrelated timescaledb formatting change (or split it into a separate maintenance PR) and confirm package.json changes are intentionally limited to the new coinbase component; document any non-feature formatting or maintenance changes in the PR description if they must remain.
Description Check ⚠️ Warning The PR description currently only contains "Resolves #17934" and does not follow the repository template which requires a "## WHY" section; it lacks motivation, a summary of implemented features, configuration or usage notes, testing evidence, and links to API documentation. Because the repository template is not populated, reviewers cannot easily see the rationale, scope, or how to exercise the new functionality. The description is incomplete relative to the project's required PR template. Populate the PR using the repository template: add a "## WHY" explaining the motivation, list what was implemented (files, new props, webhook methods, and the new source), include setup/config steps and test evidence (screenshots or logs), and add links to relevant Coinbase API docs and the linked issue; also state any remaining scope or work items.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Coinbase Developer Platform - New Wallet Event" is concise and accurately describes the primary change in the diff: adding a Coinbase developer-platform integration and a new wallet-based trigger (components/coinbase_developer_platform/sources/new-wallet-event and related app methods). It is focused, specific, and free of noise, so a reviewer scanning PR history can quickly grasp the main intent. The title aligns with the implemented feature set rather than extraneous files or unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-17934

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@michelle0927
Copy link
Collaborator Author

@vunguyenhung I was able to trigger events by claiming coins through the Faucet.

Screenshot 2025-09-11 at 11 19 06 AM

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (4)
components/coinbase_developer_platform/sources/new-wallet-event/test-event.mjs (1)

1-15: Sample payload looks good

Covers required fields used by generateMeta. Consider adding a second sample for a different eventType for docs later.

components/coinbase_developer_platform/coinbase_developer_platform.app.mjs (1)

35-46: Consider pagination and safer deletion API

SDK list() calls may paginate; surface pagination or loop to ensure full coverage. Also accept either a webhook ID or instance for deletion to avoid undefined deref.

-    listWebhooks() {
-      return Webhook.list();
-    },
-    deleteWebhook(webhook) {
-      return webhook.delete();
-    },
+    async listWebhooksAll() {
+      const acc = [];
+      for await (const page of Webhook.list()) acc.push(...(page?.data ?? []));
+      return acc;
+    },
+    async deleteWebhook(webhookOrId) {
+      const inst = typeof webhookOrId === "string" ? await Webhook.fetch(webhookOrId) : webhookOrId;
+      if (!inst) return;
+      return inst.delete();
+    },

Please confirm Webhook.list() is async-iterable and Webhook.fetch(id) exists in this SDK version.

components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (2)

10-10: Align component version with package or add changelog context

Consider starting at 0.1.0 to match the package or document versioning policy.


60-66: Harden meta generation for missing fields

Provide fallbacks to avoid NaN timestamps or undefined ids.

     generateMeta(body) {
       return {
-        id: body.transactionHash,
-        summary: `New ${body.eventType} event`,
-        ts: Date.parse(body.blockTime),
+        id: body.transactionHash || body.webhookId || `${body.eventType}:${Date.now()}`,
+        summary: `New ${body.eventType || "wallet_activity"} event`,
+        ts: body.blockTime ? Date.parse(body.blockTime) : Date.now(),
       };
     },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4e584e and 4bbc924.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • components/coinbase_developer_platform/coinbase_developer_platform.app.mjs (1 hunks)
  • components/coinbase_developer_platform/package.json (2 hunks)
  • components/coinbase_developer_platform/sources/common/base.mjs (1 hunks)
  • components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (1 hunks)
  • components/coinbase_developer_platform/sources/new-wallet-event/test-event.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-07-24T02:06:47.016Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.

Applied to files:

  • components/coinbase_developer_platform/sources/common/base.mjs
  • components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs
🧬 Code graph analysis (2)
components/coinbase_developer_platform/sources/common/base.mjs (1)
components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (1)
  • webhookId (50-50)
components/coinbase_developer_platform/coinbase_developer_platform.app.mjs (1)
components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (3)
  • wallet (25-25)
  • webhook (32-40)
  • webhook (53-53)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (5)
components/coinbase_developer_platform/package.json (2)

3-3: Version bump LGTM

Semantic minor bump matches new functionality.


15-18: Confirm SDK versions and run a vuln audit before release

File: components/coinbase_developer_platform/package.json (lines 15–18)

  • Verification: npm shows @coinbase/coinbase-sdk@0.25.0 and @pipedream/platform@3.1.0 are the latest as of Sep 2025; no package-specific security advisories were found. (Separate advisory exists for @coinbase/wallet-sdk — update to >=4.3.0 if you use it.)
  • Action: run npm audit / OSV / Snyk to scan for transitive vulns and pin exact versions in package.json if you want to avoid accidental breaking updates.
components/coinbase_developer_platform/coinbase_developer_platform.app.mjs (2)

24-31: Add runtime credential check; SDK option names are apiKeyName/privateKey — confirm auth-schema keys

File: components/coinbase_developer_platform/coinbase_developer_platform.app.mjs Lines: 24-31

Coinbase.configure expects apiKeyName and privateKey; keep the current mapping but add a defensive presence check and surface a clear error if credentials are missing. If your app auth schema uses different keys, update the mapping.

     configure() {
-      const apiKeyName = this.$auth.api_key_id;
-      const privateKey = this.$auth.secret_key;
+      const apiKeyName = this.$auth.api_key_id;
+      const privateKey = this.$auth.secret_key;
+      if (!apiKeyName || !privateKey) {
+        throw new Error("Missing Coinbase API credentials (api_key_id / secret_key).");
+      }
       Coinbase.configure({
         apiKeyName,
         privateKey,
       });
     },

13-20: Use wallet.model.id for value; Wallet.fetch requires wallet ID

Confirmed — Wallet.fetch expects the wallet's ID (wallet.id), not default_address.wallet_id; change options() to return value: wallet.model.id and make the label friendlier (e.g. network · id · short address preview). (coinbase-cloud.mintlify.app)

components/coinbase_developer_platform/sources/common/base.mjs (1)

17-19: Abstract enforcement LGTM

Throwing ConfigurationError to force overrides is appropriate.

lcaresia
lcaresia previously approved these changes Sep 11, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (3)

9-9: Update docs link to match wallet_activity webhook

The description links to “external address” docs but this source creates wallet_activity webhooks. Point to the wallet_activity docs (e.g., the Webhook SDK page or Event Types section).

Apply:

-  description: "Emit new event for each new wallet event. [See the documentation](https://docs.cdp.coinbase.com/webhooks/cdp-sdk#external-address-webhook)",
+  description: "Emit an event for each new wallet activity. [See the documentation](https://docs.cdp.coinbase.com/webhooks/event-types#wallet_activity)",

57-60: Guard deletion when not found and clear persisted state

Prevent calling delete() on undefined and clear the stored webhook id after successful cleanup.

Apply:

-        const { data: webhooks } = await this.coinbase.listWebhooks();
-        const webhook = webhooks.find((webhook) => webhook.model.id === webhookId);
-        await this.coinbase.deleteWebhook(webhook);
+        const { data: webhooks } = await this.coinbase.listWebhooks();
+        const webhook = webhooks?.find((w) => w.model.id === webhookId);
+        if (webhook) {
+          await this.coinbase.deleteWebhook(webhook);
+        }
+        this._setWebhookId(undefined);

31-42: Fix filter shape and make webhook creation idempotent

  • Remove the snake_case eventTypeFilter.wallet_id and either omit walletId or use the SDK camelCase key; also avoid creating duplicate webhooks on each activate by listing existing webhooks and reusing a matching one. (docs.cdp.coinbase.com)

Apply:

-        const webhook = await this.coinbase.createWebhook({
-          notificationUri: this.http.endpoint,
-          eventType: "wallet_activity",
-          networkId: this.networkId,
-          eventTypeFilter: {
-            addresses: [
-              this.walletAddress,
-            ],
-            wallet_id: "",
-          },
-        });
+        const { data: webhooks } = await this.coinbase.listWebhooks();
+        const existing = webhooks?.find((w) =>
+          w.model?.notification_uri === this.http.endpoint
+          && w.model?.event_type === "wallet_activity"
+          && w.model?.network_id === this.networkId
+          && Array.isArray(w.model?.event_type_filter?.addresses)
+          && w.model.event_type_filter.addresses.includes(this.walletAddress)
+        );
+        const webhook = existing ?? await this.coinbase.createWebhook({
+          notificationUri: this.http.endpoint,
+          eventType: "wallet_activity",
+          networkId: this.networkId,
+          eventTypeFilter: {
+            addresses: [ this.walletAddress ],
+          },
+        });

(package.json shows @coinbase/coinbase-sdk ^0.25.0).

🧹 Nitpick comments (3)
components/coinbase_developer_platform/coinbase_developer_platform.app.mjs (2)

19-21: Improve options UX: return {label,value} pairs for networks

Returning strings works but labeled options are clearer for users selecting networks.

Apply:

-      async options() {
-        const networks = Coinbase.networks;
-        return Object.values(networks);
-      },
+      async options() {
+        const networks = Coinbase.networks;
+        return Object.entries(networks).map(([key, value]) => ({
+          label: `${key} (${value})`,
+          value,
+        }));
+      },

33-41: Make webhook helpers self-sufficient by configuring before calls

Defensive improvement: call this.configure() inside listWebhooks/createWebhook/deleteWebhook to avoid misuse if a caller forgets to configure first. Also guard webhook?.delete.

Apply:

-    listWebhooks() {
-      return Webhook.list();
-    },
-    createWebhook(opts) {
-      return Webhook.create(opts);
-    },
-    deleteWebhook(webhook) {
-      return webhook.delete();
-    },
+    listWebhooks() {
+      this.configure();
+      return Webhook.list();
+    },
+    createWebhook(opts) {
+      this.configure();
+      return Webhook.create(opts);
+    },
+    deleteWebhook(webhook) {
+      this.configure();
+      return webhook?.delete?.();
+    },
components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (1)

65-71: Harden meta extraction or confirm payload fields

Field names can vary (transactionHash vs txHash/hash, blockTime vs block_time, eventType vs event_type). Either confirm exact fields or add safe fallbacks.

Apply:

-    generateMeta(body) {
-      return {
-        id: body.transactionHash,
-        summary: `New ${body.eventType} event`,
-        ts: Date.parse(body.blockTime),
-      };
-    },
+    generateMeta(body) {
+      const id = body?.transactionHash || body?.txHash || body?.hash || `${body?.id || Date.now()}`;
+      const eventType = body?.eventType || body?.event_type || "wallet_activity";
+      const ts = Date.parse(body?.blockTime || body?.block_time || new Date().toISOString());
+      return { id, summary: `New ${eventType} event`, ts };
+    },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4bbc924 and 9d8201d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • components/coinbase_developer_platform/coinbase_developer_platform.app.mjs (1 hunks)
  • components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (1 hunks)
  • components/timescaledb/timescaledb.app.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • components/timescaledb/timescaledb.app.mjs
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.

Applied to files:

  • components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs
🧬 Code graph analysis (1)
components/coinbase_developer_platform/coinbase_developer_platform.app.mjs (1)
components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (2)
  • webhook (32-42)
  • webhook (58-58)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (3)
components/coinbase_developer_platform/coinbase_developer_platform.app.mjs (2)

1-3: LGTM: Correct SDK imports and app scaffold

The app wrapper and SDK imports look good and align with the new source usage.


25-32: Verify method binding for this.$auth inside configure()

Ensure app methods are bound so this.$auth resolves correctly when called via this.coinbase.configure() from sources. If not guaranteed by the framework, bind explicitly when exporting.

components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (1)

5-13: LGTM: New source scaffold and integration with common base

Name/key/version/type/dedupe/props structure looks consistent with other components.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (4)
components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (4)

9-9: Fix docs link to point to wallet_activity webhook docs

Current link references “external address webhook.” This source emits wallet_activity events. Update the URL accordingly.

-  description: "Emit new event for each new wallet event. [See the documentation](https://docs.cdp.coinbase.com/webhooks/cdp-sdk#external-address-webhook)",
+  description: "Emit a new event for each wallet activity. [See the documentation](https://docs.cdp.coinbase.com/webhooks/event-types#wallet_activity)",

31-41: Incorrect filter shape/value: remove invalid wallet_id and sanitize addresses

The SDK payload mixes SDK top-level key (eventTypeFilter) with REST-style wallet_id, and it’s set to an empty string. This likely breaks webhook creation or yields unexpected filtering. Keep addresses only (or use walletId in camelCase if available).

       const webhook = await this.coinbase.createWebhook({
         notificationUri: this.http.endpoint,
         eventType: "wallet_activity",
         networkId: this.networkId,
         eventTypeFilter: {
-          addresses: [
-            this.walletAddress,
-          ],
-          wallet_id: "",
+          addresses: [ this.walletAddress ].filter(Boolean),
         },
       });

49-57: Guard deletion when webhook not found and clear stored state

Avoid calling delete on undefined and clear the persisted webhook id after successful delete (or regardless if not found).

     async deactivate() {
       this.coinbase.configure();
       const webhookId = this._getWebhookId();
       if (webhookId) {
         const { data: webhooks } = await this.coinbase.listWebhooks();
-        const webhook = webhooks.find((webhook) => webhook.model.id === webhookId);
-        await this.coinbase.deleteWebhook(webhook);
+        const webhook = webhooks?.find((w) => w.model.id === webhookId);
+        if (webhook) {
+          await this.coinbase.deleteWebhook(webhook);
+        }
+        this._setWebhookId(undefined);
       }
     },

29-48: Make webhook creation idempotent (avoid duplicates and extra deliveries/costs)

Always creating a webhook on activate can produce duplicates. Reuse an existing matching webhook by endpoint/event/network first.

     async activate() {
       this.coinbase.configure();
-      const webhook = await this.coinbase.createWebhook({
-        notificationUri: this.http.endpoint,
-        eventType: "wallet_activity",
-        networkId: this.networkId,
-        eventTypeFilter: {
-          addresses: [
-            this.walletAddress,
-          ],
-          wallet_id: "",
-        },
-      });
+      const { data: webhooks } = await this.coinbase.listWebhooks();
+      const existing = webhooks?.find((w) =>
+        w.model?.notification_uri === this.http.endpoint
+        && w.model?.event_type === "wallet_activity"
+        && w.model?.network_id === this.networkId
+      );
+      const webhook = existing ?? await this.coinbase.createWebhook({
+        notificationUri: this.http.endpoint,
+        eventType: "wallet_activity",
+        networkId: this.networkId,
+        eventTypeFilter: {
+          addresses: [ this.walletAddress ].filter(Boolean),
+        },
+      });
 
       if (!webhook?.model?.id) {
         throw new ConfigurationError("Failed to create webhook");
       }
 
       this._setWebhookId(webhook.model.id);
     },
🧹 Nitpick comments (1)
components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (1)

62-66: Harden meta mapping and ensure stable dedupe id

Wallet events may not always include transactionHash/blockTime or may batch multiple logs per tx. Add fallbacks and include a log/sequence index in id to avoid collapsing multiple events from the same tx.

-    generateMeta(body) {
-      return {
-        id: body.transactionHash,
-        summary: `New ${body.eventType} event`,
-        ts: Date.parse(body.blockTime),
-      };
-    },
+    generateMeta(body) {
+      const id =
+        body.transactionHash
+        ?? body.txHash
+        ?? (body.eventId || body.id);
+      const idx = body.logIndex ?? body.sequence ?? 0;
+      return {
+        id: idx ? `${id}:${idx}` : id,
+        summary: `New ${(body.eventType ?? body.event_type ?? "wallet_activity")} event`,
+        ts: Date.parse(body.blockTime ?? body.block_time ?? new Date().toISOString()),
+      };
+    },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d8201d and 2d2c3ff.

📒 Files selected for processing (1)
  • components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.

Applied to files:

  • components/coinbase_developer_platform/sources/new-wallet-event/new-wallet-event.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components

@michelle0927
Copy link
Collaborator Author

/approve

@michelle0927 michelle0927 merged commit b995dab into master Sep 16, 2025
10 checks passed
@michelle0927 michelle0927 deleted the issue-17934 branch September 16, 2025 14:38
sergio-eliot-rodriguez pushed a commit to sergio-eliot-rodriguez/sergio_wong_does_pipedream that referenced this pull request Sep 21, 2025
* new component

* pnpm-lock.yaml

* updates

* updates
vunguyenhung added a commit that referenced this pull request Sep 24, 2025
* Leonardo AI components

* added unzoom image action

* fixing link errors

* more lint fixes

* Merging pull request #18359

* fix: pagination prop and params struct

* fix: no need for paginate here

* chore: update version

* chore: cleanup

* chore: update package

* feat: allow raw response

* chore: bump package

* fix: buffer response instead

* Update components/google_drive/actions/download-file/download-file.mjs

Co-authored-by: Jorge Cortes <jacortesmahmud@gmail.com>

* versions

* pnpm-lock.yaml

* pnpm-lock.yaml

* pnpm-lock.yaml

* feat: add content selector

* chore: bump package

* fix: comments

* chore: bump versions

* chore: fix versions

* fixes: QA fixes

* feat: add cursor to req

* package.json

---------

Co-authored-by: joao <joao@coform.com>
Co-authored-by: joaocoform <joao@usecoform.com>
Co-authored-by: Jorge Cortes <jacortesmahmud@gmail.com>
Co-authored-by: Michelle Bergeron <michelle.bergeron@gmail.com>
Co-authored-by: Luan Cazarine <luanhc@gmail.com>

* Merging pull request #18361

* update siteId prop

* pnpm-lock.yaml

* package.json version

* Google Sheets - update row refresh fields  (#18369)

* change prop order and refresh fields

* bump package.json

* Pipedrive - fix app name (#18370)

* use pipedriveApp instead of app

* bump package.json

* Pipedrive - pipelineId integer (#18372)

* pipelineId - integer

* bump versions

* Adding app scaffolding for lightspeed_ecom_c_series

* Adding app scaffolding for financial_data

* Adding app scaffolding for microsoft_authenticator

* Merging pull request #18345

* updates

* versions

* versions

* Merging pull request #18368

* updates

* remove console.log

* versions

* Coinbase Developer Platform - New Wallet Event (#18342)

* new component

* pnpm-lock.yaml

* updates

* updates

* Hubspot - update search-crm (#18360)

* update search-crm

* limit results to one page

* update version

* package.json version

* Merging pull request #18347

* widget props

* fix version

* Adding app scaffolding for rundeck

* Merging pull request #18378

* Update Taiga component with new actions and sources

- Bump version to 0.1.0 in package.json and add dependency on @pipedream/platform.
- Introduce new actions for creating, updating, and deleting issues, tasks, and user stories.
- Add sources for tracking changes and deletions of issues and tasks.
- Implement utility functions for parsing and cleaning objects in common/utils.mjs.
- Enhance prop definitions for better integration with Taiga API.

* pnpm update

* Refactor Taiga actions to utilize parseObject utility

- Added parseObject utility for tags, watchers, and points in update-issue, update-task, and update-userstory actions.
- Removed the update-project action as it is no longer needed.
- Enhanced base source to include secret key validation for webhook security.

* Merging pull request #18382

* add testSources prop

* pnpm-lock.yaml

* fix

* Merging pull request #18323

* Added actions

* Added actions

* Added actions

* Merging pull request #18377

* Added actions

* Update components/weaviate/actions/create-class/create-class.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Luan Cazarine <luanhc@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Merging pull request #18376

* Adding app scaffolding for etrusted

* Adding app scaffolding for intelliflo_office

* Adding app scaffolding for thoughtspot

* Adding app scaffolding for kordiam

* Adding app scaffolding for ticketsauce

* trustpilot fixes (#18152)

* trustpilot fixes

* more fixes

* update versions

* more version updates

* fixes

* Bump all Trustpilot actions to version 0.1.0

Major improvements and API updates across all actions:
- Enhanced private API support with proper authentication
- Improved parameter handling and validation
- Better error handling and response structures
- Added new conversation flow for product reviews
- Fixed endpoint URLs to match latest API documentation
- Streamlined request/response processing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* up version and clean up sources

* merge

* fix business ID

* delete temp action

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-service-reviews/new-service-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* comments

* Pagination

* fixes

* comments

* missed some `$`'s

* unduplicated

* more fixes

* final comments

* more comments

* .

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Adding app scaffolding for peekalink

* 18314 twilio (#18350)

* Update Twilio component versions and dependencies

- Update Twilio Send Message action adding detailed description for 'from' prop and refactoring phone number validation logic.
- Incremented action versions for several Twilio actions.

* pnpm update

* Updating LinkedIn API version (#18399)

* Merging pull request #18394

* Databricks API - Jobs action components (#18371)

* Notion property building improvements (#18381)

* validate property types

* versions

* Google Business - add debug log (#18407)

* add debug log

* bump versions

* Notion API Key - update @pipedream/notion version (#18409)

* update @pipedream/notion dependency version

* pnpm-lock.yaml

* Adding app scaffolding for reduct_video

* Adding app scaffolding for shopware

* Adding app scaffolding for instamojo

* Hubspot - bug fix to sources w/ property changes (#18379)

* updates

* versions

* Google sheets type fix (#18411)

* Fixing worksheetId prop type from string to integer

* Version bumps

---------

Co-authored-by: Leo Vu <vunguyenhung@outlook.com>

* Merging pull request #18393

* new components

* remove console.log

* versions

* update

* Merging pull request #18408

* 403 error message

* versions

* update

* Merging pull request #18419

* Changes per PR Review

* Removes leonardo_ai_actions.mdc not indented for merging

* synced lockfile after install

* fully lock form-data for leonardo_ai

* conflict solving

* lint fixes

* Chipped down Readme, implemented async options in gen motion

---------

Co-authored-by: jocarino <45713006+jocarino@users.noreply.github.com>
Co-authored-by: joao <joao@coform.com>
Co-authored-by: joaocoform <joao@usecoform.com>
Co-authored-by: Jorge Cortes <jacortesmahmud@gmail.com>
Co-authored-by: Michelle Bergeron <michelle.bergeron@gmail.com>
Co-authored-by: Luan Cazarine <luanhc@gmail.com>
Co-authored-by: michelle0927 <michelle0927@users.noreply.github.com>
Co-authored-by: Andrew Chuang <andrewjschuang@gmail.com>
Co-authored-by: danhsiung <35384182+danhsiung@users.noreply.github.com>
Co-authored-by: Lucas Caresia <lucascarezia@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Job <9075380+Afstkla@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Guilherme Falcão <48412907+GTFalcao@users.noreply.github.com>
Co-authored-by: Leo Vu <vunguyenhung@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TRIGGER] Coinbase / x402
2 participants