Skip to content

Commit

Permalink
Removed mentions of chainConfig, updated yarn.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
makylfang committed Jan 17, 2024
1 parent 57307f2 commit 03e9298
Show file tree
Hide file tree
Showing 7 changed files with 317 additions and 45 deletions.
7 changes: 1 addition & 6 deletions examples/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
const { AuthProvider } = window.arcana.auth

let provider
const auth = new AuthProvider(
'xar_dev_bf981ebaed0eb2a550b158d14eb1c42c5bbcac56'
)
// const auth = new AuthProvider(
// 'xar_dev_ecc6292e414c8228ae69ce5ff6a1b3eca59984e9'
// )
const auth = new AuthProvider('...')
provider = auth.provider
setHooks()

Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
AppConfig,
AppMode,
BearerAuthentication,
ChainConfigInput,
ChainType,
ConstructorParams,
EIP6963ProviderInfo,
Expand Down
1 change: 0 additions & 1 deletion src/provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
ChainConfigInput,
ChildMethods,
EthereumProvider,
JsonRpcError,
Expand Down
7 changes: 1 addition & 6 deletions src/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export interface ParentMethods {
getAppConfig: () => AppConfig
getAppMode: () => AppMode
getParentUrl: () => string
getRpcConfig: () => ChainConfigInput | undefined
getRpcConfig: () => undefined
triggerSocialLogin: (kind: string) => void
triggerPasswordlessLogin: (email: string) => void
getPopupState: () => 'open' | 'closed'
Expand Down Expand Up @@ -212,11 +212,6 @@ export enum AppMode {
Full = 2,
}

export interface ChainConfigInput {
rpcUrl?: string
chainId: string
}

export interface ConnectOptions {
compact: boolean
}
Expand Down
6 changes: 0 additions & 6 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,6 @@ const getConstructorParams = (initParams?: Partial<ConstructorParams>) => {
if (initParams?.debug !== undefined) {
p.debug = initParams.debug
}
if (initParams?.redirectUrl) {
p.redirectUrl = initParams.redirectUrl
}
if (initParams?.chainConfig) {
p.chainConfig = initParams.chainConfig
}
if (initParams?.theme) {
p.theme = initParams.theme
}
Expand Down
11 changes: 1 addition & 10 deletions usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,7 @@ import { AuthProvider } from '@arcana/auth' // From npm
#### Initialize AuthProvider

```ts
import { AuthProvider, CHAIN } from '@arcana/auth'

interface ChainConfig {
chainId: CHAIN
rpcUrl?: string
}
import { AuthProvider } from '@arcana/auth'

const auth = new AuthProvider(`${clientId}`, {
position: 'left', // default - right
Expand All @@ -112,10 +107,6 @@ const auth = new AuthProvider(`${clientId}`, {
connectOptions: {
compact: true, // default - false
},
chainConfig: {
chainId: CHAIN.POLYGON_MAINNET,
rpcUrl: '',
},
})

await auth.init()
Expand Down
Loading

0 comments on commit 03e9298

Please sign in to comment.