Skip to content

Commit

Permalink
Merge branch 'next' into feat/oeth-withdrawal
Browse files Browse the repository at this point in the history
  • Loading branch information
toniocodo committed Aug 2, 2024
2 parents cfafdf9 + 6c04717 commit 085c19b
Show file tree
Hide file tree
Showing 13 changed files with 160 additions and 129 deletions.
4 changes: 2 additions & 2 deletions libs/defi/oeth/src/bridge/hooks/useCcipTxParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export const useCcipTxParams = ({

const exchangeRate = await queryClient
.fetchQuery({
queryKey: useTokenPrices.getKey(['wOETH_ETH']),
queryKey: useTokenPrices.getKey(['1:wOETH_1:ETH']),
queryFn: useTokenPrices.fetcher(config),
})
.then((r) => r['wOETH_ETH']);
.then((r) => r['1:wOETH_1:ETH']);

return {
path: 'zap-eth-oeth-woeth-ccip',
Expand Down
2 changes: 1 addition & 1 deletion libs/defi/oeth/src/portfolio/components/StatsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const WoethStats = (props: CardProps) => {
const { formatAmount } = useFormat();
const { isConnected } = useAccount();
const { data: price, isLoading: isPriceLoading } =
useTokenPrice('wOETH_OETH');
useTokenPrice('1:wOETH_1:OETH');
const { data: bals, isLoading: isBalsLoading } = useWatchBalances({
tokens: [tokens.mainnet.wOETH, tokens.arbitrum.wOETH],
});
Expand Down
4 changes: 2 additions & 2 deletions libs/oeth/ccip/src/hooks/useCcipTxParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export const useCcipTxParams = ({

const exchangeRate = await queryClient
.fetchQuery({
queryKey: useTokenPrices.getKey(['wOETH_ETH']),
queryKey: useTokenPrices.getKey(['1:wOETH_1:ETH']),
queryFn: useTokenPrices.fetcher(config),
})
.then((r) => r['wOETH_ETH']);
.then((r) => r['1:wOETH_1:ETH']);

return {
path: 'zap-eth-oeth-woeth-ccip',
Expand Down
2 changes: 1 addition & 1 deletion libs/oeth/history/src/components/woeth/HistoryHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function HistoryHeader() {
const { formatAmount } = useFormat();
const { isConnected } = useAccount();

const exchangeRate = useTokenPrice('wOETH_OETH');
const exchangeRate = useTokenPrice('1:wOETH_1:OETH');
const woethBalances = useWatchBalances({
tokens: [tokens.mainnet.wOETH, tokens.arbitrum.wOETH],
});
Expand Down
3 changes: 2 additions & 1 deletion libs/prime/restake/src/components/PastClaimsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const PastClaimsCard = (props: CardProps) => {
const intl = useIntl();
const { address, isConnected } = useAccount();
const match = useMatch('/restake/claim');
const { data: price, isLoading: isPriceLoading } = useTokenPrice('OETH_USD');
const { data: price, isLoading: isPriceLoading } =
useTokenPrice('1:OETH_USD');
const { data: withdrawals, isLoading: iswithdrawalsLoading } =
useUserWithdrawalsQuery(
{ address: address ?? ZERO_ADDRESS },
Expand Down
3 changes: 2 additions & 1 deletion libs/prime/restake/src/views/ClaimView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ const ClaimCard = ({ request, ...rest }: ClaimCardProps) => {
const { formatAmount } = useFormat();
const queryClient = useQueryClient();
const { data: blockNumber } = useBlockNumber({ watch: true });
const { data: price, isLoading: isPriceLoading } = useTokenPrice('OETH_USD');
const { data: price, isLoading: isPriceLoading } =
useTokenPrice('1:OETH_USD');
const { params, callbacks, gasPrice } = useTxButton({
params: {
contract: contracts.mainnet.lrtDepositPool,
Expand Down
18 changes: 18 additions & 0 deletions libs/shared/contracts/src/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ export const tokens = {
decimals: 18,
symbol: 'ETHx',
},
FRAX: {
id: '1:FRAX',
address: '0x853d955aCEf822Db058eb8505911ED77F175b99e',
chainId: mainnet.id,
abi: erc20Abi,
name: 'Frax',
decimals: 18,
symbol: 'frxETH',
},
frxETH: {
id: '1:frxETH',
address: '0x5E8422345238F34275888049021821E8E08CAa1f',
Expand Down Expand Up @@ -215,6 +224,15 @@ export const tokens = {
decimals: 18,
symbol: 'ETH',
},
WETH: {
id: '42161:WETH',
address: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
chainId: arbitrum.id,
abi: erc20Abi,
name: 'Wrapped Ether',
decimals: 18,
symbol: 'WETH',
},
wOETH: {
id: '42161:wOETH',
address: '0xD8724322f44E5c58D7A815F542036fb17DbbF839',
Expand Down
2 changes: 1 addition & 1 deletion libs/shared/providers/src/gas/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const fetcher: (
async ({ queryKey: [, gasAmount, chainId] }) => {
const [price, data] = await Promise.all([
queryClient.fetchQuery({
queryKey: useTokenPrice.getKey('ETH_USD'),
queryKey: useTokenPrice.getKey('1:ETH_USD'),
queryFn: useTokenPrice.fetcher(config, queryClient),
}),
estimateFeesPerGas(config, { chainId }),
Expand Down
Loading

0 comments on commit 085c19b

Please sign in to comment.