Skip to content

Commit

Permalink
test message signing
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-vahn committed Apr 16, 2024
1 parent 44a6573 commit 936ae96
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, useEffect, ChangeEvent } from 'react';
import { useState, useEffect } from 'react';
// import { useTonWallet } from '@tonconnect/ui-react';
import WebApp from '@twa-dev/sdk';
import axios from 'axios';
Expand Down Expand Up @@ -134,19 +134,19 @@ function App() {
WebApp.openLink('https://metamask.app.link/');
axios
.post(BRIDGE_URL + '/sign', {
message: testMessage,
message: 'This is a test message.',
account: account,
})
.then((response) => {
setSignedMessage(response.data.signature);
});
};

const [testMessage, setTestMessage] = useState<string>('');
// const [testMessage, setTestMessage] = useState<string>('');

const handleTestMessageChange = (e: ChangeEvent<HTMLInputElement>) => {
setTestMessage(e.target.value);
};
// const handleTestMessageChange = (e: ChangeEvent<HTMLInputElement>) => {
// setTestMessage(e.target.value);
// };

// const triggerTestMessageToChat = () => {
// // Trigger Test Message to Chat
Expand Down Expand Up @@ -309,13 +309,13 @@ function App() {
valueFiat={150}
/>
</div>
<input
{/* <input
type="text"
placeholder="Enter test message here"
onInput={handleTestMessageChange}
></input>
></input> */}
{signedMessage && (
<div>
<div style={{ color: 'black' }}>
<p>Signed Message:</p>
<p>{signedMessage}</p>
</div>
Expand Down

0 comments on commit 936ae96

Please sign in to comment.