Skip to content

Commit

Permalink
chore: export appkit options (#2738)
Browse files Browse the repository at this point in the history
  • Loading branch information
enesozturk authored Aug 23, 2024
1 parent c9fb843 commit 55719a6
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/ethers/exports/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type { AdapterOptions } from '@web3modal/base/adapters/evm/ethers'
export { defaultConfig } from '@web3modal/base/adapters/evm/ethers'

// -- Setup -------------------------------------------------------------
type EthersAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
export type EthersAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
AdapterOptions

export function createWeb3Modal(options: EthersAppKitOptions) {
Expand Down
4 changes: 2 additions & 2 deletions packages/ethers/exports/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export { defaultConfig } from '@web3modal/base/adapters/evm/ethers'
let appkit: AppKit | undefined = undefined
let ethersAdapter: EVMEthersClient | undefined = undefined

type WagmiAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
export type EthersAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
AdapterOptions

export function createWeb3Modal(options: WagmiAppKitOptions) {
export function createWeb3Modal(options: EthersAppKitOptions) {
ethersAdapter = new EVMEthersClient({
ethersConfig: options.ethersConfig,
siweConfig: options.siweConfig,
Expand Down
4 changes: 2 additions & 2 deletions packages/ethers5/exports/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export { defaultConfig } from '@web3modal/base/adapters/evm/ethers'
let appkit: AppKit | undefined = undefined
let ethersAdapter: EVMEthersClient | undefined = undefined

type WagmiAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
export type Ethers5AppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
AdapterOptions

export function createWeb3Modal(options: WagmiAppKitOptions) {
export function createWeb3Modal(options: Ethers5AppKitOptions) {
ethersAdapter = new EVMEthersClient({
ethersConfig: options.ethersConfig,
siweConfig: options.siweConfig,
Expand Down
4 changes: 3 additions & 1 deletion packages/solana/exports/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import type { SolanaAppKitOptions } from './options'
// -- Configs -----------------------------------------------------------
export { defaultSolanaConfig } from '@web3modal/base/adapters/solana/web3js'

// -- Setup -------------------------------------------------------------
// -- Types -------------------------------------------------------------
export type { SolanaAppKitOptions }

// -- Setup -------------------------------------------------------------
export function createWeb3Modal(options: SolanaAppKitOptions) {
const wagmiAdapter = new SolanaWeb3JsClient({
solanaConfig: options.solanaConfig,
Expand Down
3 changes: 3 additions & 0 deletions packages/solana/exports/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import type { SolanaAppKitOptions } from './options'
// -- Configs -----------------------------------------------------------
export { defaultSolanaConfig } from '@web3modal/base/adapters/solana/web3js'

// -- Types -------------------------------------------------------------------
export type { SolanaAppKitOptions }

// -- Setup -------------------------------------------------------------
let appkit: AppKit | undefined = undefined
let solanaAdapter: SolanaWeb3JsClient | undefined = undefined
Expand Down
3 changes: 3 additions & 0 deletions packages/solana/exports/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import type { Provider, Connection } from '@web3modal/base/adapters/solana/web3j
import type { CaipNetwork } from '@web3modal/core'
import type { SolanaAppKitOptions } from './options'

// -- Types -------------------------------------------------------------------
export type { SolanaAppKitOptions }

// -- Setup -------------------------------------------------------------------
let appkit: AppKit | undefined = undefined
let solanaAdapter: SolanaWeb3JsClient | undefined = undefined
Expand Down
2 changes: 1 addition & 1 deletion packages/wagmi/exports/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export { authConnector } from '@web3modal/base/adapters/evm/wagmi'
export { defaultWagmiConfig } from '@web3modal/base/adapters/evm/wagmi'

// -- Setup -------------------------------------------------------------
type WagmiAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
export type WagmiAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
AdapterOptions<Config>

export function createWeb3Modal(options: WagmiAppKitOptions) {
Expand Down
2 changes: 1 addition & 1 deletion packages/wagmi/exports/react/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export { defaultWagmiConfig } from '@web3modal/base/adapters/evm/wagmi'
let appkit: AppKit | undefined = undefined
let wagmiAdapter: EVMWagmiClient | undefined = undefined

type WagmiAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
export type WagmiAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
AdapterOptions<Config>

export function createWeb3Modal(options: WagmiAppKitOptions) {
Expand Down
2 changes: 1 addition & 1 deletion packages/wagmi/exports/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export { defaultWagmiConfig } from '@web3modal/base/adapters/evm/wagmi'
let appkit: AppKit | undefined = undefined
let wagmiAdapter: EVMWagmiClient | undefined = undefined

type WagmiAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
export type WagmiAppKitOptions = Omit<AppKitOptions, 'adapters' | 'sdkType' | 'sdkVersion'> &
AdapterOptions<Config>

export function createWeb3Modal(options: WagmiAppKitOptions) {
Expand Down

0 comments on commit 55719a6

Please sign in to comment.