Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0xk0stas committed Oct 4, 2023
1 parent 02998d0 commit 8ffa45f
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions src/pages/CreateWallet/CreateWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,7 @@ import { Mnemonic, UserWallet } from "@multiversx/sdk-wallet";
import { getShardOfAddress } from "@multiversx/sdk-dapp/utils/account"
import { useState } from "react";

const CreateWallet = () => {

// const handleClickCreateWallet = () => {
// console.log("WALLET CREATION STARTED");

// let mnemonic = Mnemonic.generate();
// let words = mnemonic.getWords();
// console.log("⚠️ ~ file: CreateWallet.tsx:9 ~ handleClickCreateWal ~ words::::", words)
// let mnemonicString = mnemonic.toString();
// console.log("⚠️ ~ file: CreateWallet.tsx:11 ~ handleClickCreateWal ~ mnemonicString::::", mnemonicString)
// let mnemonicKey = mnemonic.deriveKey();
// console.log("⚠️ ~ file: CreateWallet.tsx:13 ~ handleClickCreateWal ~ mnemonicKey::::", mnemonicKey, mnemonicKey.hex(), mnemonicKey.valueOf())
// let mnemonicPublicKey = mnemonicKey.generatePublicKey();
// console.log("⚠️ ~ file: CreateWallet.tsx:17 ~ handleClickCreateWal ~ mnemonicPublicKey::::", mnemonicPublicKey, mnemonicPublicKey.hex(), mnemonicPublicKey.valueOf(), mnemonicPublicKey.toAddress().bech32())
// let address = mnemonicPublicKey.toAddress().bech32();
// let addressShard = getShardOfAddress(address);
// console.log("⚠️ ~ file: CreateWallet.tsx:20 ~ handleClickCreateWal ~ addressShard::::", "Shard: ", addressShard)

// const password = "password";
// const addressIndex = 0;

// const secretKey = mnemonic.deriveKey(addressIndex);
// const userWallet = UserWallet.fromSecretKey({ secretKey, password });
// const jsonFileContent = userWallet.toJSON();
// const jsonPretty = JSON.stringify(jsonFileContent);

// console.log("⚠️ ~ file: CreateWallet.tsx:22 ~ handleClickCreateWal ~ jsonPretty::::", jsonPretty)
// }
export default function CreateWallet() {

const walletInfoTypes = {
mnemonic: "mnemonic",
Expand Down Expand Up @@ -216,5 +189,3 @@ const CreateWallet = () => {
</>
);
}

export default CreateWallet;

0 comments on commit 8ffa45f

Please sign in to comment.