Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HadiKhai committed Nov 12, 2024
1 parent fad4731 commit 0f4f87a
Show file tree
Hide file tree
Showing 13 changed files with 110 additions and 240 deletions.
1 change: 0 additions & 1 deletion apps/console/src/app/api/signin/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { SignInResponse } from '@justaname.id/sdk';
export const POST = async (req: NextRequest) => {
const { message, signature } = await req.json();

console.log(message, signature);
const session = await Session.fromRequest(req);

let signInMessage: SignInResponse;
Expand Down
5 changes: 3 additions & 2 deletions apps/console/src/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ import {
trustWallet,
} from '@rainbow-me/rainbowkit/wallets';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import React from 'react';
import { WagmiProvider } from 'wagmi';
import { mainnet, sepolia } from 'wagmi/chains';
import { JustWeb3Provider, JustWeb3ProviderConfig } from '@justweb3/widget';

interface ProviderProps {
children: React.ReactNode;
}

const queryClient = new QueryClient();

export const Providers: React.FC<ProviderProps> = (props) => {
const { wallets } = getDefaultWallets();

Expand Down Expand Up @@ -59,7 +61,6 @@ export const Providers: React.FC<ProviderProps> = (props) => {
dev: process.env.NEXT_PUBLIC_DEV === 'true',
};

const queryClient = new QueryClient();
return (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
Expand Down
5 changes: 3 additions & 2 deletions apps/console/src/layout/navbar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use client';
import Image from 'next/image';
import { JustaNameLogoIcon } from '@justweb3/ui';
import { Button } from '../../components/ui/button';
import Link from 'next/link';

export const Navbar = () => {
return (
<div className="w-screen flex z-[100] pointer-events-auto flex-row items-center justify-between h-[60px] p-2.5 border-b-[1px]">
<Image src="/static/logo.svg" alt="JustName" width={80} height={35} />
{/*<Image src="/static/logo.svg" alt="JustName" width={80} height={35} />*/}
<JustaNameLogoIcon width={80} height={35} />
<Link href={'https://docs.justaname.id'} passHref target="_blank">
<Button variant="secondary">Documentation</Button>
</Link>
Expand Down
1 change: 0 additions & 1 deletion demo/with-rainbow/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const JustaNameConfig: JustWeb3ProviderConfig = {
};

export function App() {
console.log('rainbow', import.meta.env.VITE_APP_CHAIN_ID);
const config = getDefaultConfig({
appName: 'My RainbowKit App',
projectId: 'YOUR_PROJECT_ID',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,11 @@ import {
JustaNameConfigDefaults,
NetworkWithProvider,
} from '@justaname.id/sdk';
import {
QueryClient,
QueryClientProvider,
useMutation,
useQuery,
useQueryClient,
} from '@tanstack/react-query';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { defaultRoutes } from '../constants/default-routes';
import { useMountedAccount } from '../hooks/account/useMountedAccount';
import { useSignMessage } from 'wagmi';

const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 1000 * 60 * 5,
networkMode: 'offlineFirst',
refetchOnWindowFocus: false,
retry: 0,
},
mutations: {
networkMode: 'offlineFirst',
},
},
});

export type JustaNameConfigWithoutDefaultChainId = Omit<
JustaNameConfig,
'defaultChainId'
Expand Down Expand Up @@ -131,30 +111,28 @@ export const JustaNameProvider: FC<JustaNameProviderProps> = ({
}, [configuredNetworks, defaultChain]);

return (
<QueryClientProvider client={queryClient}>
<JustaNameContext.Provider
value={{
justanameConfig: justanameConfig,
// handleJustaNameConfig,
backendUrl: config.backendUrl || '',
config: justanameConfig.config,
dev: justanameConfig.dev,
ensDomains: justanameConfig.ensDomains || [],
selectedEnsDomain,
networks: configuredNetworks,
chainId: defaultChain,
selectedNetwork,
justaname,
routes: {
...defaultRoutes,
...config.routes,
},
}}
>
{children}
{config.signOnMounted && <SignatureOnMounted />}
</JustaNameContext.Provider>
</QueryClientProvider>
<JustaNameContext.Provider
value={{
justanameConfig: justanameConfig,
// handleJustaNameConfig,
backendUrl: config.backendUrl || '',
config: justanameConfig.config,
dev: justanameConfig.dev,
ensDomains: justanameConfig.ensDomains || [],
selectedEnsDomain,
networks: configuredNetworks,
chainId: defaultChain,
selectedNetwork,
justaname,
routes: {
...defaultRoutes,
...config.routes,
},
}}
>
{children}
{config.signOnMounted && <SignatureOnMounted />}
</JustaNameContext.Provider>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ export const JustVerifiedDialog: FC<JustVerifiedDialogProps> = ({
chainId,
});

console.log(verifiedRecords);

const { verifySocial, isVerifyingSocialPending } = useSocialVerification({
onWindowClose: () => {
setSelectedCredential(undefined);
Expand Down
3 changes: 0 additions & 3 deletions packages/@justverified/plugin/src/lib/plugins/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,10 @@ export const JustVerifiedPlugin = (
verificationBackendUrl
);

console.log('verifiableRecords', verifiableRecords);
if (Object.values(verifiableRecords).every((value) => value)) {
console.log('all verified');
return;
}

console.log('not all verified');
pluginApi.setState('verificationOpen', true);

// setTimeout(() => {
Expand Down
87 changes: 27 additions & 60 deletions packages/@justweb3/ui/src/lib/icons/components/logo/JustSomeone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,82 +4,49 @@ export default function JustSomeone(props: SVGProps<SVGSVGElement>) {
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 62 62"
viewBox="0 0 75 76"
{...props}
>
<path
<circle
cx={33.304}
cy={39.593}
r={28.905}
fill="var(--justweb3-primary-color)"
d="M53.927 23.844c3.886 13.169-3.46 27.048-16.41 31-12.948 3.952-26.595-3.52-30.48-16.688-3.887-13.169 3.46-27.048 16.408-31s26.596 3.52 30.481 16.688"
/>
<g filter="url(#just-someone_svg__a)">
<path
fill="#000"
fillRule="evenodd"
d="M37.067 53.315c12.118-3.699 18.993-16.688 15.356-29.012S36.014 4.986 23.896 8.685 4.903 25.373 8.54 37.697s16.408 19.317 28.527 15.618m.45 1.529c12.95-3.952 20.296-17.831 16.41-31S36.393 3.204 23.444 7.156s-20.295 17.831-16.409 31 17.533 20.64 30.482 16.688"
clipRule="evenodd"
/>
</g>
<path
fill="#000"
fillRule="evenodd"
d="M49.457 46.731a24.3 24.3 0 0 1-8.407 4.52c-12.948 3.953-26.595-3.519-30.482-16.687a25.2 25.2 0 0 1 4.47-22.887C7.579 17.849 4.1 28.205 7.038 38.157c3.886 13.168 17.533 20.64 30.481 16.687a24.35 24.35 0 0 0 11.938-8.113"
clipRule="evenodd"
/>
<path
fill="#FDF9FE"
d="M62.004 21.337c0 9.58-7.731 17.346-17.269 17.346s-17.269-7.766-17.269-17.346 7.732-17.346 17.27-17.346 17.268 7.767 17.268 17.346"
stroke="#000"
strokeWidth={1.9}
/>
<path
fill="#000"
fillRule="evenodd"
d="M44.735 37.087c8.689 0 15.7-7.07 15.7-15.75s-7.011-15.75-15.7-15.75-15.7 7.07-15.7 15.75 7.011 15.75 15.7 15.75m0 1.596c9.538 0 17.27-7.766 17.27-17.346S54.271 3.991 44.734 3.991s-17.269 7.767-17.269 17.346 7.732 17.346 17.27 17.346"
d="M56.45 58.46a29.8 29.8 0 0 1-10.25 5.42c-15.792 4.739-32.436-4.22-37.175-20.013-2.956-9.85-.583-20.03 5.454-27.448C5.377 23.82 1.136 36.24 4.717 48.175 9.457 63.967 26.1 72.926 41.892 68.187A29.7 29.7 0 0 0 56.45 58.46"
clipRule="evenodd"
/>
<path
fill="#000"
<circle
cx={50.751}
cy={28.006}
r={19.851}
fill="#fff"
stroke="#000"
strokeWidth={4}
d="M56.166 20.47c0 4.915-3.909 8.841-8.66 8.841s-8.66-3.926-8.66-8.841 3.909-8.841 8.66-8.841 8.66 3.926 8.66 8.84Z"
strokeWidth={1.9}
/>
<circle cx={54.076} cy={26.966} r={13.001} fill="#000" />
<path
fill="#FDF9FE"
d="M42.39 31.744c0 9.58-7.636 17.346-17.056 17.346S8.278 41.324 8.278 31.744s7.636-17.346 17.056-17.346S42.39 22.165 42.39 31.744"
fill="#fff"
d="m58.117 17.255 1.064 3.004 3.004 1.065-3.004 1.064-1.064 3.004-1.065-3.004-3.004-1.064 3.004-1.065z"
/>
<path
fill="#000"
fillRule="evenodd"
d="M25.334 47.494c8.553 0 15.486-7.051 15.486-15.75s-6.933-15.75-15.486-15.75-15.486 7.052-15.486 15.75 6.933 15.75 15.486 15.75m0 1.596c9.42 0 17.056-7.766 17.056-17.346s-7.636-17.346-17.056-17.346S8.278 22.165 8.278 31.744 15.914 49.09 25.334 49.09"
clipRule="evenodd"
<circle
cx={27.034}
cy={40.487}
r={19.851}
fill="#fff"
stroke="#000"
strokeWidth={1.9}
/>
<circle cx={30.414} cy={39.446} r={13.001} fill="#000" />
<path
fill="#000"
stroke="#000"
strokeWidth={4}
d="M36.552 30.878c0 4.953-3.851 8.841-8.447 8.841s-8.447-3.888-8.447-8.841c0-4.954 3.851-8.841 8.447-8.841s8.447 3.887 8.447 8.84Z"
fill="#fff"
d="m33.707 31.135 1.314 3.71 3.711 1.315-3.71 1.315-1.315 3.71-1.315-3.71-3.71-1.315 3.71-1.314z"
/>
<defs>
<filter
id="just-someone_svg__a"
width={48.969}
height={49.802}
x={5.997}
y={6.099}
colorInterpolationFilters="sRGB"
filterUnits="userSpaceOnUse"
>
<feFlood floodOpacity={0} result="BackgroundImageFix" />
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
<feColorMatrix
in="SourceAlpha"
result="hardAlpha"
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
/>
<feOffset dx={10} dy={-10} />
<feComposite in2="hardAlpha" k2={-1} k3={1} operator="arithmetic" />
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0" />
<feBlend in2="shape" result="effect1_innerShadow_1948_2798" />
</filter>
</defs>
</svg>
);
}
Loading

0 comments on commit 0f4f87a

Please sign in to comment.