Skip to content
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
4 changes: 4 additions & 0 deletions infty/src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ export default {
this.$refs["reg-modal"].show();
});
eventBus.$on("Navbar.connectWalletSuccess", async () => {
Notification.closeAll();
// this.$notify({
// title: "Wallet Connected",
// message: "We have connected to your wallet",
Expand All @@ -577,6 +578,9 @@ export default {
duration: 3000,
});
});
eventBus.$on("Navbar.connectWalletLoading", () => {
this.$store.dispatch("notifyLoading", { msg: "Connecting your wallet!" });
});
},
};
</script>
Expand Down
1 change: 1 addition & 0 deletions infty/src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const store = new Vuex.Store({
}
try {
if (!this.state.address) {
eventBus.$emit("Navbar.connectWalletLoading");
await window.conflux.request({method:"cfx_requestAccounts"}); // connect wallet
const accounts = await window.conflux.request({method:"cfx_accounts"}); // get accounts
console.log(accounts)
Expand Down