Skip to content

Conversation

@tomiiide
Copy link
Contributor

Which Jira task is linked to this PR?

https://lifi.atlassian.net/browse/LF-13181
Related to lifinance/sdk#327

Why was it implemented this way?

Explain the reasoning behind the implementation. Were there alternative approaches? Why was this solution chosen?

Since SDKSolanaProvider only deals with Transaction types from @solana/kit, the widget still uses web3.js, we have convert the transaction types.

Visual showcase (Screenshots or Videos)

If applicable, attach screenshots, GIFs, or videos to showcase the functionality, UI changes, or bug fixes.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the Widget API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

@tomiiide tomiiide self-assigned this Nov 19, 2025
@tomiiide tomiiide marked this pull request as ready for review November 19, 2025 17:01
@tomiiide tomiiide requested a review from effie-ms November 21, 2025 11:18
Base automatically changed from feat-sdk-config-modules to main November 26, 2025 17:15
@chybisov chybisov added the v4 label Dec 16, 2025
@tomiiide tomiiide force-pushed the LF-13181-chore-upgrade-solana-provider branch 2 times, most recently from 79c22a0 to 25196a1 Compare December 23, 2025 09:25
@tomiiide tomiiide force-pushed the LF-13181-chore-upgrade-solana-provider branch from 52703bf to 5b0f257 Compare January 14, 2026 13:39
tomiiide referenced this pull request in lifinance/sdk Jan 14, 2026
skipReady,
}: {
client?: Client
client?: any
Copy link
Contributor Author

@tomiiide tomiiide Jan 14, 2026

Choose a reason for hiding this comment

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

This expects a viem Client type that was previously re-exported from the sdk.

This re-export was removed from the sdk here

Now, there are three solutions:

  1. Keep the re-export (simple and easy but feels dirty)
  2. Add viem as a dependency to widget-provider (cleaner but increases bundle size for just one type)
  3. Re-architect the widget such that contexts and types are defined in their respective ecosystem provider (Ideal but requires more work)

Leaning towards 3, but I would need to think deeply about the 2nd order effects.
SuiContext should be in sui-provider and be imported by wallet-provider however, we don't want wallet-provider to depend on any of the ecosystem provider.

So how would wallet-provider be aware of other ecosystem contexts without defining and import it ?

I have an idea of wallet-provider having a sdkProvidersStore that other ecosystem providers can import and then register/unregister.

@chybisov @effie-ms Let me know your thoughts on this.

Copy link
Member

Choose a reason for hiding this comment

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

Why did we drift from our usual naming convention for this one?

import { type PropsWithChildren, useContext } from 'react'
import { SolanaBaseProvider } from './SolanaBaseProvider'
import type { PropsWithChildren } from 'react'
import { useSolanaWalletStandard } from '../wallet-standard/useSolanaWalletStandard'
Copy link
Member

Choose a reason for hiding this comment

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

We should use .js extensions on file imports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants