Skip to content

chore(widget-solana-provider): update solana provider to match latest interface#600

Merged
chybisov merged 15 commits intomainfrom
LF-13181-chore-upgrade-solana-provider
Jan 26, 2026
Merged

chore(widget-solana-provider): update solana provider to match latest interface#600
chybisov merged 15 commits intomainfrom
LF-13181-chore-upgrade-solana-provider

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
@tomiiide tomiiide requested a review from chybisov January 21, 2026 12:40
@github-actions
Copy link

Hey! This is your new endpoint: https://bc4709bc.widget-lf13181cho.pages.dev

Comment on lines 87 to 93
try {
await select(walletName)
if (accountAddress) {
onSuccess?.(accountAddress, ChainId.SOL)
}
} catch (error) {
console.error('Failed to connect wallet:', error)
Copy link
Member

Choose a reason for hiding this comment

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

Did a bit more testing and analysis on this PR, found some issues.

There is a race condition here: after await select(walletName) completes, accountAddress in the closure is stale, it reflects the value before the connection. The onSuccess callback receives null or the old address instead of the newly connected address.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch.

  1. I've renamed the select function to connect to be more accurate.
  2. I've updated the function to return directly the address after connection.

)

if (targetWallet && !state.connected) {
state.select(persistedWalletName, {
Copy link
Member

Choose a reason for hiding this comment

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

The select() call returns a Promise, but it's not awaited, so if a silent connect fails, the promise rejection goes unhandled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch here, it's now awaited.

@github-actions
Copy link

Hey! This is your new endpoint: https://0842067a.widget-lf13181cho.pages.dev

@tomiiide tomiiide requested a review from chybisov January 26, 2026 17:38
@chybisov chybisov merged commit a99c3c3 into main Jan 26, 2026
1 check passed
@chybisov chybisov deleted the LF-13181-chore-upgrade-solana-provider branch January 26, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants