Skip to content

Commit

Permalink
fix: solve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
akanoce committed Jan 21, 2024
2 parents d48e4a1 + 319140c commit 883c5b6
Show file tree
Hide file tree
Showing 8 changed files with 220 additions and 121 deletions.
6 changes: 5 additions & 1 deletion apps/web/src/api/aave/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ export const useMergedTableData = ({
};

export const useGhoData = (address: string) => {
const mergeData = useMergedTableData({ address, showGho: true });
const mergeData = useMergedTableData({
address,
showAll: true,
showGho: true
});
return mergeData.find((asset) => asset.symbol === 'GHO');
};
1 change: 0 additions & 1 deletion apps/web/src/components/ReservesIncentives.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ type Props = {

export const ReservesIncentives: React.FC<Props> = ({ address }) => {
const { data: reservesIncentives } = useReservesIncentives();

const formattedReservesIncentives =
reservesIncentives?.formattedReservesIncentives;

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/const/turnkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { WebauthnStamper } from '@turnkey/webauthn-stamper';
import { config } from '@repo/config';

const stamper = new WebauthnStamper({
rpId: 'localhost'
rpId: config.baseUrl || 'localhost'
});

export const passkeyHttpClient = new TurnkeyClient(
Expand Down
124 changes: 80 additions & 44 deletions apps/web/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,33 @@ import { useBalance } from 'wagmi';
import { CryptoIconMap } from '@/const/icons';
import { ChangeEvent, useCallback, useState } from 'react';
import { GetGhoSimpleFlow } from '@/components/GetGhoSimpleFlow';
import { motion } from 'framer-motion';

type Props = {
wallet: Address;
};

const bottomToUp = {
initial: {
opacity: 0,
y: 50,
scale: 0.95,
rotate: -10 // Slightly rotated when starting
},
animate: {
opacity: 1,
y: 0,
scale: 1,
rotate: 0 // Return to normal state
},
exit: {
opacity: 0,
y: -50,
scale: 0.95,
rotate: 10 // Rotate in opposite direction when exiting
}
};

export const Home = ({ wallet }: Props) => {
// const { setIsSPonsored } = useSponsoredTxFlag();
const { logout } = useAccountAdapter();
Expand All @@ -47,19 +69,26 @@ export const Home = ({ wallet }: Props) => {
const { data: balance } = useBalance({ address: wallet });

return (
<VStack spacing={4} alignItems={'stretch'} w="full">
<HStack justifyContent="space-between" w="full">
<FormControl display="flex" alignItems="center">
<FormLabel htmlFor="advanced" mb="0">
Advanced View
</FormLabel>
<Switch
id="advanced"
size="lg"
onChange={toggleShowAdvanced}
/>
</FormControl>
{/* <FormControl display="flex" alignItems="center">
<motion.div
initial="initial"
animate="animate"
exit="exit"
variants={bottomToUp}
transition={{ duration: 0.5 }}
>
<VStack spacing={4} alignItems={'stretch'} w="full">
<HStack justifyContent="space-between" w="full">
<FormControl display="flex" alignItems="center">
<FormLabel htmlFor="advanced" mb="0">
Advanced View
</FormLabel>
<Switch
id="advanced"
size="lg"
onChange={toggleShowAdvanced}
/>
</FormControl>
{/* <FormControl display="flex" alignItems="center">
<FormLabel htmlFor="sponsored" mb="0">
Enable ERC20 Sponsored Transactions
</FormLabel>
Expand All @@ -69,41 +98,48 @@ export const Home = ({ wallet }: Props) => {
onChange={handleOnChange}
/>
</FormControl> */}
<HStack spacing={8}>
<HStack spacing={2}>
<AddressButton address={wallet} withCopy={true} />
<HStack spacing={8}>
<HStack spacing={2}>
<Image
src={CryptoIconMap['WETH']}
boxSize="1.5rem"
/>
<Heading size="xs">
{Number(balance?.formatted ?? 0).toFixed(4)}
</Heading>
<AddressButton address={wallet} withCopy={true} />
<HStack spacing={2}>
<Image
src={CryptoIconMap['WETH']}
boxSize="1.5rem"
/>
<Heading size="xs">
{Number(balance?.formatted ?? 0).toFixed(4)}
</Heading>
</HStack>
</HStack>
<Button
variant={'solid'}
colorScheme="purple"
onClick={logout}
size="sm"
>
Logout
</Button>
</HStack>
<Button
variant={'solid'}
colorScheme="purple"
onClick={logout}
size="sm"
>
Logout
</Button>
</HStack>
</HStack>
<GetGhoSimpleFlow address={wallet} />
{/* <GhoData address={wallet} />
<GetGhoSimpleFlow address={wallet} />
{/* <GhoData address={wallet} />
<MergedTable address={wallet} /> */}
{showAdvanced && (
<>
<Spacer h={30} />
<Heading size="md">Advanced View</Heading>
<SuppliedAssets address={wallet} />
<BorrowedAssets address={wallet} />
<ReservesIncentives address={wallet} />
</>
)}
</VStack>
{showAdvanced && (
<motion.div
initial="initial"
animate="animate"
exit="exit"
variants={bottomToUp}
transition={{ duration: 0.5 }}
>
<Spacer h={30} />
<Heading size="md">Advanced View</Heading>
<SuppliedAssets address={wallet} />
<BorrowedAssets address={wallet} />
<ReservesIncentives address={wallet} />
</motion.div>
)}
</VStack>
</motion.div>
);
};
Loading

0 comments on commit 883c5b6

Please sign in to comment.