Skip to content

Commit

Permalink
Add signature verification flow
Browse files Browse the repository at this point in the history
  • Loading branch information
DOBEN committed Sep 9, 2024
1 parent c5f608d commit cd8f302
Show file tree
Hide file tree
Showing 12 changed files with 159 additions and 533 deletions.
15 changes: 5 additions & 10 deletions compliant-reward-distribution/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { version } from '../package.json';
import './styles.scss';
import { TESTNET, useGrpcClient } from '@concordium/react-components';
import { Admin } from './components/Admin';
import { TweetSubmission } from './components/TweetSubmission';

export const App = () => {
const [provider, setProvider] = useState<WalletProvider>();
Expand Down Expand Up @@ -72,18 +73,12 @@ export const App = () => {
path="/zkProofSubmission"
element={<ZkProofSubmission accountAddress={account} provider={provider} grpcClient={grpcClient} />}
/>
{/* <Route
<Route
path="/tweetSubmission"
element={
<TweetSubmission
activeConnectorError={activeConnectorError}
connection={connection}
accountAddress={account}
/>
}
element={<TweetSubmission signer={account} provider={provider} grpcClient={grpcClient} />}
/>
*/}
<Route path="/Admin" element={<Admin grpcClient={grpcClient} accountAddress={account} />} />

<Route path="/Admin" element={<Admin accountAddress={account} grpcClient={grpcClient} />} />
<Route path="/" element={<div></div>} />
</Routes>
</Router>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function AdminGetAccountData(props: Props) {
const { signer, grpcClient } = props;

interface FormType {
address: string | undefined;
address: string;
}
const { control, register, formState, handleSubmit } = useForm<FormType>({ mode: 'all' });

Expand All @@ -32,10 +32,6 @@ export function AdminGetAccountData(props: Props) {
setAccountData(undefined);

try {
if (!address) {
throw Error(`'address' input field is undefined`);
}

if (!signer) {
throw Error(`'signer' is undefined. Connect your wallet.`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function AdminSetClaimed(props: Props) {
const { signer, grpcClient } = props;

interface FormType {
address: string | undefined;
address: string;
}
const { control, register, formState, handleSubmit } = useForm<FormType>({ mode: 'all' });

Expand All @@ -29,13 +29,7 @@ export function AdminSetClaimed(props: Props) {
setError(undefined);

try {
if (!address) {
setError(`'address' input field is undefined`);
throw Error(`'address' input field is undefined`);
}

if (!signer) {
setError(`'signer' is undefined. Connect your wallet.`);
throw Error(`'signer' is undefined. Connect your wallet.`);
}

Expand Down
Loading

0 comments on commit cd8f302

Please sign in to comment.