-
Notifications
You must be signed in to change notification settings - Fork 2
demo_web: activate Solana (Ed25519) SDK and widgets #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Uncomment @oko-wallet/oko-sdk-sol import and types - Add oko_sol state to SDKState interface - Implement initOkoSol() function with proper error handling - Add initOkoSol call in useInitOko hook - Add oko_sol to isInitialized check Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add solanaAddress state and fetch logic in useAddresses hook - Add "solana" chain type to AddressRowProps - Refactor AddressRow to use chainConfig for label/prefix mapping - Add Solana row with SolanaIcon in AddressWidget Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Uncomment SolanaOffchainSignWidget implementation - Uncomment SolanaOnchainSignWidget with Legacy/V0 transaction support - Add isSolLazyInitialized to isLazyInitialized check in PreviewPanel - Import and render Solana sign widgets in PreviewPanel Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
@eldenpark Ready for review |
apps/demo_web/src/hooks/wallet.ts
Outdated
| promises.push( | ||
| (async () => { | ||
| try { | ||
| // lazyInit에서 이미 connected=true일 수 있음 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no Korean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no Korean
Removed
apps/demo_web/src/hooks/wallet.ts
Outdated
| } catch (err) { | ||
| console.error("Failed to get Solana address:", err); | ||
| } | ||
| })(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why immediately invoked fn expression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why immediately invoked fn expression?
Probably because solana requires connect() before accessing publicKey. Refactored to Promise chaining for consistency. cc. @chemonoworld
eldenpark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left comments
Summary
Changes
1. Sol SDK Initialization (
sdk.ts,use_oko.ts)@oko-wallet/oko-sdk-solimport and typesoko_solstate to SDKState interfaceinitOkoSol()functioninitOkoSolcall inuseInitOkohook2. Address Widget (
wallet.ts,address_row.tsx,address_widget.tsx)solanaAddressstate and fetch logic inuseAddresseshookchainConfigrefactoringSolanaIcon3. Solana Sign Widgets (
preview_panel.tsx,solana_*_sign_widget.tsx)SolanaOffchainSignWidget(Ed25519 message signing)SolanaOnchainSignWidget(Legacy/V0 transaction signing)isSolLazyInitializedcheck and widget renderingTest plan
🤖 Generated with Claude Code