Skip to content
Merged
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
4 changes: 2 additions & 2 deletions examples/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@0xsequence/connect": "workspace:*",
"@0xsequence/design-system": "2.1.11",
"@0xsequence/hooks": "workspace:*",
"@0xsequence/network": "^2.3.23",
"@0xsequence/waas": "^2.3.23",
"@0xsequence/network": "^2.3.36",
"@0xsequence/waas": "^2.3.36",
"@0xsequence/wallet-widget": "workspace:*",
"@radix-ui/react-select": "^2.2.5",
"@tailwindcss/postcss": "^4.1.4",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"@0xsequence/design-system": "2.1.11",
"@0xsequence/hooks": "workspace:*",
"@0xsequence/immutable-connector": "workspace:*",
"@0xsequence/network": "^2.3.23",
"@0xsequence/waas": "^2.3.23",
"@0xsequence/network": "^2.3.36",
"@0xsequence/waas": "^2.3.36",
"@0xsequence/wallet-widget": "workspace:*",
"@imtbl/config": "^2.2.0",
"@imtbl/sdk": "^2.2.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/checkout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@
},
"dependencies": {
"@0xsequence/design-system": "2.1.11",
"@0xsequence/marketplace": "^2.3.23",
"@0xsequence/marketplace": "^2.3.36",
"date-fns": "^4.1.0",
"fuse.js": "^7.1.0",
"motion": "^12.9.2",
"pako": "^2.1.0",
"qrcode.react": "^4.2.0"
},
"peerDependencies": {
"0xsequence": ">= 2.3.23",
"@0xsequence/api": ">=2.3.23",
"0xsequence": ">= 2.3.36",
"@0xsequence/api": ">=2.3.36",
"@0xsequence/connect": "workspace:*",
"@0xsequence/hooks": "workspace:*",
"@0xsequence/indexer": ">= 2.3.23",
"@0xsequence/metadata": ">= 2.3.23",
"@0xsequence/network": ">= 2.3.23",
"@0xsequence/waas": ">= 2.3.23",
"@0xsequence/indexer": ">= 2.3.36",
"@0xsequence/metadata": ">= 2.3.36",
"@0xsequence/network": ">= 2.3.36",
"@0xsequence/waas": ">= 2.3.36",
"@tanstack/react-query": ">= 5",
"ethers": ">= 6.13.0",
"react": ">= 17",
Expand Down
22 changes: 11 additions & 11 deletions packages/connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@0xsequence/api": ">=2.3.23",
"@0xsequence/auth": "^2.3.23",
"@0xsequence/core": "^2.3.23",
"@0xsequence/api": ">=2.3.36",
"@0xsequence/auth": "^2.3.36",
"@0xsequence/core": "^2.3.36",
"@0xsequence/design-system": "2.1.11",
"@0xsequence/ethauth": "^1.0.0",
"@0xsequence/indexer": "^2.3.23",
"@0xsequence/metadata": "^2.3.23",
"@0xsequence/network": "^2.3.23",
"@0xsequence/provider": "^2.3.23",
"@0xsequence/utils": "^2.3.23",
"@0xsequence/waas": "^2.3.23",
"@0xsequence/indexer": "^2.3.36",
"@0xsequence/metadata": "^2.3.36",
"@0xsequence/network": "^2.3.36",
"@0xsequence/provider": "^2.3.36",
"@0xsequence/utils": "^2.3.36",
"@0xsequence/waas": "^2.3.36",
"@tailwindcss/cli": "^4.1.11",
"clsx": "^2.1.1",
"fuse.js": "^7.1.0",
Expand All @@ -58,7 +58,7 @@
"uuid": "^10.0.0"
},
"peerDependencies": {
"0xsequence": ">= 2.3.23",
"0xsequence": ">= 2.3.36",
"@0xsequence/hooks": "workspace:*",
"@databeat/tracker": "^0.9.3",
"@react-oauth/google": "^0.11.1",
Expand All @@ -71,7 +71,7 @@
"wagmi": ">= 2.15.0"
},
"devDependencies": {
"0xsequence": "^2.3.23",
"0xsequence": "^2.3.36",
"@0xsequence/hooks": "workspace:*",
"@tanstack/react-query": "^5.74.11",
"@types/uuid": "^9.0.8",
Expand Down
11 changes: 7 additions & 4 deletions packages/connect/src/hooks/useWallets.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { SequenceAPIClient, type GetLinkedWalletsArgs, type LinkedWallet } from '@0xsequence/api'
import { SequenceAPIClient, type GetLinkedWalletsRequest, type LinkedWallet } from '@0xsequence/api'
import { useAPIClient } from '@0xsequence/hooks'
import { useCallback, useEffect, useRef, useState } from 'react'
import { useAccount, useConnect, useConnections, useDisconnect, type Connector, type UseConnectionsReturnType } from 'wagmi'
Expand All @@ -15,12 +15,12 @@ interface UseLinkedWalletsOptions {
}

// Create a stable storage key from args
const createStorageKey = (args: GetLinkedWalletsArgs): string =>
const createStorageKey = (args: GetLinkedWalletsRequest): string =>
`@0xsequence.linked_wallets-${args.parentWalletAddress}-${args.signatureChainId}`

const getLinkedWallets = async (
apiClient: SequenceAPIClient,
args: GetLinkedWalletsArgs,
args: GetLinkedWalletsRequest,
headers?: object,
signal?: AbortSignal
): Promise<Array<LinkedWallet>> => {
Expand Down Expand Up @@ -75,7 +75,10 @@ const notifyLinkedWalletsListeners = () => {
}, 0)
}

