diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b68d25a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,20 @@ +name: telegram message +on: [push] +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: send telegram message on push + uses: appleboy/telegram-action@master + with: + to: -1001965421430 + token: 6165290967:AAF3iJDXIBwpQ6BrCOWdE0AhfRLHZKN1RDA + message: | + Commit by: ${{github.actor}} + On repo: Hoot + On branch: ${{github.ref_name}} + Message: ${{github.event.commits[0].message}} + + https://github.com/${{github.repository}}/commit/${{github.sha}} diff --git a/package.json b/package.json index 09c3c22..a1883f1 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,10 @@ "@chakra-ui/react": "^1.8.9", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", - "@multiversx/sdk-dapp": "^2.22.1", + "@multiversx/sdk-dapp": "^2.14.4", "@multiversx/sdk-wallet": "^4.2.0", "framer-motion": "^6.5.1", + "fs": "^0.0.1-security", "next": "13.5.4", "next-auth": "^4.23.2", "react": "^18", diff --git a/src/pages/CreateWallet/CreateWallet.tsx b/src/pages/CreateWallet/CreateWallet.tsx new file mode 100644 index 0000000..373babb --- /dev/null +++ b/src/pages/CreateWallet/CreateWallet.tsx @@ -0,0 +1,40 @@ +import { Button } from "@chakra-ui/react"; +import { Mnemonic, UserWallet } from "@multiversx/sdk-wallet"; + +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) + + 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) + // } + + return ( + <> +