Skip to content

Commit

Permalink
Merge pull request #153 from AElfProject/feature/ecoEarn-support
Browse files Browse the repository at this point in the history
fix: auto unlock in tg even if cancelAutoLoginInTelegram is true
  • Loading branch information
aelf-lxy authored Sep 12, 2024
2 parents 91a2580 + 12d18e6 commit 4e0a46c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aelf-web-login/wallet-adapter-base",
"version": "0.1.7",
"version": "0.1.8",
"type": "module",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aelf-web-login/wallet-adapter-bridge",
"version": "0.1.7",
"version": "0.1.8",
"type": "module",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down
11 changes: 5 additions & 6 deletions packages/bridge/src/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@ const SignInModal: React.FC<ISignInModalProps> = (props: ISignInModalProps) => {
};

useEffect(() => {
if (cancelAutoLoginInTelegram) {
return;
}
if (!TelegramPlatform.isTelegramPlatform()) {
return;
}
Expand All @@ -270,14 +267,16 @@ const SignInModal: React.FC<ISignInModalProps> = (props: ISignInModalProps) => {
await bridgeInstance.onPortkeyAAUnLock(defaultPin);
return;
}
console.log('begin to excute handleTelegram');
handleTelegram();
if (!cancelAutoLoginInTelegram) {
console.log('begin to excute handleTelegram');
handleTelegram();
}
}
autoAuthInTelegram();
}, [bridgeInstance, cancelAutoLoginInTelegram, defaultPin, handleTelegram]);

bridgeInstance.autoLogin = () => {
initializeTelegram();
// initializeTelegram();
handleTelegram();
};

Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aelf-web-login/wallet-adapter-react",
"version": "0.1.7",
"version": "0.1.8",
"type": "module",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aelf-web-login/utils",
"version": "0.1.7",
"version": "0.1.8",
"type": "module",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallets/night-elf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aelf-web-login/wallet-adapter-night-elf",
"version": "0.1.7",
"version": "0.1.8",
"type": "module",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallets/portkey-aa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aelf-web-login/wallet-adapter-portkey-aa",
"version": "0.1.7",
"version": "0.1.8",
"type": "module",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallets/portkey-discover/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aelf-web-login/wallet-adapter-portkey-discover",
"version": "0.1.7",
"version": "0.1.8",
"type": "module",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down

0 comments on commit 4e0a46c

Please sign in to comment.