Skip to content

Commit

Permalink
connect fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushKun committed Jun 30, 2024
1 parent f6118c3 commit a17a880
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
12 changes: 7 additions & 5 deletions next_app/src/components/ao/landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ export default function AOLanding() {
}
useEffect(() => {
if (autoconnect) {
window.arweaveWallet.getActiveAddress().then((addr: string) => {
connectWallet()
}).catch(() => {
setAutoconnect(false);
});
setTimeout(() => {
window.arweaveWallet.getActiveAddress().then((addr: string) => {
connectWallet()
}).catch(() => {
setAutoconnect(false);
});
}, 150);
}
else {
disconnectWallet();
Expand Down
16 changes: 9 additions & 7 deletions next_app/src/components/bottom-statusbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ export default function BottomStatusbar() {
if (autoconnect) {
if (!window.arweaveWallet)
{toast.error("No Arweave wallet found, please install ArConnect and try again");return}
if (!mounted)
window.arweaveWallet.getActiveAddress().then((addr: string) => {
connectWallet()
setMounted(true);
}).catch(() => {
setAutoconnect(false);
});
if (!mounted)
setTimeout(() => {
window.arweaveWallet.getActiveAddress().then((addr: string) => {
connectWallet()
setMounted(true);
}).catch(() => {
setAutoconnect(false);
});
}, 150);
}
else {
disconnectWallet();
Expand Down
2 changes: 1 addition & 1 deletion next_app/src/lib/ao-vars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const APM_ID = "UdPDhw5S7pByV3pVqwyr1qzJ8mR8ktzi9olgsdsyZz4";

export const modules = {
"Default (WASM64)": AOModule,
"SQLite64": "u1Ju_X8jiuq4rX9Nh-ZGRQuYQZgV2MKLMT3CZsykk54",
"WASM32 (old)": "1PdCJiXhNafpJbvC-sjxWTeNzbf9Q_RfUNs84GYoPm0",
SQLite64: "z9iaKddl-rIBinPG7_3-oLAdgIujPPPCbUul5mBSIOk",
"SQLite32 (old)": "GYrbbe0VbHim_7Hi6zrOpHQXrSQz07XNtwCnfbFo2I0",
};

Expand Down

0 comments on commit a17a880

Please sign in to comment.