Fix web3proxy
This commit is contained in:
@@ -1106,11 +1106,14 @@ export const getWalletBalanceImpl = async (
|
||||
throw new Error(`User not found for wallet address: ${address}`);
|
||||
}
|
||||
|
||||
console.log('User:', user);
|
||||
|
||||
// Find the embedded wallet for this address
|
||||
const embeddedWallet = user.linked_accounts.find(
|
||||
(account: any) =>
|
||||
account.type === 'wallet' &&
|
||||
account.chainType === 'ethereum' &&
|
||||
(account.chain_type === 'ethereum' || account.chainType === 'ethereum') &&
|
||||
(account.connector_type === 'embedded' || account.wallet_client_type === 'privy') &&
|
||||
account.address?.toLowerCase() === address.toLowerCase()
|
||||
);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {Ticker} from '../../src/generated/ManagingApiTypes.js'
|
||||
test('getWalletBalanceImpl should fetch wallet balance for valid address', async () => {
|
||||
const testWalletId = 'cm7vxs99f0007blcl8cmzv74t'
|
||||
// Note: Replace with actual wallet address associated with the wallet ID from Privy dashboard
|
||||
const testAddress = '0x932167388dD9aad41149b3cA23eBD489E2E2DD78'
|
||||
const testAddress = '0x75335492b9C96CFb48207643451c40bAb9422974'
|
||||
const assets = [Ticker.USDC, Ticker.ETH] // Required: array of assets using Ticker enum
|
||||
const chains = ['arbitrum', 'ethereum'] // Required: array of chains
|
||||
|
||||
|
||||
Reference in New Issue
Block a user