export const useLinkedWallets = (args: GetLinkedWalletsArgs, options: UseLinkedWalletsOptions = {}): UseLinkedWalletsResult => {
export const useLinkedWallets = (
args: GetLinkedWalletsRequest,
options: UseLinkedWalletsOptions = {}
): UseLinkedWalletsResult => {
const apiClient = useAPIClient()
const [data, setData] = useState<LinkedWallet[] | undefined>(undefined)
const [isLoading, setIsLoading] = useState(false)
Expand Down
16 changes: 8 additions & 8 deletions packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"@0xsequence/api": ">=2.3.23",
"@0xsequence/indexer": ">=2.3.23",
"@0xsequence/metadata": ">=2.3.23",
"@0xsequence/network": ">=2.3.23",
"@0xsequence/api": ">=2.3.36",
"@0xsequence/indexer": ">=2.3.36",
"@0xsequence/metadata": ">=2.3.36",
"@0xsequence/network": ">=2.3.36",
"@tanstack/react-query": ">= 5",
"react": ">= 17",
"react-dom": ">= 17",
"viem": ">= 2.28.0"
},
"devDependencies": {
"@0xsequence/api": "2.3.23",
"@0xsequence/indexer": "^2.3.23",
"@0xsequence/metadata": "^2.3.23",
"@0xsequence/network": "^2.3.23",
"@0xsequence/api": "^2.3.36",
"@0xsequence/indexer": "^2.3.36",
"@0xsequence/metadata": "^2.3.36",
"@0xsequence/network": "^2.3.36",
"@tanstack/react-query": "^5.74.11",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/hooks/src/hooks/Combination/useGetSwapQuote.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GetLifiSwapQuoteArgs } from '@0xsequence/api'
import type { GetLifiSwapQuoteRequest } from '@0xsequence/api'
import { useQuery } from '@tanstack/react-query'

import { QUERY_KEYS, time, ZERO_ADDRESS } from '../../constants.js'
Expand Down Expand Up @@ -88,7 +88,7 @@ import { useAPIClient } from '../API/useAPIClient.js'
* }
* ```
*/
export const useGetSwapQuote = (getSwapQuoteArgs: GetLifiSwapQuoteArgs, options?: HooksOptions) => {
export const useGetSwapQuote = (getSwapQuoteArgs: GetLifiSwapQuoteRequest, options?: HooksOptions) => {
const apiClient = useAPIClient()

return useQuery({
Expand Down
21 changes: 16 additions & 5 deletions packages/hooks/src/hooks/Combination/useGetSwapRoutes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SequenceAPIClient, type GetLifiSwapRoutesArgs, type LifiSwapRoute } from '@0xsequence/api'
import { GetLifiSwapRouteDirection, SequenceAPIClient, type LifiSwapRoute } from '@0xsequence/api'
import { useQuery } from '@tanstack/react-query'

import { QUERY_KEYS, time } from '../../constants.js'
Expand All @@ -20,15 +20,26 @@ export interface UseGetSwapRoutesArgs {
toTokenAmount: string
}

const getSwapRoutes = async (
apiClient: SequenceAPIClient,
args: GetLifiSwapRoutesArgs & { walletAddress: string }
): Promise<LifiSwapRoute[]> => {
interface GetSwapRoutesArgs {
chainId: number
walletAddress: string
toTokenAddress: string
toTokenAmount: string
}

const getSwapRoutes = async (apiClient: SequenceAPIClient, args: GetSwapRoutesArgs): Promise<LifiSwapRoute[]> => {
if (!args.chainId || !args.toTokenAddress) {
return []
}

const res = await apiClient.getLifiSwapRoutes({
params: {
direction: GetLifiSwapRouteDirection.to,
chainId: args.chainId,
walletAddress: args.walletAddress,
tokenAddress: args.toTokenAddress,
tokenAmount: args.toTokenAmount
},
chainId: args.chainId,
walletAddress: args.walletAddress,
toTokenAddress: args.toTokenAddress,
Expand Down
2 changes: 1 addition & 1 deletion packages/immutable-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"peerDependencies": {
"@0xsequence/connect": "workspace:*",
"0xsequence": ">= 2.3.23",
"0xsequence": ">= 2.3.36",
"@imtbl/config": ">=2.1.2",
"@imtbl/sdk": ">=2.1.2",
"ethers": "^6.13.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/wallet-widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
"qrcode.react": "^4.2.0"
},
"peerDependencies": {
"@0xsequence/api": ">=2.3.23",
"@0xsequence/api": ">=2.3.36",
"@0xsequence/checkout": "workspace:*",
"@0xsequence/connect": "workspace:*",
"@0xsequence/hooks": "workspace:*",
"@0xsequence/indexer": ">=2.3.23",
"@0xsequence/metadata": ">=2.3.23",
"@0xsequence/network": ">=2.3.23",
"@0xsequence/indexer": ">=2.3.36",
"@0xsequence/metadata": ">=2.3.36",
"@0xsequence/network": ">=2.3.36",
"@tanstack/react-query": ">= 5",
"ethers": ">= 6.13.0",
"react": ">= 17",
Expand Down
Loading