@@ -21,19 +30,34 @@ const accountStore = useAccountStore();
class="dropdown-content card w-[400px] shadow bg-primary text-primary-content"
>
-
{{ t("common.public key") }}
+ {{ t("common.wallet address") }}
+ {{ accountStore.address }}
+ {{ t("common.public key") }}
{{ accountStore.publicKey }}
-
+
+
+
+
-
+
diff --git a/src/store/modules/account.ts b/src/store/modules/account.ts
index ae1c59b..df40671 100644
--- a/src/store/modules/account.ts
+++ b/src/store/modules/account.ts
@@ -4,13 +4,15 @@ import { accountType } from "./types";
import { getPublicKey } from "nostr-tools";
// import { storageLocal } from "@pureadmin/utils";
import { getUserHubContract } from "@/utils/contract/user-hub";
-import { handleEtherError, decrypt } from "@/utils/shared";
+import { handleEtherError, decrypt, md5 } from "@/utils/shared";
import { getWalletAddres, signMessage } from "@/utils/contract/web3";
+import { storageSession } from "@pureadmin/utils";
export const useAccountStore = defineStore({
id: "account-settings",
state: (): accountType => ({
name: "",
+ address: "",
publicKey: "",
privateKey: "" //storageLocal().getItem("sk") || ""
}),
@@ -32,6 +34,9 @@ export const useAccountStore = defineStore({
SET_PRIVATEKEY(key: string) {
this.privateKey = key;
},
+ SET_ADDRESS(key: string) {
+ this.address = key;
+ },
async init(): Promise