-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v3.2.0
- Loading branch information
Showing
148 changed files
with
7,384 additions
and
11,207 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,54 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
import useOneInchTokenList from 'queries/tokenLists/useOneInchTokenList'; | ||
import { FlexDivCentered } from 'styles/common'; | ||
|
||
export type TokenIconProps = { | ||
currencyKey: string; | ||
type?: 'synth' | 'asset' | 'token'; | ||
className?: string; | ||
width?: string; | ||
height?: string; | ||
isDeprecated?: boolean; | ||
style?: any; | ||
url?: string; | ||
}; | ||
|
||
const TokenIcon: React.FC<TokenIconProps> = ({ currencyKey, ...props }) => { | ||
const OneInchTokenListQuery = useOneInchTokenList(); | ||
const OneInchTokenListMap = OneInchTokenListQuery.data?.tokensMap ?? null; | ||
|
||
if (OneInchTokenListMap != null && OneInchTokenListMap[currencyKey] != null) { | ||
return <TokenImage src={OneInchTokenListMap[currencyKey].logoURI} {...props} />; | ||
} else { | ||
return ( | ||
<Placeholder {...props}>{currencyKey === 'sDebtRatio' ? 'DEBT' : currencyKey}</Placeholder> | ||
); | ||
} | ||
}; | ||
|
||
const TokenImage = styled.img<{ isDeprecated?: boolean }>` | ||
border-radius: 100%; | ||
border: 2px solid ${(props) => (props.isDeprecated ? props.theme.colors.red : 'transparent')}; | ||
`; | ||
|
||
const Placeholder = styled(FlexDivCentered)<{ | ||
isDeprecated?: boolean; | ||
height?: string; | ||
width?: string; | ||
}>` | ||
border-radius: 100%; | ||
color: ${(props) => props.theme.colors.selectedTheme.button.text}; | ||
border: 2px solid | ||
${(props) => | ||
props.isDeprecated ? props.theme.colors.red : props.theme.colors.selectedTheme.button.text}; | ||
font-size: 7px; | ||
font-family: ${(props) => props.theme.fonts.bold}; | ||
justify-content: center; | ||
margin: 0 auto; | ||
height: ${(props) => props.height}; | ||
width: ${(props) => props.width}; | ||
`; | ||
|
||
export default TokenIcon; |
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,27 @@ | ||
import { SafeConnector } from '@gnosis.pm/safe-apps-wagmi'; | ||
import { Chain, Wallet } from '@rainbow-me/rainbowkit'; | ||
|
||
import GnosisIcon from 'assets/png/rainbowkit/gnosis.png'; | ||
|
||
type SafeOptions = { | ||
chains: Chain[]; | ||
}; | ||
|
||
const Safe = ({ chains }: SafeOptions): Wallet => ({ | ||
id: 'safe', | ||
iconBackground: '#FFF', | ||
name: 'Gnosis Safe', | ||
iconUrl: async () => GnosisIcon, | ||
downloadUrls: { | ||
android: 'https://play.google.com/store/apps/details?id=io.gnosis.safe', | ||
ios: 'https://apps.apple.com/us/app/gnosis-safe/idid1515759131', | ||
}, | ||
createConnector: () => { | ||
const connector = new SafeConnector({ chains }); | ||
return { | ||
connector, | ||
}; | ||
}, | ||
}); | ||
|
||
export default Safe; |
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 @@ | ||
export { default } from './Gnosis'; |
Oops, something went wrong.
3932a4f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
kwenta – ./
v2.beta.kwenta.io
kwenta.io
kwenta-kwenta.vercel.app
kwenta-git-main-kwenta.vercel.app