Skip to content

chore: upgrade near-connect to 0.11.1#974

Merged
jobotics merged 3 commits intomainfrom
chore/bump-near-connect
Mar 11, 2026
Merged

chore: upgrade near-connect to 0.11.1#974
jobotics merged 3 commits intomainfrom
chore/bump-near-connect

Conversation

@jobotics
Copy link
Copy Markdown
Collaborator

@jobotics jobotics commented Mar 9, 2026

No description provided.

@jobotics jobotics requested a review from silent-shipper March 9, 2026 10:55
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 9, 2026

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

Project Deployment Actions Updated (UTC)
defuse-widget Ready Ready Preview, Comment Mar 11, 2026 11:32pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 9, 2026

Walkthrough

Bumps @hot-labs/near-connect from 0.6.8 to 0.11.1; adds two FastNear mainnet RPC origins to CSP connect-src; removes whitelabel-based walletConnect initialization and re-exports SignAndSendTransactionsParams from the updated near-connect package.

Changes

Cohort / File(s) Summary
Dependency
package.json
Bumped @hot-labs/near-connect from 0.6.8 to 0.11.1.
CSP Configuration
src/config/csp.ts
Added https://rpc.mainnet.fastnear.com and https://api.mainnet.fastnear.com to connect-src with comments indicating their uses.
NEAR Wallet Provider
src/providers/NearWalletProvider.tsx
Removed FeatureFlagsContext usage and domain-metadata/whitelabel-based walletConnect initialization; simplified effect dependency array and initialization path.
Type exports
src/types/interfaces.ts
Removed local SignAndSendTransactionsParams interface and re-exported the type from @hot-labs/near-connect/build/types.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • defuse-es
  • depressedPlumber502
  • silent-shipper

Poem

🐰 I hopped through package.json with care,
re-exported types and added endpoints fair.
No whitelabel bells to bind my feet,
FastNear hops in — connection neat.
Cheerful rabbit, code complete! 🥕🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a brief description explaining the purpose of the upgrade, any breaking changes, or migration notes if applicable.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: upgrading the @hot-labs/near-connect dependency from 0.6.8 to 0.11.1, which is the primary modification across the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/bump-near-connect

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.

@supabase
Copy link
Copy Markdown

supabase Bot commented Mar 9, 2026

Updates to Preview Branch (chore/bump-near-connect) ↗︎

Deployments Status Updated
Database Wed, 11 Mar 2026 23:32:29 UTC
Services Wed, 11 Mar 2026 23:32:29 UTC
APIs Wed, 11 Mar 2026 23:32:29 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Wed, 11 Mar 2026 23:32:30 UTC
Migrations Wed, 11 Mar 2026 23:32:30 UTC
Seeding Wed, 11 Mar 2026 23:32:31 UTC
Edge Functions Wed, 11 Mar 2026 23:32:31 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

Copy link
Copy Markdown

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/providers/NearWalletProvider.tsx (1)

44-58: ⚠️ Potential issue | 🟠 Major

Wire whitelabel metadata to NearConnector—all branded domains currently default to generic identity.

getDomainMetadataParams() in src/utils/whitelabelDomainMetadata.ts builds per-domain wallet branding (Solswap, TurboSwap, DogecoinSwap, TrumpSwap, OmniSwap), but NearConnector is initialized with only { network: "mainnet" }. The @hot-labs/near-connect@0.11.1 package supports constructor-level walletConnect.projectId and walletConnect.metadata—omitting them causes all whitelabel hosts to present the default "NEAR Intents" identity to wallets instead of their active brand. Pass the metadata from getDomainMetadataParams() to the connector constructor.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/providers/NearWalletProvider.tsx` around lines 44 - 58, The NearConnector
is being created without whitelabel metadata, so branded domains fall back to a
generic identity; inside the init function where NearConnector is instantiated,
call getDomainMetadataParams() to obtain the domain-specific metadata and pass
it into the NearConnector constructor via the walletConnect options (e.g.
walletConnect.metadata and walletConnect.projectId) instead of only { network:
"mainnet" } so that NearConnector uses the per-domain branding; update the
instantiation of NearConnector accordingly (the symbols to change are init,
NearConnector, and getDomainMetadataParams).
🧹 Nitpick comments (1)
src/types/interfaces.ts (1)

11-11: Avoid exporting a dependency’s build/* path from our shared types.

This makes src/types/interfaces.ts depend on @hot-labs/near-connect’s internal file layout rather than its public entrypoint. If the package repacks its declarations, our type surface breaks without any real API change. Please verify whether 0.11.1 exports SignAndSendTransactionsParams from @hot-labs/near-connect; if not, I’d rather keep a small app-owned alias here than re-export build/types. The package docs/examples point consumers at the top-level package and note bundled TypeScript declarations, which makes the deep import look unsupported. (npmjs.com)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/types/interfaces.ts` at line 11, The file exports
SignAndSendTransactionsParams from a deep internal path which couples our types
to `@hot-labs/near-connect`’s build layout; replace this deep re-export in
src/types/interfaces.ts by first checking whether the top-level package
(v0.11.1) publicly exports SignAndSendTransactionsParams and, if so, change the
export to `export type { SignAndSendTransactionsParams } from
"@hot-labs/near-connect"`; if it does not, remove the deep import and define a
small local alias/type in our repo matching the expected shape (copy the type
signature into a local SignAndSendTransactionsParams type) so callers still use
the same symbol without relying on build/* paths.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/providers/NearWalletProvider.tsx`:
- Around line 44-58: The NearConnector is being created without whitelabel
metadata, so branded domains fall back to a generic identity; inside the init
function where NearConnector is instantiated, call getDomainMetadataParams() to
obtain the domain-specific metadata and pass it into the NearConnector
constructor via the walletConnect options (e.g. walletConnect.metadata and
walletConnect.projectId) instead of only { network: "mainnet" } so that
NearConnector uses the per-domain branding; update the instantiation of
NearConnector accordingly (the symbols to change are init, NearConnector, and
getDomainMetadataParams).

---

Nitpick comments:
In `@src/types/interfaces.ts`:
- Line 11: The file exports SignAndSendTransactionsParams from a deep internal
path which couples our types to `@hot-labs/near-connect`’s build layout; replace
this deep re-export in src/types/interfaces.ts by first checking whether the
top-level package (v0.11.1) publicly exports SignAndSendTransactionsParams and,
if so, change the export to `export type { SignAndSendTransactionsParams } from
"@hot-labs/near-connect"`; if it does not, remove the deep import and define a
small local alias/type in our repo matching the expected shape (copy the type
signature into a local SignAndSendTransactionsParams type) so callers still use
the same symbol without relying on build/* paths.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 06623225-9938-4f28-a811-e9522b047857

📥 Commits

Reviewing files that changed from the base of the PR and between 3ae9c5e and 0e48337.

📒 Files selected for processing (2)
  • src/providers/NearWalletProvider.tsx
  • src/types/interfaces.ts

@jobotics jobotics merged commit cc6d1b4 into main Mar 11, 2026
8 checks passed
@jobotics jobotics deleted the chore/bump-near-connect branch March 11, 2026 23:43
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.

1 participant