Skip to content

Commit

Permalink
add build dep turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
glitch-txs committed Feb 22, 2024
1 parent 7de60a3 commit 79739ed
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 130 deletions.
2 changes: 0 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/node_modules": true,
"**/out": true,
"**/dist": true,
"**/.turbo": true,
"**/playwright-report": true,
"**/coverage": true
Expand Down
127 changes: 18 additions & 109 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/scaffold-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"@web3modal/core": "4.0.8",
"@web3modal/polyfills": "4.0.8",
"@web3modal/scaffold": "4.0.8",
"valtio": "1.11.2"
},
"keywords": [
Expand Down
6 changes: 3 additions & 3 deletions packages/scaffold/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
"@web3modal/siwe": ">=4"
},
"devDependencies": {
"@web3modal/wallet": "4.0.7",
"@web3modal/siwe": "4.0.7"
"@web3modal/wallet": "4.0.8",
"@web3modal/siwe": "4.0.8"
},
"peerDependenciesMeta": {
"@web3modal/siwe": {
"optional": true
}
},
"optionalDependencies": {
"@web3modal/siwe": "4.0.7"
"@web3modal/siwe": "4.0.8"
},
"keywords": [
"web3",
Expand Down
2 changes: 1 addition & 1 deletion packages/scaffold/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class Web3ModalScaffold {
if (options.siweControllerClient) {
const { SIWEController } = await import('@web3modal/siwe')

OptionsController.setfix / siwe(true)
OptionsController.setIsSiweEnabled(true)
SIWEController.setSIWEClient(options.siweControllerClient)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/scaffold/src/modal/w3m-modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class W3mModal extends LitElement {

@state() private caipAddress = AccountController.state.caipAddress

@state() private isSiweEnabled = OptionsController.state.fix / siwe
@state() private isSiweEnabled = OptionsController.state.isSiweEnabled

public constructor() {
super()
Expand Down
2 changes: 1 addition & 1 deletion packages/scaffold/src/partials/w3m-header/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class W3mHeader extends LitElement {
}

private async onClose() {
if (OptionsController.state.fix / siwe) {
if (OptionsController.state.isSiweEnabled) {
const { SIWEController } = await import('@web3modal/siwe')
if (SIWEController.state.status !== 'success') {
await ConnectionController.disconnect()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class W3mConnectingExternalView extends W3mConnectingWidget {
}
await ConnectionController.connectExternal(this.connector)

if (OptionsController.state.fix / siwe) {
if (OptionsController.state.isSiweEnabled) {
RouterController.push('ConnectingSiwe')
} else {
ModalController.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class W3mConnectingWcView extends LitElement {

await ConnectionController.state.wcPromise
this.finalizeConnection()
if (OptionsController.state.fix / siwe) {
if (OptionsController.state.isSiweEnabled) {
RouterController.push('ConnectingSiwe')
} else {
ModalController.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class W3mNetworkSwitchView extends LitElement {
this.error = false
if (this.network) {
await NetworkController.switchActiveNetwork(this.network)
if (!OptionsController.state.fix / siwe) {
if (!OptionsController.state.isSiweEnabled) {
RouterUtil.navigateAfterNetworkSwitch()
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/wagmi/exports/react/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ let modal: Web3Modal | undefined = undefined

export function createWeb3Modal(options: Web3ModalOptions<ReactConfig>) {
if (!modal) {
// @ts-expect-error Types Overlap
modal = new Web3Modal({ ...options, _sdkVersion: `react-wagmi-${ConstantsUtil.VERSION}` })
getWeb3Modal(modal)
}
Expand Down
4 changes: 2 additions & 2 deletions packages/wagmi/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
watchAccount,
watchConnectors
} from '@wagmi/core'
import { mainnet } from '@wagmi/core/chains'
import type { Chain } from '@wagmi/core/chains'
import { mainnet } from 'viem/chains'
import type { Chain } from 'viem/chains'
import type { GetAccountReturnType } from '@wagmi/core'
import type {
CaipAddress,
Expand Down
2 changes: 1 addition & 1 deletion packages/wagmi/src/connectors/EmailConnector.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createConnector, normalizeChainId } from '@wagmi/core'
import type { Chain } from '@wagmi/core/chains'
import type { Chain } from 'viem/chains'
import { W3mFrameProvider } from '@web3modal/wallet'
import { SwitchChainError, getAddress } from 'viem'
import type { Address } from 'viem'
Expand Down
1 change: 0 additions & 1 deletion packages/wagmi/src/utils/defaultWagmiReactConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export function defaultWagmiConfig({

// Dissabled by default
if (enableEmail === true) {
// @ts-expect-error Chain types overlap with core
connectors.push(emailConnector({ chains: [...chains], options: { projectId } }))
}

Expand Down
2 changes: 1 addition & 1 deletion packages/wagmi/src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { EthereumProvider } from '@walletconnect/ethereum-provider'
import { http } from 'viem'

import type { CaipNetwork, CaipNetworkId } from '@web3modal/scaffold'
import type { Chain } from '@wagmi/core/chains'
import type { Chain } from 'viem/chains'
import type { Connector } from '@wagmi/core'

export function getCaipDefaultChain(chain?: Chain) {
Expand Down
2 changes: 1 addition & 1 deletion packages/wagmi/src/utils/provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { http } from '@wagmi/core'
import type { Chain } from '@wagmi/core/chains'
import type { Chain } from 'viem/chains'
import { CoreHelperUtil } from '@web3modal/scaffold'
import { ConstantsUtil, PresetsUtil } from '@web3modal/scaffold-utils'

Expand Down
Loading

0 comments on commit 79739ed

Please sign in to comment.