feat: introduce jumper solana provider#2805
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds Solana proxy token balance querying: new backend DTOs and v1 endpoint, getProxyTokenBalances client helper, JumperSolanaProvider wrapper that partitions and fetches proxy balances, centralized makeProviders() SDK factory, wallet provider wiring, minor import reorderings, and pinned ChangesSolana Proxy Token Balance Support
Sequence Diagram(s)sequenceDiagram
participant UI as Wallet Consumer
participant Jumper as JumperSolanaProvider
participant Classify as isProxyToken
participant LiFi as SolanaProvider
participant API as getProxyTokenBalances
participant Backend as Jumper Backend
UI->>Jumper: getBalance(address, tokens)
Jumper->>Classify: split tokens by "proxy:" prefix
Classify-->>Jumper: regularTokens, proxyTokens
par Parallel Fetch
Jumper->>LiFi: getBalance(regularTokens)
Jumper->>API: portfolioControllerGetProxyTokenBalancesV1(proxyTokens)
API->>Backend: POST /v1/portfolio/query/proxy-tokens
Backend-->>API: ProxyTokenBalances
and
end
LiFi-->>Jumper: TokenAmount[] (regular)
API-->>Jumper: TokenAmount[] (proxy with synthetic blockNumber)
Jumper-->>UI: merged TokenAmount[]
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
✅ All snapshot tests passed |
Playwright test resultsDetails
Failed testschromium › connectWallet.spec.ts › Connect/disconnect Metamask with Jumper app and open /profile page › Connect Metamask wallet to Jumper (Qase ID: 36) Flaky testschromium › earnPage.spec.ts › Chains filters on Earn page › Should be able to filter by ethereum chain (Qase ID: 43) |
a3f4446 to
c328163
Compare
c328163 to
dc53329
Compare
dc53329 to
39a759f
Compare
3945697 to
0a9da11
Compare
There was a problem hiding this comment.
Pull request overview
Introduces a custom Solana SDK provider to support “proxy:” tokens (balances derived from DeFi positions) so the Jumper UI/LiFi widget can correctly display and withdraw positions in Earn flows.
Changes:
- Added
JumperSolanaProviderthat overrides SolanagetBalanceto fetch proxy-token balances via the Jumper backend. - Wired the custom Solana provider into both the app’s LiFi SDK client config and the widget’s Solana provider.
- Added backend client typings + a small client helper for
POST /v1/portfolio/tokens(proxy token balances).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/instrumentation/lifiSdkConfig.ts | Switches Solana provider to JumperSolanaProvider and centralizes SDK providers via makeProviders(). |
| src/utils/instrumentation/JumperSolanaProvider.ts | New provider wrapper that partitions proxy vs regular tokens and fetches proxy balances from backend. |
| src/types/jumper-backend.ts | Adds DTO/response types and generated client method for POST /v1/portfolio/tokens. |
| src/app/lib/getProxyTokenBalances.ts | New helper calling the backend endpoint and returning typed proxy balances. |
| src/providers/WalletProvider/WalletProvider.tsx | Injects JumperSolanaProvider into the widget Solana provider via sdkProvider. |
| src/components/Widgets/variants/widgetConfig/useWidgetConfig.tsx | Cleans up imports (removes unused ChainType). |
| src/components/Widgets/variants/base/ZapWidget/ZapWithdrawWidget.tsx | Introduces a debug console.log (should be removed). |
| src/components/Widgets/variants/base/ZapWidget/ZapDepositBackendWidget.tsx | Introduces a debug console.log (should be removed). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }; | ||
| }, [widgetEvents, refetchWithdrawToken, setSupportModalState]); | ||
|
|
||
| console.log('jumper w3'); |
| }; | ||
| }, [widgetEvents, refetchDepositToken, setSupportModalState]); | ||
|
|
||
| console.log('jumper w2'); |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/Widgets/variants/widgetConfig/useWidgetConfig.tsx (1)
134-143:⚠️ Potential issue | 🟠 Major | ⚡ Quick winGate the fee contribution treatment on the intended variant.
This condition is looser than the other A/B checks in the hook: any truthy string enables the treatment, so a
"control"bucket would still renderFeeContributionand contaminate the experiment.Suggested fix
if ( type === 'main' && feeContributionABTest.isEnabled && - feeContributionABTest.value + (feeContributionABTest.value === 'test' || + feeContributionABTest.value === true) ) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/Widgets/variants/widgetConfig/useWidgetConfig.tsx` around lines 134 - 143, The current condition lets any truthy feeContributionABTest.value (e.g., "control") enable the treatment; update the guard so the FeeContribution component is only added when the experiment value matches the intended treatment variant (e.g., replace the truthy check with an explicit equality check like feeContributionABTest.value === 'treatment') while keeping the other checks (type === 'main' and feeContributionABTest.isEnabled) and assigning to baseConfig.feeConfig as before.
🧹 Nitpick comments (1)
src/types/jumper-backend.ts (1)
865-868: ⚡ Quick winGive the proxy-balance payload a concrete item type.
data: object[]removes compile-time checking on the new response shape and forces callers to cast it back later. That makes backend/frontend drift show up only at runtime in the balance merge path.Example shape to model in the generated contract
+export interface ProxyTokenBalanceItem { + chainId: number; + address: string; + symbol: string; + name: string; + decimals: number; + logoURI?: string; + priceUSD: string; + amount?: string; +} + export interface ProxyTokenBalances { meta: MetadataWithUpdatedAt; - data: object[]; + data: ProxyTokenBalanceItem[]; }Because this file is generated, the source OpenAPI schema should be updated as well so the type survives regeneration.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/types/jumper-backend.ts` around lines 865 - 868, The ProxyTokenBalances interface currently uses a loose data: object[] which removes compile-time guarantees; change ProxyTokenBalances to use a concrete item type (e.g., data: ProxyTokenBalanceItem[] or an appropriate named type) and define that item type with the exact fields expected by the proxy balance payload, then update the OpenAPI schema so the generator emits the concrete type (ensure the identifier ProxyTokenBalances and the new ProxyTokenBalanceItem type are added/updated in the contract schema to survive regeneration).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/utils/instrumentation/JumperSolanaProvider.ts`:
- Around line 38-44: The current mapping over responseTokens only returns tokens
echoed by the backend, dropping requested proxy tokens with zero balance; update
the logic in the JumperSolanaProvider balance conversion (the responseTokens.map
block that returns TokenAmount) to iterate over the original requested proxy
token list (e.g., proxyTokens or the argument that lists requested tokens) and
for each requested token find a matching entry in responseTokens, returning that
entry converted to TokenAmount or, if missing, a TokenAmount with amount: 0n and
the same blockNumber; ensure you preserve other token fields when present and
use BigInt(amount) when amount is provided.
---
Outside diff comments:
In `@src/components/Widgets/variants/widgetConfig/useWidgetConfig.tsx`:
- Around line 134-143: The current condition lets any truthy
feeContributionABTest.value (e.g., "control") enable the treatment; update the
guard so the FeeContribution component is only added when the experiment value
matches the intended treatment variant (e.g., replace the truthy check with an
explicit equality check like feeContributionABTest.value === 'treatment') while
keeping the other checks (type === 'main' and feeContributionABTest.isEnabled)
and assigning to baseConfig.feeConfig as before.
---
Nitpick comments:
In `@src/types/jumper-backend.ts`:
- Around line 865-868: The ProxyTokenBalances interface currently uses a loose
data: object[] which removes compile-time guarantees; change ProxyTokenBalances
to use a concrete item type (e.g., data: ProxyTokenBalanceItem[] or an
appropriate named type) and define that item type with the exact fields expected
by the proxy balance payload, then update the OpenAPI schema so the generator
emits the concrete type (ensure the identifier ProxyTokenBalances and the new
ProxyTokenBalanceItem type are added/updated in the contract schema to survive
regeneration).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 21a4e173-655c-4627-9738-7fee4954d10e
📒 Files selected for processing (8)
src/app/lib/getProxyTokenBalances.tssrc/components/Widgets/variants/base/ZapWidget/ZapDepositBackendWidget.tsxsrc/components/Widgets/variants/base/ZapWidget/ZapWithdrawWidget.tsxsrc/components/Widgets/variants/widgetConfig/useWidgetConfig.tsxsrc/providers/WalletProvider/WalletProvider.tsxsrc/types/jumper-backend.tssrc/utils/instrumentation/JumperSolanaProvider.tssrc/utils/instrumentation/lifiSdkConfig.ts
0a9da11 to
982f858
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/utils/instrumentation/JumperSolanaProvider.ts (1)
38-44:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftReturn a balance entry for every requested proxy token.
This issue was raised in a previous review and remains unresolved. The current code only returns tokens echoed by the backend. If the backend omits zero-balance proxy tokens, they disappear from the result entirely, leaving the widget in a perpetual loading state for those tokens.
The catch block (line 46) handles API errors but doesn't address this scenario.
🔧 Proposed fix to ensure all requested tokens are returned
- return responseTokens.map( - ({ amount, ...token }): TokenAmount => ({ - ...token, - amount: amount != null ? BigInt(amount) : 0n, - blockNumber, - }), - ); + // Build a map of returned balances by address + const balancesByAddress = new Map( + responseTokens.map((token) => [token.address, token]), + ); + + // Return a balance for each requested token + return tokens.map((requestedToken): TokenAmount => { + const responseToken = balancesByAddress.get(requestedToken.address); + return { + ...requestedToken, + ...responseToken, + amount: responseToken?.amount != null ? BigInt(responseToken.amount) : 0n, + blockNumber, + }; + });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/utils/instrumentation/JumperSolanaProvider.ts` around lines 38 - 44, The response currently maps only responseTokens to TokenAmount, so any requested proxy token omitted by the backend disappears; after building the mapped list (using responseTokens and blockNumber) create a lookup of returned mints and then iterate the original requested proxy token list (the function's input list of tokens, e.g., proxyTokens/requestedTokens) and append a TokenAmount for any missing mint with amount: 0n and the same blockNumber; ensure this logic runs both in the success path (where responseTokens is processed) and in the catch/fallback path so every requested proxy token is always present in the final returned array.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/utils/instrumentation/lifiSdkConfig.ts`:
- Line 41: The file currently imports and calls createClient from `@lifi/sdk` but
in v4.0.1-alpha.0 you must import createConfig and call createConfig with the
configuration object (apiKey, apiUrl, providers, integrator, rpcUrls,
preloadChains). Replace the import of createClient with createConfig and change
the function invocation from createClient(...) to createConfig(...), ensuring
the providers value produced by makeProviders() is included in that createConfig
call along with the other config fields.
---
Duplicate comments:
In `@src/utils/instrumentation/JumperSolanaProvider.ts`:
- Around line 38-44: The response currently maps only responseTokens to
TokenAmount, so any requested proxy token omitted by the backend disappears;
after building the mapped list (using responseTokens and blockNumber) create a
lookup of returned mints and then iterate the original requested proxy token
list (the function's input list of tokens, e.g., proxyTokens/requestedTokens)
and append a TokenAmount for any missing mint with amount: 0n and the same
blockNumber; ensure this logic runs both in the success path (where
responseTokens is processed) and in the catch/fallback path so every requested
proxy token is always present in the final returned array.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 326309ba-69f9-40d4-842f-3cd91e07bfd8
📒 Files selected for processing (7)
src/app/lib/getProxyTokenBalances.tssrc/components/Widgets/variants/base/ZapWidget/ZapWithdrawWidget.tsxsrc/components/Widgets/variants/widgetConfig/useWidgetConfig.tsxsrc/providers/WalletProvider/WalletProvider.tsxsrc/types/jumper-backend.tssrc/utils/instrumentation/JumperSolanaProvider.tssrc/utils/instrumentation/lifiSdkConfig.ts
💤 Files with no reviewable changes (1)
- src/components/Widgets/variants/base/ZapWidget/ZapWithdrawWidget.tsx
✅ Files skipped from review due to trivial changes (1)
- src/components/Widgets/variants/widgetConfig/useWidgetConfig.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/app/lib/getProxyTokenBalances.ts
| _client = createClient({ | ||
| apiKey: config.NEXT_PUBLIC_LIFI_API_KEY, | ||
| apiUrl: getApiUrl(), | ||
| providers: makeProviders(), |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check the SDKConfig type definition
# Search for SDKConfig type definition
rg -nP "type SDKConfig|interface SDKConfig" node_modules/@lifi/sdk/ -A20 || echo "Type not found in node_modules"
# Check if there's a setProviders method
rg -nP "setProviders" node_modules/@lifi/sdk/ -C3
# Look for examples of provider configuration in the SDK
rg -nP "providers:" node_modules/@lifi/sdk/ -C2Repository: jumperexchange/jumper-exchange
Length of output: 315
🌐 Web query:
What is the correct way to configure providers with createClient in @lifi/sdk version 4.0.1-alpha.0?
💡 Result:
In @lifi/sdk v4.0.1-alpha.0, you configure ecosystem “providers” by passing a providers array into createConfig (not by calling createClient with providers directly). Each provider is created by the ecosystem-specific provider factory (for example, EVM({... })) and receives wallet/RPC switching hooks. Example (EVM provider): import { createConfig, EVM } from "@lifi/sdk"; createConfig({ integrator: "Your dApp/company name", providers: [ EVM({ getWalletClient: async => client, switchChain: async (chainId) => // Switch chain by creating a new wallet client createWalletClient({ account, chain: chains.find((chain) => chain.id == chainId) as Chain, transport: http, }), }), ], }); Providers are optional; they’re only necessary if you want to execute quotes/routes through the SDK. If you only call the LI.FI API and handle execution yourself, you can omit providers. You can also update provider configuration later via config.setProviders(...).
Citations:
- 1: https://docs.li.fi/sdk/configure-sdk
- 2: https://docs.li.fi/sdk/configure-sdk-providers
- 3: https://docs.li.fi/sdk/installing-the-sdk
- 4: https://cdn.jsdelivr.net/npm/@lifi/sdk@3.7.10/README.md
- 5: https://docs.li.fi/sdk/overview
🏁 Script executed:
cat -n src/utils/instrumentation/lifiSdkConfig.tsRepository: jumperexchange/jumper-exchange
Length of output: 2761
🏁 Script executed:
rg -n "createConfig" src/ --type ts --type tsxRepository: jumperexchange/jumper-exchange
Length of output: 102
🏁 Script executed:
rg -n "createConfig" src/Repository: jumperexchange/jumper-exchange
Length of output: 56
🌐 Web query:
@lifi/sdk createConfig function API documentation v4.0.1-alpha
💡 Result:
In LI.FI’s SDK, createConfig is the function you call to initialize the global SDK configuration. Example (from LI.FI docs): import { createConfig } from "@lifi/sdk"; createConfig({ integrator: "Your dApp/company name", }); After calling createConfig, the docs state that config acts as a global configuration object, and you can update it via config.set(...) (the “Update SDK configuration” section explains get/set). [1] createConfig API / options (SDKConfig fields documented on Configure SDK page): - integrator (required): used to identify partners; format restrictions and max length are documented. [1] - apiKey (optional): unique API key to access LI.FI API services (for higher rate limits). [1] - apiUrl (optional): base URL for LI.FI API requests; defaults to https://li.quest/v1. [1] - userId (optional): identifier for your app user. [1] - routeOptions (optional): routing custom options used by getQuote/getRoutes/getContractCallsQuote. [1] - rpcUrls (optional): mapping from chain IDs to RPC URL arrays. [1] - chains (optional): chains the SDK will support; fetched from LI.FI API during initialization if not provided. [1] - preloadChains (optional): whether to preload chain configurations (defaults to true). [1] - disableVersionCheck (optional): whether to disable SDK version checks (defaults to false). [2] - providers (optional): provider configurations used for executing quotes/routes; only required if you plan to execute routes through the SDK. [1] Notes about “v4.0.1-alpha” specifically: - I did not find a LI.FI docs page that explicitly names “v4.0.1-alpha” for createConfig. The authoritative, current documentation I found describes createConfig and its configuration options without tying them to that exact pre-release version. [1] Sources: LI.FI “Configure SDK” and related pages that show createConfig usage and list the configuration options. [1][3]
Citations:
- 1: https://docs.li.fi/sdk/configure-sdk
- 2: https://docs.li.fi/zh-Hans/sdk/configure-sdk
- 3: https://docs.li.fi/sdk/installing-the-sdk
Replace createClient with createConfig in this file.
In @lifi/sdk v4.0.1-alpha.0, the configuration with providers must be passed to createConfig(), not createClient(). The providers parameter belongs in the createConfig() call. Update the import on line 3 and the function call on line 38 accordingly. All configuration options you're passing (apiKey, apiUrl, providers, integrator, rpcUrls, preloadChains) are valid for createConfig().
🧰 Tools
🪛 GitHub Check: lint-changes
[failure] 41-41:
Object literal may only specify known properties, and 'providers' does not exist in type 'SDKConfig'.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/utils/instrumentation/lifiSdkConfig.ts` at line 41, The file currently
imports and calls createClient from `@lifi/sdk` but in v4.0.1-alpha.0 you must
import createConfig and call createConfig with the configuration object (apiKey,
apiUrl, providers, integrator, rpcUrls, preloadChains). Replace the import of
createClient with createConfig and change the function invocation from
createClient(...) to createConfig(...), ensuring the providers value produced by
makeProviders() is included in that createConfig call along with the other
config fields.
The widget reads chain providers through WalletManagementProviders (isExternalContext=true), not via WidgetConfig.sdkConfig.providers which was silently overridden at runtime and has now been removed from the type. Inject JumperSolanaProvider through the Solana widget-provider's new sdkProvider factory form so the widget supplies getWallet from its wallet-standard context rather than the removed setOptions mutation path. Also stamp a synthetic blockNumber (BigInt(Date.now())) on proxy token balances — the widget's getTokenBalancesWithRetry retries until every TokenAmount has a truthy blockNumber, causing infinite loading otherwise. Remove dead sdkConfig.providers injection in useWidgetConfig and debug console statements added during investigation. Co-authored-by: Cursor <cursoragent@cursor.com>
982f858 to
c71665b
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/utils/instrumentation/JumperSolanaProvider.ts (1)
38-44:⚠️ Potential issue | 🟠 Major | ⚡ Quick winReturn a balance row for every requested proxy token.
Line 38 currently maps only backend-echoed tokens. If the API omits zero-balance proxy tokens, requested tokens vanish from the result and can keep widget state incorrect. Iterate over requested
tokensand merge matched backend entries instead.Suggested fix
- return responseTokens.map( - ({ amount, ...token }): TokenAmount => ({ - ...token, - amount: amount != null ? BigInt(amount) : 0n, - blockNumber, - }), - ); + const responseByAddress = new Map( + responseTokens.map((token) => [token.address, token]), + ); + + return tokens.map((requestedToken): TokenAmount => { + const matched = responseByAddress.get(requestedToken.address); + const { amount, ...token } = matched ?? {}; + + return { + ...requestedToken, + ...token, + amount: amount != null ? BigInt(amount) : 0n, + blockNumber, + }; + });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/utils/instrumentation/JumperSolanaProvider.ts` around lines 38 - 44, The current mapping returns only backend-echoed responseTokens, dropping any requested proxy tokens omitted by the API; change the logic to iterate over the requested tokens array (tokens) and for each requested token find the matching entry in responseTokens (by the token's unique key such as mint/address/id), then produce a TokenAmount object that spreads the requested token properties, sets amount to BigInt(matched.amount) or 0n if no match, and includes blockNumber; update the mapping expression that currently uses responseTokens.map to use tokens.map and merge matched backend data from responseTokens into the returned TokenAmount objects.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@src/utils/instrumentation/JumperSolanaProvider.ts`:
- Around line 38-44: The current mapping returns only backend-echoed
responseTokens, dropping any requested proxy tokens omitted by the API; change
the logic to iterate over the requested tokens array (tokens) and for each
requested token find the matching entry in responseTokens (by the token's unique
key such as mint/address/id), then produce a TokenAmount object that spreads the
requested token properties, sets amount to BigInt(matched.amount) or 0n if no
match, and includes blockNumber; update the mapping expression that currently
uses responseTokens.map to use tokens.map and merge matched backend data from
responseTokens into the returned TokenAmount objects.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3c4a115c-c1e8-4672-bd3e-fa1cf2b098fe
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
package.jsonsrc/app/lib/getProxyTokenBalances.tssrc/components/Widgets/variants/base/ZapWidget/ZapWithdrawWidget.tsxsrc/components/Widgets/variants/widgetConfig/useWidgetConfig.tsxsrc/providers/WalletProvider/WalletProvider.tsxsrc/types/jumper-backend.tssrc/utils/instrumentation/JumperSolanaProvider.tssrc/utils/instrumentation/lifiSdkConfig.ts
💤 Files with no reviewable changes (1)
- src/components/Widgets/variants/base/ZapWidget/ZapWithdrawWidget.tsx
✅ Files skipped from review due to trivial changes (3)
- package.json
- src/components/Widgets/variants/widgetConfig/useWidgetConfig.tsx
- src/types/jumper-backend.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/providers/WalletProvider/WalletProvider.tsx
- src/app/lib/getProxyTokenBalances.ts
- src/utils/instrumentation/lifiSdkConfig.ts
mmioana
left a comment
There was a problem hiding this comment.
Nice and straight-forward 🥇
Which Jira task belongs to this PR?
Contributes to https://linear.app/lifi-linear/issue/JUM-779
We need to inject proxy amounts in earn to make the widget aware of our positions
Sister PR: https://github.com/jumperexchange/jumper-backend/pull/821
With this PR:
CPk2P7XVn6PHJxFbcCq6Lc864bF7Bz6S4oRW7GVmREt6with Phantom, if position amount is > 0, you should be able to withdrawWhy did I implement it this way?
It uses inversion of control to inject a custom jumper behavior
It makes proxy tokens first class citizen in the app
Checklist before requesting a review
Summary by CodeRabbit
New Features
Refactor