diff --git a/xterio-auth/package.json b/xterio-auth/package.json index 867d526..4302649 100644 --- a/xterio-auth/package.json +++ b/xterio-auth/package.json @@ -1,6 +1,6 @@ { "name": "@xterio-sdk/auth", - "version": "0.0.5", + "version": "0.0.6", "description": "xterio-auth", "author": "xterio platform", "license": "ISC", diff --git a/xterio-wallet/package.json b/xterio-wallet/package.json index fec5834..c579f57 100644 --- a/xterio-wallet/package.json +++ b/xterio-wallet/package.json @@ -1,7 +1,7 @@ { "name": "@xterio-sdk/wallet", "private": false, - "version": "0.0.5", + "version": "0.0.6", "description": "xterio-wallet", "author": "xterio platform", "license": "ISC", diff --git a/xterio-wallet/src/contexts/index.tsx b/xterio-wallet/src/contexts/index.tsx index 4a20188..d8782bc 100644 --- a/xterio-wallet/src/contexts/index.tsx +++ b/xterio-wallet/src/contexts/index.tsx @@ -30,7 +30,12 @@ interface IWalletContextState extends Pick(initState as IWalletContextState) -const WalletContextProvider: React.FC> = ({ children, env, ...rest }) => { +const WalletContextProvider: React.FC> = ({ + children, + env, + enableAuthInit = true, + ...rest +}) => { const [mounted, setMounted] = useState() const [aaAddress, setAaAddress] = useState('') const [userinfo, setUserInfo] = useState(XterioAuth.userinfo) @@ -165,12 +170,15 @@ const WalletContextProvider: React.FC { log('emiter auth userinfo=', info) initLogic(info) }) - }, [env, initLogic, mounted, rest]) + }, [enableAuthInit, env, initLogic, mounted, rest]) return ( { - log('connect pn eoa error', error) + log('connect pn eoa error', error, targetChain, chains) return undefined }) return res diff --git a/xterio-wallet/src/interfaces/types.ts b/xterio-wallet/src/interfaces/types.ts index 7daaa2f..9077ca8 100644 --- a/xterio-wallet/src/interfaces/types.ts +++ b/xterio-wallet/src/interfaces/types.ts @@ -10,6 +10,7 @@ import type { Env, ISSoTokensParams } from '@xterio-sdk/auth' export interface IXterioWalletContextProps extends Partial { env?: Env + enableAuthInit?: boolean } export type PnUserInfoType = import('@particle-network/auth-core').UserInfo | undefined