Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/remove-get-wallet-balances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lifi/sdk": minor
---

Remove the `getWalletBalances` action and client method — the underlying `/wallets/{address}/balances` API endpoint is deprecated. Use `getTokenBalances`/`getTokenBalancesByChain` to fetch balances directly from RPCs instead.
36 changes: 0 additions & 36 deletions packages/sdk/src/actions/getWalletBalances.ts

This file was deleted.

90 changes: 0 additions & 90 deletions packages/sdk/src/actions/getWalletBalances.unit.spec.ts

This file was deleted.

15 changes: 0 additions & 15 deletions packages/sdk/src/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import type {
ToolsResponse,
TransactionAnalyticsRequest,
TransactionAnalyticsResponse,
WalletTokenExtended,
} from '@lifi/types'
import type {
GetStatusRequestExtended,
Expand All @@ -55,7 +54,6 @@ import { getTokenBalancesByChain } from './getTokenBalancesByChain.js'
import { getTokens } from './getTokens.js'
import { getTools } from './getTools.js'
import { getTransactionHistory } from './getTransactionHistory.js'
import { getWalletBalances } from './getWalletBalances.js'
import {
type PatchContractCallsResponse,
patchContractCalls,
Expand Down Expand Up @@ -274,17 +272,6 @@ export type Actions = {
options?: RequestOptions
) => Promise<TransactionAnalyticsResponse>

/**
* Get wallet balances
* @param params - The configuration of the requested wallet balances
* @param options - Request options
* @returns Wallet balances
*/
getWalletBalances: (
walletAddress: string,
options?: RequestOptions
) => Promise<Record<number, WalletTokenExtended[]>>

/**
* Relay a transaction through the relayer service
* @param params - The configuration for the relay request
Expand Down Expand Up @@ -340,8 +327,6 @@ export function actions(client: SDKClient): Actions {
getTokenBalancesByChain(client, walletAddress, tokensByChain),
getTransactionHistory: (params, options) =>
getTransactionHistory(client, params, options),
getWalletBalances: (walletAddress, options) =>
getWalletBalances(client, walletAddress, options),
relayTransaction: (params, options) =>
relayTransaction(client, params, options),
patchContractCalls: (params, options) =>
Expand Down
1 change: 0 additions & 1 deletion packages/sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export { getTokenBalancesByChain } from './actions/getTokenBalancesByChain.js'
export { getTokens } from './actions/getTokens.js'
export { getTools } from './actions/getTools.js'
export { getTransactionHistory } from './actions/getTransactionHistory.js'
export { getWalletBalances } from './actions/getWalletBalances.js'
export { actions } from './actions/index.js'
export { patchContractCalls } from './actions/patchContractCalls.js'
export { relayTransaction } from './actions/relayTransaction.js'
Expand Down