Skip to content

Commit

Permalink
chore: clean up logs
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzkirstein committed Apr 30, 2024
1 parent 384a46f commit a3dc4ca
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 5 deletions.
52 changes: 52 additions & 0 deletions src/@context/Web3Provider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { WagmiProvider, createConfig } from 'wagmi'

Check failure on line 1 in src/@context/Web3Provider.tsx

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 18)

Module '"wagmi"' has no exported member 'WagmiProvider'.

Check failure on line 1 in src/@context/Web3Provider.tsx

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 18)

Module '"wagmi"' has no exported member 'createConfig'.
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { ConnectKitProvider, getDefaultConfig } from 'connectkit'

Check failure on line 3 in src/@context/Web3Provider.tsx

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 18)

Module '"connectkit"' has no exported member 'getDefaultConfig'.
import { getSupportedChains } from '../@utils/wallet/chains'
import { getSupportedChainIds } from '../../chains.config'
import { ReactElement, ReactNode } from 'react'

const config = createConfig(
getDefaultConfig({
// Your dApps chains
chains: getSupportedChains(getSupportedChainIds()),
// Required API Keys
walletConnectProjectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID,
// Required App Info
appName: 'Pontus-X'
})
)

// ConnectKit CSS overrides
// https://docs.family.co/connectkit/theming#theme-variables
export const connectKitTheme = {
'--ck-font-family': 'var(--font-family-base)',
'--ck-border-radius': 'var(--border-radius)',
'--ck-overlay-background': 'var(--background-body-transparent)',
'--ck-modal-box-shadow': '0 0 20px 20px var(--box-shadow-color)',
'--ck-body-background': 'var(--background-body)',
'--ck-body-color': 'var(--font-color-text)',
'--ck-primary-button-border-radius': 'var(--border-radius)',
'--ck-primary-button-color': 'var(--font-color-heading)',
'--ck-primary-button-background': 'var(--background-content)',
'--ck-secondary-button-border-radius': 'var(--border-radius)'
}

const queryClient = new QueryClient()

export default function Web3Provider({
children
}: {
children: ReactNode
}): ReactElement {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<ConnectKitProvider customTheme={connectKitTheme}>
{children}
</ConnectKitProvider>
</QueryClientProvider>
</WagmiProvider>
)
}

export { Web3Provider }
7 changes: 2 additions & 5 deletions src/components/Asset/Edit/EditMetadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,11 @@ export default function Edit({
if (isAutomationEnabled && autoWallet?.address) {
setAccountIdToUse(autoWallet.address)
setSignerToUse(autoWallet)
LoggerInstance.log('[edit] using autoWallet', { autoWallet })
LoggerInstance.log('[edit] using autoWallet to sign')
} else if (accountId && signer) {
setAccountIdToUse(accountId)
setSignerToUse(signer)
LoggerInstance.log('[edit] using web3 account', {
accountId,
signer
})
LoggerInstance.log('[edit] using web3 account to sign')
} else {
refetchSigner()
LoggerInstance.log('[edit] refetching signer')
Expand Down

0 comments on commit a3dc4ca

Please sign in to comment.