-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from OriginProtocol/feat/web3
[TAS-182] Feat/web3
- Loading branch information
Showing
155 changed files
with
10,551 additions
and
303 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
last 1 Chrome version | ||
last 1 Firefox version | ||
last 2 Edge major versions | ||
last 2 Safari major version | ||
last 2 iOS major versions | ||
Firefox ESR | ||
not IE 9-11 |
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,2 @@ | ||
VITE_WALLET_CONNECT_PROJECT_ID= | ||
VITE_INFURA_ID= |
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 |
---|---|---|
|
@@ -37,3 +37,6 @@ testem.log | |
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# env | ||
.env.local |
File renamed without changes.
Binary file not shown.
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,39 @@ | ||
import { Container, Stack } from '@mui/material'; | ||
import { HistoryView } from '@origin/oeth/history'; | ||
import { SwapView } from '@origin/oeth/swap'; | ||
import { WrapView } from '@origin/oeth/wrap'; | ||
import { Route, Routes } from 'react-router-dom'; | ||
|
||
import { ApyHeader } from './components/ApyHeader'; | ||
import { Topnav } from './components/Topnav'; | ||
|
||
export function App() { | ||
return ( | ||
<Stack> | ||
<Topnav /> | ||
<Container | ||
sx={{ | ||
mt: { | ||
xs: 3, | ||
md: 5, | ||
paddingInline: { | ||
xs: 2, | ||
md: 0, | ||
}, | ||
}, | ||
}} | ||
maxWidth="sm" | ||
> | ||
<ApyHeader /> | ||
<Stack mt={3}> | ||
<Routes> | ||
<Route index element={<SwapView />} /> | ||
<Route path="wrap" element={<WrapView />} /> | ||
<Route path="history" element={<HistoryView />} /> | ||
<Route path="swap" element={<SwapView />} /> | ||
</Routes> | ||
</Stack> | ||
</Container> | ||
</Stack> | ||
); | ||
} |
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,2 @@ | ||
export * from './reactQuery'; | ||
export * from './wagmi'; |
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,5 @@ | ||
import { QueryClient } from '@tanstack/react-query'; | ||
|
||
export const queryClient = new QueryClient({ | ||
defaultOptions: { queries: { staleTime: 1000 * 60 * 20 } }, | ||
}); |
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,63 @@ | ||
import { connectorsForWallets } from '@rainbow-me/rainbowkit'; | ||
import { | ||
argentWallet, | ||
braveWallet, | ||
coinbaseWallet, | ||
imTokenWallet, | ||
injectedWallet, | ||
ledgerWallet, | ||
metaMaskWallet, | ||
rainbowWallet, | ||
safeWallet, | ||
walletConnectWallet, | ||
} from '@rainbow-me/rainbowkit/wallets'; | ||
import { configureChains, createConfig } from 'wagmi'; | ||
import { goerli, localhost, mainnet } from 'wagmi/chains'; | ||
import { infuraProvider } from 'wagmi/providers/infura'; | ||
import { publicProvider } from 'wagmi/providers/public'; | ||
|
||
const VITE_WALLET_CONNECT_PROJECT_ID = import.meta.env | ||
.VITE_WALLET_CONNECT_PROJECT_ID; | ||
const VITE_INFURA_ID = import.meta.env.VITE_INFURA_ID; | ||
|
||
export const { chains, publicClient, webSocketPublicClient } = configureChains( | ||
[mainnet, goerli, localhost], | ||
[infuraProvider({ apiKey: VITE_INFURA_ID }), publicProvider()], | ||
); | ||
|
||
const connectors = connectorsForWallets([ | ||
{ | ||
groupName: 'Recommended', | ||
wallets: [ | ||
metaMaskWallet({ | ||
chains, | ||
shimDisconnect: true, | ||
projectId: VITE_WALLET_CONNECT_PROJECT_ID, | ||
}), | ||
ledgerWallet({ chains, projectId: VITE_WALLET_CONNECT_PROJECT_ID }), | ||
walletConnectWallet({ | ||
chains, | ||
projectId: VITE_WALLET_CONNECT_PROJECT_ID, | ||
}), | ||
coinbaseWallet({ appName: 'mStable', chains }), | ||
], | ||
}, | ||
{ | ||
groupName: 'Others', | ||
wallets: [ | ||
injectedWallet({ chains, shimDisconnect: true }), | ||
safeWallet({ chains }), | ||
rainbowWallet({ chains, projectId: VITE_WALLET_CONNECT_PROJECT_ID }), | ||
braveWallet({ chains, shimDisconnect: true }), | ||
argentWallet({ chains, projectId: VITE_WALLET_CONNECT_PROJECT_ID }), | ||
imTokenWallet({ chains, projectId: VITE_WALLET_CONNECT_PROJECT_ID }), | ||
], | ||
}, | ||
]); | ||
|
||
export const wagmiConfig = createConfig({ | ||
autoConnect: true, | ||
connectors, | ||
publicClient, | ||
webSocketPublicClient, | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.