Skip to content
Snippets Groups Projects
Verified Commit 74e82943 authored by Mateusz Tyszczak's avatar Mateusz Tyszczak :scroll:
Browse files

Do not request private key when not needed in encodeBuffer

parent 35ea5d2d
No related branches found
No related tags found
No related merge requests found
{
"name": "@hiveio/metamask-snap",
"version": "1.3.1",
"version": "1.3.2",
"description": "Hive wallet extension allowing you to sign transactions using keys derived from your Metamask wallet",
"main": "./dist/bundle.js",
"files": [
......
{
"version": "1.3.1",
"version": "1.3.2",
"description": "Hive wallet extension allowing you to sign transactions using keys derived from your Metamask wallet",
"proposedName": "Hive Wallet",
"repository": {
......@@ -7,7 +7,7 @@
"url": "git+https://gitlab.syncad.com/hive/metamask-snap.git"
},
"source": {
"shasum": "8OiCG07i8jcpwdDezZyvzyBWJftYgWno1hcNL/gUWjc=",
"shasum": "nuk2Nauuy9DjK6k1141Yyd2Uh9dRtBlGrjSMEDGw92c=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
......
import type { KeyIndex } from "../rpc";
import { getWax } from "../hive/wax";
import { importPrivateKeyToWallet } from "../utils/key-management";
import { getPublicKeyWifFromKeyIndex, importPrivateKeyToWallet } from "../utils/key-management";
import { getTempWallet } from "../hive/beekeeper";
import { ConfirmBufferSign } from "./dialogs/ConfirmBufferSign";
......@@ -21,7 +21,7 @@ export const encodeBuffer = async (origin: string, buffer: string, firstKey: Key
if(typeof secondKey === "string")
publicKeySecondKey = secondKey;
else if (secondKey)
publicKeySecondKey = await importPrivateKeyToWallet(wallet, secondKey);
publicKeySecondKey = await getPublicKeyWifFromKeyIndex(secondKey);
const response = wax.encrypt(wallet, buffer, publicKeyFirstKey, publicKeySecondKey);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment