diff --git a/packages/base/package.json b/packages/base/package.json index 4c8a6cb7..8cd63ffd 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -1,6 +1,6 @@ { "name": "@aelf-web-login/wallet-adapter-base", - "version": "0.1.3-alpha.7", + "version": "0.1.3-alpha.8", "type": "module", "main": "dist/esm/index.js", "module": "dist/esm/index.js", diff --git a/packages/bridge/package.json b/packages/bridge/package.json index 177f6382..5e51db5e 100755 --- a/packages/bridge/package.json +++ b/packages/bridge/package.json @@ -1,6 +1,6 @@ { "name": "@aelf-web-login/wallet-adapter-bridge", - "version": "0.1.3-alpha.7", + "version": "0.1.3-alpha.8", "type": "module", "main": "dist/esm/index.js", "module": "dist/esm/index.js", diff --git a/packages/bridge/src/bridge.ts b/packages/bridge/src/bridge.ts index 88be2ff0..0a28283c 100644 --- a/packages/bridge/src/bridge.ts +++ b/packages/bridge/src/bridge.ts @@ -81,7 +81,9 @@ class Bridge { return new Promise((resolve, reject) => { this._loginResolve = resolve; this._loginReject = reject; - if (isPortkeyApp()) { + if (TelegramPlatform.isTelegramPlatform()) { + this.autoLogin(); + } else if (isPortkeyApp()) { console.log('begin to execute onUniqueWalletClick in PortkeyApp'); this.onUniqueWalletClick('PortkeyDiscover'); } else { @@ -237,6 +239,8 @@ class Bridge { }); }; + autoLogin() {} + openLoginPanel() {} closeLoginPanel() {} diff --git a/packages/bridge/src/ui.tsx b/packages/bridge/src/ui.tsx index 467a0def..3fe3ac07 100644 --- a/packages/bridge/src/ui.tsx +++ b/packages/bridge/src/ui.tsx @@ -266,6 +266,10 @@ const SignInModal: React.FC = (props: ISignInModalProps) => { autoAuthInTelegram(); }, [bridgeInstance, handleTelegram]); + bridgeInstance.autoLogin = () => { + handleTelegram(); + }; + bridgeInstance.openLoginPanel = () => { setIsShowWrapper(true); }; diff --git a/packages/react/package.json b/packages/react/package.json index 89414619..0fb1d98c 100755 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@aelf-web-login/wallet-adapter-react", - "version": "0.1.3-alpha.7", + "version": "0.1.3-alpha.8", "type": "module", "main": "dist/esm/index.js", "module": "dist/esm/index.js", diff --git a/packages/utils/package.json b/packages/utils/package.json index bdbd8b21..711a9054 100755 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@aelf-web-login/utils", - "version": "0.1.3-alpha.7", + "version": "0.1.3-alpha.8", "type": "module", "main": "dist/esm/index.js", "module": "dist/esm/index.js", diff --git a/packages/wallets/night-elf/package.json b/packages/wallets/night-elf/package.json index 1b22750e..de8cea48 100755 --- a/packages/wallets/night-elf/package.json +++ b/packages/wallets/night-elf/package.json @@ -1,6 +1,6 @@ { "name": "@aelf-web-login/wallet-adapter-night-elf", - "version": "0.1.3-alpha.7", + "version": "0.1.3-alpha.8", "type": "module", "main": "dist/esm/index.js", "module": "dist/esm/index.js", diff --git a/packages/wallets/portkey-aa/package.json b/packages/wallets/portkey-aa/package.json index c5f23c12..662ede6d 100755 --- a/packages/wallets/portkey-aa/package.json +++ b/packages/wallets/portkey-aa/package.json @@ -1,6 +1,6 @@ { "name": "@aelf-web-login/wallet-adapter-portkey-aa", - "version": "0.1.3-alpha.7", + "version": "0.1.3-alpha.8", "type": "module", "main": "dist/esm/index.js", "module": "dist/esm/index.js", diff --git a/packages/wallets/portkey-discover/package.json b/packages/wallets/portkey-discover/package.json index 92b4d483..0076767f 100755 --- a/packages/wallets/portkey-discover/package.json +++ b/packages/wallets/portkey-discover/package.json @@ -1,6 +1,6 @@ { "name": "@aelf-web-login/wallet-adapter-portkey-discover", - "version": "0.1.3-alpha.7", + "version": "0.1.3-alpha.8", "type": "module", "main": "dist/esm/index.js", "module": "dist/esm/index.js",