Skip to content

Commit

Permalink
fix: resolve endorsement typos
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 committed Jun 10, 2024
1 parent 8e7de66 commit a58d327
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 40 deletions.
44 changes: 22 additions & 22 deletions packages/dapp/src/__generated__/ees/graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/dapp/src/app/opengraph-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default async function Image() {
<div tw="flex flex-2 flex-col items-center justify-center">
<img
alt="EES Logo with text"
width={256}
width={384}
src={`${APP_URL}/endorse.png`}
/>
</div>
Expand Down
8 changes: 4 additions & 4 deletions packages/dapp/src/components/EndorseForm/FeeDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { formatEther } from 'viem';
import {
useDonationFeePercentage,
useEndorseEstimateGas,
useEndorsmentPrice,
useEndorsementPrice,
useQuota,
} from '@/hooks';
import { DEFAULT_CHAIN_ID } from '@/lib/contracts';
Expand Down Expand Up @@ -45,7 +45,7 @@ export const FeeDisplay = ({
data: endorsementPrice,
isPending: isEndorsementPricePending,
isError: isEndorsementPriceError,
} = useEndorsmentPrice(chainId ?? DEFAULT_CHAIN_ID);
} = useEndorsementPrice(chainId ?? DEFAULT_CHAIN_ID);

const {
data: feesPerGas,
Expand Down Expand Up @@ -182,7 +182,7 @@ export const FeeDisplay = ({
donationFeeCut,
]);

const EndorsmentPrice = useMemo(() => {
const EndorsementPrice = useMemo(() => {
if (isEndorsementPricePending || isQuotaPending) {
return <Skeleton className="h-4 w-16 bg-gray-400" />;
}
Expand Down Expand Up @@ -260,7 +260,7 @@ export const FeeDisplay = ({
</div>
<div className="flex justify-between items-center">
<p className="text-sm">Endorsement price</p>
<div className="flex items-center">{EndorsmentPrice}</div>
<div className="flex items-center">{EndorsementPrice}</div>
</div>
<div className="flex justify-between items-center">
<p className="text-sm">{`Tip fee (${
Expand Down
4 changes: 2 additions & 2 deletions packages/dapp/src/components/EndorseForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { CheckCircle2, CircleAlert } from 'lucide-react';
import { EXPLORERS } from '@/lib/contracts/explorers';
import { useDebounce } from 'react-use';
import {
useEndorsmentPrice,
useEndorsementPrice,
useEndorseEstimateGas,
useDonationFeePercentage,
} from '@/hooks';
Expand Down Expand Up @@ -96,7 +96,7 @@ export const EndorseForm = ({ endorsee }: EndorseeProps) => {
data: endorsementPrice,
isPending: isEndorsementPricePending,
isError: isEndorsementPriceError,
} = useEndorsmentPrice(chainId ?? DEFAULT_CHAIN_ID);
} = useEndorsementPrice(chainId ?? DEFAULT_CHAIN_ID);

const { isPending: isFeesPerGasPending, isError: isFeesPerGasError } =
useEstimateFeesPerGas({
Expand Down
2 changes: 1 addition & 1 deletion packages/dapp/src/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './useQuota';
export * from './useEndorsmentPrice';
export * from './useEndorsementPrice';
export * from './useDonationFeePercentage';
export * from './useEndorseEstimateGas';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CONTRACT_ADDRESSES, EESCore } from '@/lib/contracts';
import { config } from '@/lib/wagmi/config';
import { useReadContract } from 'wagmi';

export const useEndorsmentPrice = (chainId: number) => {
export const useEndorsementPrice = (chainId: number) => {
return useReadContract({
config: config,
address: CONTRACT_ADDRESSES.ees[chainId] as `0x${string}`,
Expand Down
2 changes: 1 addition & 1 deletion packages/subgraphs/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type Endorsement @entity(immutable: true) {
id: Bytes!
from: Account!
to: Account!
endorsmentType: String!
endorsementType: String!
easUid: Bytes!
donationAmount: BigInt!
}
Expand Down
2 changes: 1 addition & 1 deletion packages/subgraphs/src/EESCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function handleEndorse(event: EndorseEvent): void {

endorsement.from = fromAccount.id;
endorsement.to = toAccount.id;
endorsement.endorsmentType = event.params.endorsementType;
endorsement.endorsementType = event.params.endorsementType;
endorsement.easUid = event.params.uid;
endorsement.donationAmount = event.params.donationAmount;

Expand Down
2 changes: 1 addition & 1 deletion packages/subgraphs/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dataSources:
network: sepolia
source:
abi: EESCore
address: "0xe53090918048bd0066c152A89517242893CE9955"
address: "0x306aa8b6640A4Ef12919Ed97b5d85c006DD68796"
startBlock: 6037898
mapping:
kind: ethereum/events
Expand Down
6 changes: 3 additions & 3 deletions packages/subgraphs/tests/ees-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
export function createEndorseEvent(
from: Address,
to: Address,
endorsmentType: string,
endorsementType: string,
easUid: Bytes,
logIndex: BigInt,
donationAmount: BigInt
Expand Down Expand Up @@ -39,8 +39,8 @@ export function createEndorseEvent(

event.parameters.push(
new ethereum.EventParam(
'endorsmentType',
ethereum.Value.fromString(endorsmentType)
'endorsementType',
ethereum.Value.fromString(endorsementType)
)
);

Expand Down
6 changes: 3 additions & 3 deletions packages/subgraphs/tests/ees.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ describe('Describe entity assertions', () => {
test('Endorsement created and stored', () => {
const from = Address.fromString(TEST_ACCOUNTS[0]);
const to = Address.fromString(TEST_ACCOUNTS[1]);
const endorsmentType = 'Developer';
const endorsementType = 'Developer';
const easUid = Bytes.fromHexString(
'0xb03f4550dec1c92b8183d4ffbfe55772165257eb588b3a77bdbfa06a54d0c483'
);

const newEndorseEvent = createEndorseEvent(
from,
to,
endorsmentType,
endorsementType,
easUid,
BigInt.fromI32(1),
BigInt.fromI32(42)
Expand All @@ -69,7 +69,7 @@ describe('Describe entity assertions', () => {
assert.assertNotNull(endorsement);
assert.stringEquals(endorsement!.from.toHex(), from.toHex());
assert.stringEquals(endorsement!.to.toHex(), to.toHex());
assert.stringEquals(endorsement!.endorsmentType, endorsmentType);
assert.stringEquals(endorsement!.endorsementType, endorsementType);
assert.stringEquals(endorsement!.easUid.toHex(), easUid.toHex());
assert.bigIntEquals(endorsement!.donationAmount, BigInt.fromI32(42));

Expand Down

0 comments on commit a58d327

Please sign in to comment.