Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions apps/usermobile/components/EventView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ export default function EventView({

const runner = async () => {
const name = await getEventNameFromId(BigInt(Event));
const split = name.split(' ');
const uuid = split[split.length - 1];
const data = await getEventByUUID(uuid);
const data = await getEventByUUID(name);
setEventData(data as UserEventDetailsResponse);
setTicketTransferable(await checkIfTicketIsTransferable());
};
Expand Down Expand Up @@ -126,10 +124,8 @@ export default function EventView({
// check the user in with the vendor
async function checkin() {
const name = await getEventNameFromId(BigInt(Event));
const split = name.split(' ');
const uuid = split[split.length - 1];

setqrData(await computeQRData(`${Event}`, `${uuid}`));
setqrData(await computeQRData(`${Event}`, `${name}`));
setModalText('Show the vendor this QR code');
setModalVisible(true);
}
Expand Down
4 changes: 1 addition & 3 deletions apps/usermobile/components/TicketListing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ const HomeScreen = () => {
}

// grab the event data
const split = event_names[i].split(' ');
const uuid = split[split.length - 1];
event_data[i] = await getEventByUUID(uuid);
event_data[i] = await getEventByUUID(event_names[i]);
}

return { ids, event_data };
Expand Down
2 changes: 1 addition & 1 deletion apps/userweb/src/components/BuyTicketsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function BuyTicketsModal({

const { primaryWallet } = useDynamicContext();

const NFTMintingDescription = `${Title} at ${EventDatetime} - ${ID}`;
const NFTMintingDescription = `${ID}`;

const Disclaimer = `You are about to buy a ticket for ${NFTMintingDescription}.`;

Expand Down
2 changes: 1 addition & 1 deletion apps/userweb/src/components/ListOfNFTsForEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function ListOfNFTsForEvent({
setTicketId,
setShouldShowBuyModal
}: ListOfNFTsForEventProps) {
const NFTMintingDescription = `${Title} at ${EventDatetime} - ${ID}`;
const NFTMintingDescription = `${ID}`;
const { primaryWallet } = useDynamicContext();
const [NFTs, setNFTs] = useState<bigint[]>([]);
const [metadata, setMetadata] = useState<ReturnedMetadata>();
Expand Down
4 changes: 1 addition & 3 deletions apps/userweb/src/views/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,8 @@ export default function Profile() {
const ticket_data = [] as TicketInfo[];
for (let i = 0; i < event_names.length; i++) {
// grab the event data
const split = event_names[i].split(' ');
const uuid = split[split.length - 1];
const event = (await getEventByUUID(
uuid
event_names[i]
)) as UserEventDetailsResponse;
const event_date = new Date(event.EventDatetime);

Expand Down
6 changes: 2 additions & 4 deletions apps/vendormobile/src/screens/EventDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ export default function EventDetails({
const senderaddress = fields[2];

const event_name = await getEventNameFromId(BigInt(id));
const split = event_name.split(' ');
const uuid = split[split.length - 1];

const tmp = await getNFTsInWallet(senderaddress);
// parse into an array
Expand Down Expand Up @@ -140,7 +138,7 @@ export default function EventDetails({

const valid = await publicViemClient.verifyMessage({
address: senderaddress as Address,
message: uuid,
message: event_name,
signature: signedmessage as Address
});

Expand All @@ -149,7 +147,7 @@ export default function EventDetails({
}

// do the api call
const resp = await checkin(uuid, parseInt(id));
const resp = await checkin(event_name, parseInt(id));

if (!resp) {
return 'Ticket already checked in';
Expand Down
2 changes: 1 addition & 1 deletion apps/vendorweb/src/components/ListOfNFTsForEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function ListOfNFTsForEvent({
EventDatetime,
ID
}: ListOfNFTsForEventProps) {
const NFTMintingDescription = `${Title} at ${EventDatetime} - ${ID}`;
const NFTMintingDescription = `${ID}`;
const { primaryWallet } = useDynamicContext();
const [NFTs, setNFTs] = useState<bigint[]>([]);
const [metadata, setMetadata] =
Expand Down
3 changes: 2 additions & 1 deletion apps/vendorweb/src/components/MintTicketsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function MintTicketsModal({

const { primaryWallet } = useDynamicContext();

const NFTMintingDescription = `${Title} at ${EventDatetime} - ${ID}`;
const NFTMintingDescription = `${ID}`;

const Disclaimer = `You are about to mint ${NumGa} General Admission tickets and ${NumUnique} Unique tickets for ${NFTMintingDescription}.`;

Expand Down Expand Up @@ -84,6 +84,7 @@ export default function MintTicketsModal({
Array(NumGa + NumUnique).fill(Basecost)
]
});

const hash = await w.writeContract(request);
passTransactionHash(hash);
await updateEventWithTransactionHash(hash);
Expand Down
2 changes: 1 addition & 1 deletion apps/vendorweb/src/views/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export default function Details({ typestring }: DetailsProps) {
const updateTransactionHash = async (hash: string) => {
setLatestTransactionHash(hash);
setShouldGrayOutPage(true);
const NFTMintingDescription = `${(data as Event)?.Name} at ${(data as Event)?.EventDatetime} - ${(data as Event)?.ID}`;
const NFTMintingDescription = `${(data as Event)?.ID}`;
try {
if (primaryWallet && isEthereumWallet(primaryWallet)) {
const p = await primaryWallet.getPublicClient();
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/src/lib/blockchain.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { polygonAmoy } from 'viem/chains';

export const ContractAddress = '0x41c3462A19a267D8F5690D5b411c4e46aCf0bbcB';
export const ContractAddress = '0x8BE301eD017D23977F98b48CD9D18EaB91C0ae26';

export type ContractGetEventIdsReturnedMetadata = {
min: bigint;
Expand Down