diff --git a/dapps/web3modal/svelte/src/css/global.css b/dapps/web3modal/svelte/src/css/global.css index efdd5bf..f590fa1 100644 --- a/dapps/web3modal/svelte/src/css/global.css +++ b/dapps/web3modal/svelte/src/css/global.css @@ -9,9 +9,6 @@ box-sizing: border-box; margin: 0; padding: 0; - - scrollbar-width: thin; - scrollbar-color: #fff #141414; } body, html{ @@ -22,11 +19,6 @@ body, html{ font-family: 'montserrat'; } -*::selection{ - background-color: rgb(255, 255, 255); - color: #141414; -} - ::-webkit-scrollbar { background: #141414; width: 9px; diff --git a/dapps/web3modal/svelte/src/lib/web3modal.ts b/dapps/web3modal/svelte/src/lib/web3modal.ts index 22e0f0a..1685ca8 100644 --- a/dapps/web3modal/svelte/src/lib/web3modal.ts +++ b/dapps/web3modal/svelte/src/lib/web3modal.ts @@ -1,6 +1,12 @@ import { defaultWagmiConfig, createWeb3Modal } from '@web3modal/wagmi' -import { getAccount, getChainId, reconnect, watchAccount, watchChainId } from '@wagmi/core' +import { + getAccount, + getChainId, + reconnect, + watchAccount, + watchChainId, +} from '@wagmi/core' import { readable, writable } from 'svelte/store' import { @@ -64,20 +70,24 @@ createWeb3Modal({ projectId, themeMode: 'dark', featuredWalletIds: [], - enableAnalytics: true + enableAnalytics: true, }) -export const chainId = readable(getChainId(wagmiConfig), (set) => watchChainId(wagmiConfig, { onChange: set })) -export const account = readable(getAccount(wagmiConfig), (set) => watchAccount(wagmiConfig, { onChange: set })) +export const chainId = readable(getChainId(wagmiConfig), (set) => + watchChainId(wagmiConfig, { onChange: set }), +) +export const account = readable(getAccount(wagmiConfig), (set) => + watchAccount(wagmiConfig, { onChange: set }), +) export const provider = readable( undefined, (set) => watchAccount(wagmiConfig, { - onChange: async (account) => { - if (!account.connector) return set(undefined) - set(await account.connector?.getProvider()) - } - }), + onChange: async (account) => { + if (!account.connector) return set(undefined) + set(await account.connector?.getProvider()) + }, + }), ) export const supported_chains = writable([]) diff --git a/dapps/web3modal/svelte/src/partials/Network.svelte b/dapps/web3modal/svelte/src/partials/Network.svelte index 650eb8b..81453c9 100644 --- a/dapps/web3modal/svelte/src/partials/Network.svelte +++ b/dapps/web3modal/svelte/src/partials/Network.svelte @@ -9,20 +9,20 @@ Chain ID: {$chainId} - {#if $account.chain} - - Network: - {$account.chain?.name} - - - Decimals: - {$account.chain?.nativeCurrency.decimals} - - - Currency: - {$account.chain?.nativeCurrency.name} - - {/if} + {#if $account.chain} + + Network: + {$account.chain?.name} + + + Decimals: + {$account.chain?.nativeCurrency.decimals} + + + Currency: + {$account.chain?.nativeCurrency.name} + + {/if} {/if} diff --git a/dapps/web3modal/svelte/src/partials/SwitchChain.svelte b/dapps/web3modal/svelte/src/partials/SwitchChain.svelte deleted file mode 100644 index e0ba7b2..0000000 --- a/dapps/web3modal/svelte/src/partials/SwitchChain.svelte +++ /dev/null @@ -1,68 +0,0 @@ - - -{#if $provider?.session} - -
- Switch Chain -
- - -
-
-
-{/if} - - diff --git a/dapps/web3modal/svelte/src/routes/+layout.svelte b/dapps/web3modal/svelte/src/routes/+layout.svelte index da0bc30..e3c8183 100644 --- a/dapps/web3modal/svelte/src/routes/+layout.svelte +++ b/dapps/web3modal/svelte/src/routes/+layout.svelte @@ -14,7 +14,7 @@ diff --git a/dapps/web3modal/svelte/src/routes/+page.svelte b/dapps/web3modal/svelte/src/routes/+page.svelte index eb77c21..c46e22c 100644 --- a/dapps/web3modal/svelte/src/routes/+page.svelte +++ b/dapps/web3modal/svelte/src/routes/+page.svelte @@ -4,7 +4,6 @@ import Network from '../partials/Network.svelte' import SignMessage from '../partials/SignMessage.svelte' import SignTypeData from '../partials/SignTypeData.svelte' - import SwitchChain from '../partials/SwitchChain.svelte' import Transaction from '../partials/Transaction.svelte' import Wallet from '../partials/Wallet.svelte' @@ -15,7 +14,6 @@ {#if $account.isConnected} - {/if}