Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions packages/core/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ const authStates: MachineConfig<RootContext, any, RootEvent> = {
}
const result = await provider.connect()
result.match(() => {
callback({
type: "CONNECT_DONE",
data: {
activeProvider: provider,
principal: provider.principal!,
},
})
},
callback({
type: "CONNECT_DONE",
data: {
activeProvider: provider,
principal: provider.principal!,
},
})
},
(e) => {
console.error(e)
callback({
Expand Down Expand Up @@ -260,6 +260,7 @@ type Config = {
ledgerCanisterId?: string
ledgerHost?: string
appName?: string
derivationOrigin?: string;
}

type ClientOptions = {
Expand All @@ -279,6 +280,7 @@ type ClientOptions = {
ledgerHost?: string
appName?: string
customDomain?: string
derivationOrigin?: string;
}
}

Expand Down Expand Up @@ -341,10 +343,10 @@ class Client {
}

const createClient = ({
canisters = {},
providers: p = [],
globalProviderConfig = {},
}: ClientOptions) => {
canisters = {},
providers: p = [],
globalProviderConfig = {},
}: ClientOptions) => {
const config = {
dev: true,
autoConnect: true,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type Config = {
ledgerHost?: string
appName?: string
delegationModes?: Array<DelegationMode>
derivationOrigin?: string
}

let isICX = !!window.icx
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/providers/internet-identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class InternetIdentity implements IConnector {
host: string,
providerUrl: string,
dev: boolean,
derivationOrigin?: string,
}
#identity?: Identity
#principal?: string
Expand Down Expand Up @@ -124,6 +125,7 @@ class InternetIdentity implements IConnector {
identityProvider: this.#config.providerUrl,
onSuccess: resolve,
onError: reject,
derivationOrigin: this.#config.derivationOrigin,
})
})
const identity = this.#client?.getIdentity()
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/providers/nfid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class NFID implements IConnector {
host: string,
providerUrl: string,
dev: Boolean,
derivationOrigin?: string,
}
#identity?: any
#principal?: string
Expand Down Expand Up @@ -129,6 +130,7 @@ class NFID implements IConnector {
identityProvider: this.#config.providerUrl + `/authenticate/?applicationName=${this.#config.appName}`,
onSuccess: resolve,
onError: reject,
derivationOrigin: this.#config.derivationOrigin,
})
})
const identity = this.#client.getIdentity()
Expand Down