diff --git a/src/extension/manifest.json b/src/extension/manifest.json
index d3f17c6..a8eadc6 100644
--- a/src/extension/manifest.json
+++ b/src/extension/manifest.json
@@ -23,7 +23,6 @@
"minimum_chrome_version": "93",
"permissions": [
- "tabs",
"notifications",
"storage",
"alarms",
diff --git a/src/views/HomeTab.vue b/src/views/HomeTab.vue
index a06b0e1..43d6fd6 100644
--- a/src/views/HomeTab.vue
+++ b/src/views/HomeTab.vue
@@ -37,6 +37,17 @@
Selected Network ID: {{ selectedNetwork?.chainId }}
Select
+
+ View Address on {{ selectedNetwork.explorer }}
+
+
-
-
-
-
- Close
-
- Select
-
-
-
-
-
-
- Accounts
-
+
+
+
+
+ Close
+
+ Select
+
+
+
+
+
+
+ Accounts
+
-
-
-
- {{ account.name }}
-
-
- {{ account.address }}
-
-
-
+
+
+
+ {{ account.name }}
+
+
+ {{ account.address }}
+
-
-
-
-
-
-
- Close
-
- Select
-
-
-
-
-
-
- Networks
-
+
+
+
+
+
+
+
+
+ Close
+
+ Select
+
+
+
+
+
+
+ Networks
+
-
-
-
- {{ network.name }}
-
-
- {{ network.rpc }}
-
-
-
+
+
+
+ {{ network.name }}
+
+
+ {{ network.rpc }}
+
-
-
+
+
+
+
@@ -168,12 +175,13 @@ import {
replaceNetworks,
getUrl,
saveSelectedNetwork,
- numToHexStr
+ numToHexStr,
+ openTab,
} from "@/utils/platform";
import type { Network, Account, Networks } from "@/extension/types";
import { mainNets } from "@/utils/networks";
import router from "@/router";
-import { triggerListner } from '@/extension/listners'
+import { triggerListner } from "@/extension/listners";
import { copyOutline } from "ionicons/icons";
@@ -243,19 +251,21 @@ export default defineComponent({
router.push("/tabs/add-network");
};
-
const changeSelectedAccount = async (address: string) => {
loading.value = true;
- const findIndex = accounts.value.findIndex(a => a.address == address)
+ const findIndex = accounts.value.findIndex((a) => a.address == address);
if (findIndex > -1) {
- selectedAccount.value = accounts.value[findIndex]
- await saveSelectedAccount(selectedAccount.value)
+ selectedAccount.value = accounts.value[findIndex];
+ await saveSelectedAccount(selectedAccount.value);
// console.log(({ [address]: accounts.value[address], ...accounts.value}))
accounts.value.splice(findIndex, 1);
- accounts.value.splice(0,0,selectedAccount.value)
- const newAccounts = [...accounts.value]
- await replaceAccounts(newAccounts)
- triggerListner('accountsChanged', newAccounts.map(a => a.address))
+ accounts.value.splice(0, 0, selectedAccount.value);
+ const newAccounts = [...accounts.value];
+ await replaceAccounts(newAccounts);
+ triggerListner(
+ "accountsChanged",
+ newAccounts.map((a) => a.address)
+ );
}
accountsModal.value = false;
loading.value = false;
@@ -269,7 +279,7 @@ export default defineComponent({
Object.assign({ [chainId]: networks.value[chainId] }, networks.value)
);
selectedNetwork.value = networks.value[chainId];
- triggerListner('chainChanged', numToHexStr(chainId))
+ triggerListner("chainChanged", numToHexStr(chainId));
}
networksModal.value = false;
loading.value = false;
@@ -293,6 +303,7 @@ export default defineComponent({
networksModal,
mainNets,
getUrl,
+ openTab,
};
},
});