Skip to content

Commit

Permalink
fix: balance endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Nov 27, 2023
1 parent 81a55c6 commit ffc3f99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.3.0 (x/12/2023)

- Release the V3 vaults
- Release the multichain config
- Fix the zap balances fetching to use the multichain endpoint rather than the currently connected one

# 0.1.25 (28/08/2023)

- Gauge voting for veYFI under the `gauge-voting` feature flag
Expand Down
6 changes: 2 additions & 4 deletions apps/vaults/contexts/useWalletForZaps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {createContext, memo, useCallback, useContext, useMemo, useState} from 'r
import {useDeepCompareEffect} from '@react-hookz/web';
import {useUI} from '@yearn-finance/web-lib/contexts/useUI';
import {useWeb3} from '@yearn-finance/web-lib/contexts/useWeb3';
import {useChainID} from '@yearn-finance/web-lib/hooks/useChainID';
import {isZeroAddress, toAddress, zeroAddress} from '@yearn-finance/web-lib/utils/address';
import {type TNormalizedBN, toNormalizedBN} from '@yearn-finance/web-lib/utils/format.bigNumber';
import {useWallet} from '@common/contexts/useWallet';
Expand Down Expand Up @@ -58,16 +57,15 @@ export const WalletForZapAppContextApp = memo(function WalletForZapAppContextApp
}): ReactElement {
const {address} = useWeb3();
const {refresh} = useWallet();
const {safeChainID} = useChainID();
const {yDaemonBaseUri} = useYDaemonBaseURI({chainID: safeChainID});
const {yDaemonBaseUri: yDaemonBaseUriWithoutChain} = useYDaemonBaseURI();
const {onLoadStart, onLoadDone} = useUI();
const [zapTokens, set_zapTokens] = useState<TChainTokens>({});

/* 🔵 - Yearn Finance ******************************************************
** Fetching, for this user, the list of tokens available for zaps
***************************************************************************/
const {data: tokensList} = useFetch<TYDaemonTokenListBalances>({
endpoint: address ? `${yDaemonBaseUri}/tokenlistbalances/${address}` : null,
endpoint: address ? `${yDaemonBaseUriWithoutChain}/balances/${address}` : null,
schema: yDaemonTokenListBalances
});

Expand Down

0 comments on commit ffc3f99

Please sign in to comment.