diff --git a/app.vue b/app.vue index 5cd504e..d3971a3 100644 --- a/app.vue +++ b/app.vue @@ -1,7 +1,16 @@ diff --git a/helpers/eventBus.ts b/helpers/eventBus.ts index 34c3187..a3a3a11 100644 --- a/helpers/eventBus.ts +++ b/helpers/eventBus.ts @@ -1,5 +1,7 @@ import mitt from "mitt"; -const eventBus = mitt(); +type Events = { + toggleSidebar: void; +}; -export { eventBus }; +export const eventBus = mitt(); diff --git a/layouts/default.vue b/layouts/default.vue index 94f1200..96f312d 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,221 +1,58 @@ diff --git a/package.json b/package.json index 986b5b3..dffd6e9 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,6 @@ "vue-qrcode-reader": "^5.5.4", "vue3-form-wizard": "^0.2.3", "vuetify": "^3.7.0" - } + }, + "packageManager": "yarn@4.5.3+sha512.3003a14012e2987072d244c720506549c1aab73ee728208f1b2580a9fd67b92d61ba6b08fe93f6dce68fd771e3af1e59a0afa28dd242dd0940d73b95fedd4e90" } diff --git a/pages/index.vue b/pages/index.vue index 007c60a..d75bb38 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -154,7 +154,10 @@ import { useSystemHealth } from "@/store/systemHealth"; import { useNotes } from "~/store/notes"; import { formatMoment } from "~/helpers/date"; import { Note, NoteDirection } from "~/lib/notes"; -import { SessionProxyRole } from "@/lib/sessionProxyStorage.ts"; +import { + SessionProxyRole, + sessionProxyRoleOrder, +} from "@/lib/sessionProxyStorage.ts"; import MessagingTab from "~/components/tabs/MessagingTab.vue"; import SwapTab from "~/components/tabs/SwapTab.vue"; import GovTab from "~/components/tabs/GovTab.vue"; @@ -275,16 +278,18 @@ const fetchIncogniteeBalance = async () => { }; const storeSessionProxies = (proxies) => { - for (const proxy of proxies) { - const localKeyring = new Keyring({ type: "sr25519" }); - const seed = hexToU8a(proxy.seed.toString()); - const account = localKeyring.addFromSeed(seed); - accountStore.addSessionProxy( - account, - seed, - proxy.role.toString() as SessionProxyRole, - ); - } + // Add the first entry for each role in proxies to the store + sessionProxyRoleOrder.forEach((role) => { + const proxy = proxies.find((p) => p.role.toString() === role); + if (proxy) { + const localKeyring = new Keyring({ type: "sr25519" }); + const seed = hexToU8a(proxy.seed.toString()); + const account = localKeyring.addFromSeed(seed); + accountStore.addSessionProxy(account, seed, role); + } else { + accountStore.removeProxyForRole(role); + } + }); }; const fetchNetworkStatus = async () => { const promises = []; diff --git a/public/.DS_Store b/public/.DS_Store index 2df834d..fc8968c 100644 Binary files a/public/.DS_Store and b/public/.DS_Store differ diff --git a/public/img/.DS_Store b/public/img/.DS_Store index d5b6d84..e3f8911 100644 Binary files a/public/img/.DS_Store and b/public/img/.DS_Store differ diff --git a/public/img/index/.DS_Store b/public/img/index/.DS_Store index df9314c..dd0a160 100644 Binary files a/public/img/index/.DS_Store and b/public/img/index/.DS_Store differ