Skip to content

Commit

Permalink
Revert "add error reporting component, INTEGRATION ERROR type, and Mi…
Browse files Browse the repository at this point in the history
…ssing provider error (#3107)" (#3109)

This reverts commit ac2642f.
  • Loading branch information
JFrankfurt authored Jan 12, 2022
1 parent ac2642f commit 06a8151
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 42 deletions.
4 changes: 1 addition & 3 deletions src/lib/components/Error/ErrorDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ export default function ErrorDialog({ header, error, action, onAction }: ErrorDi
<Rule />
<ErrorColumn>
<Column gap={0.5} ref={setDetails} css={scrollbar}>
<ThemedText.Code>
{error.name}: {error.message}
</ThemedText.Code>
<ThemedText.Code>{error.message}</ThemedText.Code>
</Column>
</ErrorColumn>
<ActionButton onClick={onAction}>{action}</ActionButton>
Expand Down
23 changes: 0 additions & 23 deletions src/lib/components/Error/ErrorReporter.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/lib/components/Widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Provider as EthProvider } from 'widgets-web3-react/types'

import { Provider as DialogProvider } from './Dialog'
import ErrorBoundary, { ErrorHandler } from './Error/ErrorBoundary'
import ErrorReporter from './Error/ErrorReporter'
import Web3Provider from './Web3Provider'

const slideDown = keyframes`
Expand Down Expand Up @@ -101,7 +100,6 @@ export default function Widget({
<ErrorBoundary onError={onError}>
<AtomProvider>
<Web3Provider provider={provider} jsonRpcEndpoint={jsonRpcEndpoint}>
<ErrorReporter />
{children}
</Web3Provider>
</AtomProvider>
Expand Down
11 changes: 0 additions & 11 deletions src/lib/hooks/useEnsureCorrectProps.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Widget, { WidgetProps } from './components/Widget'

export type SwapWidgetProps = WidgetProps<typeof Swap>

export function SwapWidget(props: SwapWidgetProps) {
export function SwapWidget({ ...props }: SwapWidgetProps) {
return (
<Widget {...props}>
<Swap {...props} />
Expand Down
2 changes: 0 additions & 2 deletions src/lib/state/web3.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createMulticall } from '@uniswap/redux-multicall'
import { atom } from 'jotai'
import { atomWithStore } from 'jotai/redux'
import { atomWithDefault } from 'jotai/utils'
import { createStore } from 'redux'
Expand All @@ -13,7 +12,6 @@ export type Web3ReactState = [Connector, Web3ReactHooks]

export const urlAtom = atomWithDefault<Web3ReactState>(() => EMPTY_CONNECTOR)
export const injectedAtom = atomWithDefault<Web3ReactState>(() => EMPTY_CONNECTOR)
export const providerAtom = atom((get) => get(injectedAtom) || get(urlAtom))

export const multicall = createMulticall()
const multicallStore = createStore(multicall.reducer)
Expand Down

0 comments on commit 06a8151

Please sign in to comment.