-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* save * remove selectors and add types * single query, type refactor, pipe it up * pendingTx state & zustand * useWatchPendingTxs * usePoll + usage * queries * use transactions * messy types and structure * addNewTransactions * fix prettier * Revert "fix prettier" This reverts commit 0ead5a0. * save * lint * save * ui tweaks * clean up state and add nonces * ben ui review * pipe up once shit * clean * clean * rename and fix case * fix tag color and position * clean up * clean up * rm logs * use new tx handling for notifs * clean * rm comment * rm space * fix * speed up + cancel tweaks * remove clear specific pending tx logic * remove cancelled description * fix swap label * updating pending based on consolidated txs * fix cancel + speed up * fix ens logo + rm asset * rm fall back * fix asset quantity display * ts --------- Co-authored-by: Matthew Wall <matthew.wallt@gmail.com>
- Loading branch information
1 parent
5851f24
commit 395583b
Showing
60 changed files
with
1,925 additions
and
2,063 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import React from 'react'; | ||
import { Box } from '@/design-system'; | ||
import { ParsedAddressAsset } from '@/entities'; | ||
import { useTheme } from '@/theme'; | ||
import { ImgixImage } from '@/components/images'; | ||
import ChainBadge from './ChainBadge'; | ||
|
||
export function TwoCoinsIcon({ | ||
size = 45, | ||
under, | ||
over, | ||
badge = true, | ||
}: { | ||
size?: number; | ||
under: ParsedAddressAsset; | ||
over: ParsedAddressAsset; | ||
badge?: boolean; | ||
}) { | ||
const theme = useTheme(); | ||
const overSize = size * 0.85; | ||
const underSize = size * 0.75; | ||
|
||
return ( | ||
<Box style={{ minWidth: size, height: size, marginRight: -5 }}> | ||
<Box | ||
style={{ | ||
position: 'absolute', | ||
top: 8, | ||
right: 4, | ||
minWidth: size, | ||
height: size, | ||
}} | ||
> | ||
<Box | ||
borderRadius={100} | ||
style={{ | ||
zIndex: 0, | ||
position: 'absolute', | ||
top: -underSize / 4, | ||
left: -0, | ||
}} | ||
> | ||
<ImgixImage | ||
source={{ uri: under?.icon_url }} | ||
style={{ borderRadius: 100, width: underSize, height: underSize }} | ||
size={underSize} | ||
/> | ||
</Box> | ||
<Box borderRadius={100} style={{ zIndex: 10, position: 'absolute', top: 0, right: 0 }}> | ||
<ImgixImage | ||
source={{ uri: over?.icon_url }} | ||
style={{ | ||
borderRadius: 100, | ||
width: overSize, | ||
height: overSize, | ||
borderWidth: 2, | ||
borderColor: theme.colors.white, | ||
}} | ||
size={overSize} | ||
/> | ||
</Box> | ||
{badge && <ChainBadge network={over.network} badgeYPosition={9} badgeXPosition={-7.5} />} | ||
</Box> | ||
</Box> | ||
); | ||
} |
Oops, something went wrong.