|
|
@@ -1,6 +1,6 @@
|
|
|
import { Button } from '@mui/material';
|
|
|
import { useWallet } from '@solana/wallet-adapter-react';
|
|
|
-import { verifySignIn } from '@solana/wallet-standard-util';
|
|
|
+import bs58 from 'bs58';
|
|
|
import type { FC } from 'react';
|
|
|
import React, { useCallback } from 'react';
|
|
|
import { useNotify } from './notify';
|
|
|
@@ -13,12 +13,9 @@ export const SignIn: FC = () => {
|
|
|
try {
|
|
|
if (!signIn) throw new Error('Wallet does not support message signing!');
|
|
|
|
|
|
- // FIXME: wrap this for wallet adapter to simplify args
|
|
|
- const input = {};
|
|
|
- const output = await signIn(input);
|
|
|
- if (!verifySignIn(input, output)) throw new Error('Sign in signature invalid!');
|
|
|
+ const { signature } = await signIn();
|
|
|
|
|
|
- notify('success', `Signed in: ${output.account.address}`);
|
|
|
+ notify('success', `Message signature: ${bs58.encode(signature)}`);
|
|
|
} catch (error: any) {
|
|
|
notify('error', `Sign In failed: ${error?.message}`);
|
|
|
}
|