Skip to content

Commit

Permalink
Introduce Eth Address
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Nov 22, 2023
1 parent 470584a commit 0a13beb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
14 changes: 11 additions & 3 deletions web/src/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ export const Profile: FC<{ name: string }> = ({ name }) => {
canChangeResolver;

const newPayload = {
name: 'v3x.eth',
records: {
name: 'v3x.eth',
avatar: 'https://gateway.pinata.cloud/ipfs/QmVQaX2H1v6Qc7z3j7KQq6Q8Y8X4iCqYQ2V1xZJ6JkqL6Z',
Expand All @@ -145,7 +144,7 @@ export const Profile: FC<{ name: string }> = ({ name }) => {
'com.github': 'v3x.eth',
},
addresses: {
'60': '0x6bf9Ea00A82797bCB5c94ba86fA3f68f6dB090a6',
'60': '0x225f137127d9067788314bc7fcc1f36746a3c3B5',
},
};

Expand All @@ -162,9 +161,11 @@ export const Profile: FC<{ name: string }> = ({ name }) => {
});

const mutateProfile = async () => {
console.log('signing message');
// @ts-ignore
const x = await signMessageAsync();

console.log('sending message');
await postUpdateProfile(name, message, x);
};

Expand Down Expand Up @@ -250,6 +251,12 @@ export const Profile: FC<{ name: string }> = ({ name }) => {
value={data.records['com.github']}
editable={editable}
/>
<Field
label="Ethereum Address"
record="60"
value={data.addresses['60']}
editable={editable}
/>
{DEVELOPER_MODE && (
<Field
label="Resolver"
Expand All @@ -275,7 +282,8 @@ export const Profile: FC<{ name: string }> = ({ name }) => {
hasChanges ? 'btn-primary' : 'btn-disabled'
)}
onClick={() => {
hasChanges && mutateProfile();
mutateProfile();
// hasChanges && mutateProfile();
}}
disabled={!hasChanges}
>
Expand Down
8 changes: 7 additions & 1 deletion web/src/field/Field.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { BrowserSVG, PersonSVG } from '@ensdomains/thorin';
import { FC, ReactNode } from 'react';
import { BsTwitterX } from 'react-icons/bs';
import { FaDiscord, FaGithub, FaTelegramPlane } from 'react-icons/fa';
import {
FaDiscord,
FaEthereum,
FaGithub,
FaTelegramPlane,
} from 'react-icons/fa';

const field_record_to_icon: Record<string, ReactNode> = {
'com.twitter': <BsTwitterX />,
Expand All @@ -10,6 +15,7 @@ const field_record_to_icon: Record<string, ReactNode> = {
url: <BrowserSVG />,
'com.discord': <FaDiscord />,
'com.github': <FaGithub />,
60: <FaEthereum />,
};

const field_placeholders: Record<string, string> = {
Expand Down

0 comments on commit 0a13beb

Please sign in to comment.