Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
0xk0stas committed Oct 4, 2023
1 parent 5d14bfc commit 1528c15
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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}}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
40 changes: 40 additions & 0 deletions src/pages/CreateWallet/CreateWallet.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<>
<h1>Create Wallet:</h1>
<Button
// onClick={() => handleClickCreateWallet}
>
Create
</Button>
</>
);
}

export default CreateWallet;
2 changes: 2 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useSession, signIn, signOut } from "next-auth/react"
import { Button, Box } from "@chakra-ui/react";
import CreateWallet from "./CreateWallet/CreateWallet";

export default function Home() {

Expand All @@ -20,6 +21,7 @@ export default function Home() {
>
Sign Out
</Button>
<CreateWallet/>
</Box>
)
}
Expand Down

0 comments on commit 1528c15

Please sign in to comment.