Merged
Conversation
- Add @unicitylabs/sphere-sdk (local link to ../sphere-sdk) - Remove IPFS dependencies (helia, @helia/ipns, @helia/json, @noble/ed25519) - Create src/sdk/ adapter layer with React hooks wrapping sphere-sdk: - SphereProvider: React Context for Sphere singleton lifecycle - Core hooks: useSphere, useWalletStatus, useIdentity, useNametag, useSphereEvents - Payment hooks: useTokens, useBalance, useAssets, useTransfer, useTransactionHistory - L1 hooks: useL1Balance, useL1Utxos, useL1Send, useL1Transactions - Communications hooks: useSendDM, usePaymentRequests - Query keys (SPHERE_KEYS) for TanStack Query integration - Format utilities This is Step 1-2 of the SDK integration. Next steps: - Step 3: Migrate components to use new hooks - Step 4: Delete legacy code (~56 files) - Step 5: Dependency cleanup - Step 6: Verification Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ce conditions Add real-time debounced nametag availability checking (500ms) across all nametag input flows: onboarding NametagScreen, AddressSelector new address modal, and RegisterNametagModal. Shows spinner/checkmark/alert indicators with colored borders as user types. Add resolveNametag() to SphereContext that uses transport.resolveNametagInfo() directly — works without a wallet by pre-connecting transport with dummy identity during onboarding. Work around SDK race condition where NostrTransportProvider.setIdentity() triggers an async reconnect that isn't awaited, causing "not connected" errors during nametag registration. Fix by disconnecting transport before Sphere.init/switchToAddress and manually reconnecting after. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… to use SDK Add CoinGecko API proxy and configure price provider in SphereProvider. Replace hardcoded fiat prices with live market data from SDK. Refactor useAssets to use sphere.payments.getAssets() and useBalance to support both per-coin and total portfolio queries. Re-export Asset type from sphere-sdk instead of maintaining a local interface.
…ork/sphere into feat/sdk-integration
…ork/sphere into feat/sdk-integration
… drag-and-drop Adds complete file import onboarding: file type detection, encrypted file password prompt, L1 address scanning with progress/abort, and deferred sphere context finalization to avoid premature re-renders during import. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…payment request rendering - Fix AssetRow memo comparison to include totalAmount, tokenCount, priceUsd, iconUrl so balances update immediately after transfers without tab switching - Change useTokens staleTime from Infinity to 30s for consistent cache behavior - Switch useSphereEvents from refetchQueries to invalidateQueries for reliable updates - Route legacy ApiService.fetchPrices through Vite proxy (/coingecko) with 5min cache - Increase CoinGecko cache TTL to 5min in both SDK provider and legacy ApiService - Fix TokenId display: use toJSON() instead of toString() to show clean hex - Fix payment request symbol: resolve via TokenRegistry instead of raw coinId hex - Fix payment request sender: fallback to truncated pubkey when nametag unavailable
fix: asset list reactivity, CoinGecko rate limits, token ID display
SDK now handles storage auto-connection internally in Sphere.clear(), matching the pattern already used by Sphere.exists(), Sphere.import(), and initializeProviders(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… wallet code Switch @unicitylabs/sphere-sdk from local file reference to npm v0.2.3. Remove legacy useWallet hook (~1300 lines) and AggregatedAsset/CryptoCurrency classes (~145 lines), replacing all consumers with SDK hooks (useIdentity, useAssets, useTransfer) and SDK types (Asset, toSmallestUnit, formatAmount).
…file Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ve-legacy Feat/sdk integration remove legacy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.