Skip to content

Commit

Permalink
Merge pull request nation3#24 from aahna-ashina/refactor-use-owner-ad…
Browse files Browse the repository at this point in the history
…dress-instead-of-signer-address

refactor: use owner address instead of signer address
  • Loading branch information
aahna-ashina authored Nov 30, 2022
2 parents 994d43a + 5055976 commit 7b84cd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export function CitizenList() {
<HomeCard
key={citizen.passport_id}
passportId={citizen.passport_id}
ethAddress={citizen.eth_address}
ethAddress={citizen.owner_address}
ensName={citizen.ens_name}
votingPower={citizen.voting_power}
/>
Expand Down
10 changes: 5 additions & 5 deletions pages/profile/[passportId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function NationCredChart({ profile }: any) {
colorGradient.addColorStop(1, 'rgba(213, 163, 152, 0.8)')

// Fetch data from datasets repo
const sourceCredFileUrl: string = `https://raw.githubusercontent.com/nation3/nationcred-datasets/main/data-sources/sourcecred/output/sourcecred-${profile.ethAddress}.csv`
const sourceCredFileUrl: string = `https://raw.githubusercontent.com/nation3/nationcred-datasets/main/data-sources/sourcecred/output/sourcecred-${profile.ownerAddress}.csv`
console.info('Fetching SourceCred data:', sourceCredFileUrl)
Papa.parse(sourceCredFileUrl, {
download: true,
Expand Down Expand Up @@ -141,7 +141,7 @@ export function DeworkChart({ profile }: any) {
colorGradient.addColorStop(1, 'rgba(231, 88, 143, 0.2)')

// Fetch data from datasets repo
const deworkFileUrl: string = `https://raw.githubusercontent.com/nation3/nationcred-datasets/main/data-sources/dework/output/dework-${profile.ethAddress}.csv`
const deworkFileUrl: string = `https://raw.githubusercontent.com/nation3/nationcred-datasets/main/data-sources/dework/output/dework-${profile.ownerAddress}.csv`
console.info('Fetching Dework data:', deworkFileUrl)
Papa.parse(deworkFileUrl, {
download: true,
Expand Down Expand Up @@ -199,14 +199,14 @@ const ProfilePage: NextPage = ({ profile }: any) => {
<>
<div className="flex">
{profile.ensName ? (
<img className="mask mask-circle h-24 w-24" src={`https://cdn.stamp.fyi/avatar/eth:${profile.ethAddress}?s=144`} />
<img className="mask mask-circle h-24 w-24" src={`https://cdn.stamp.fyi/avatar/eth:${profile.ownerAddress}?s=144`} />
) : (
<Blockies className="mask mask-circle" seed={profile.ethAddress} size={24} />
<Blockies className="mask mask-circle" seed={profile.ownerAddress} size={24} />
)}

<div className="ml-4 font-semibold">
<h1 className="text-4xl mt-2">
{profile.ensName ? profile.ensName : `${profile.ethAddress.substring(0, 6)}...${profile.ethAddress.slice(-4)}`}
{profile.ensName ? profile.ensName : `${profile.ownerAddress.substring(0, 6)}...${profile.ownerAddress.slice(-4)}`}
</h1>
<h2 className="text-2xl text-gray-400 mt-2">
Citizen #{profile.passportId}
Expand Down

1 comment on commit 7b84cd1

@vercel
Copy link

@vercel vercel bot commented on 7b84cd1 Nov 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.