Skip to content

Commit

Permalink
Expose connector params
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanbrook committed Apr 26, 2024
1 parent 87a0784 commit 7327cee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ export function sequenceWallet(params: BaseSequenceConnectorOptions) {
}

type Provider = sequence.provider.SequenceProvider
type Properties = {}
type Properties = { params: BaseSequenceConnectorOptions }
type StorageItem = {
[LocalStorageKey.EthAuthProof]: string
[LocalStorageKey.ProjectAccessKey]: string
[LocalStorageKey.Theme]: string
[LocalStorageKey.EthAuthSettings]: string
}
Expand All @@ -53,12 +52,9 @@ export function sequenceWallet(params: BaseSequenceConnectorOptions) {
id: 'sequence',
name: 'Sequence',
type: sequenceWallet.type,
params,

async setup() {
if (projectAccessKey) {
await config.storage?.setItem(LocalStorageKey.ProjectAccessKey, projectAccessKey)
}

const provider = await this.getProvider()
provider.on('chainChanged', (chainIdHex: string) => {
config.emitter.emit('change', { chainId: normalizeChainId(chainIdHex) })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ sequenceWaasWallet.type = 'sequence-waas' as const

export function sequenceWaasWallet(params: BaseSequenceWaasConnectorOptions) {
type Provider = SequenceWaasProvider
type Properties = { sequenceWaas: SequenceWaaS; sequenceWaasProvider: SequenceWaasProvider }
type Properties = {
sequenceWaas: SequenceWaaS
sequenceWaasProvider: SequenceWaasProvider
params: BaseSequenceWaasConnectorOptions
}
type StorageItem = {
[LocalStorageKey.WaasSessionHash]: string
[LocalStorageKey.WaasActiveLoginType]: string
Expand Down Expand Up @@ -65,6 +69,7 @@ export function sequenceWaasWallet(params: BaseSequenceWaasConnectorOptions) {
type: sequenceWaasWallet.type,
sequenceWaas,
sequenceWaasProvider,
params,

async setup() {
if (params.googleClientId) {
Expand Down

0 comments on commit 7327cee

Please sign in to comment.