diff --git a/apps/usermobile/components/EventView.tsx b/apps/usermobile/components/EventView.tsx index 061f98c..2a72170 100644 --- a/apps/usermobile/components/EventView.tsx +++ b/apps/usermobile/components/EventView.tsx @@ -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()); }; @@ -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); } diff --git a/apps/usermobile/components/TicketListing.tsx b/apps/usermobile/components/TicketListing.tsx index e1fa078..03b3a6e 100644 --- a/apps/usermobile/components/TicketListing.tsx +++ b/apps/usermobile/components/TicketListing.tsx @@ -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 }; diff --git a/apps/userweb/src/components/BuyTicketsModal.tsx b/apps/userweb/src/components/BuyTicketsModal.tsx index 22b2091..b21da4a 100644 --- a/apps/userweb/src/components/BuyTicketsModal.tsx +++ b/apps/userweb/src/components/BuyTicketsModal.tsx @@ -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}.`; diff --git a/apps/userweb/src/components/ListOfNFTsForEvent.tsx b/apps/userweb/src/components/ListOfNFTsForEvent.tsx index 9c84720..db05c06 100644 --- a/apps/userweb/src/components/ListOfNFTsForEvent.tsx +++ b/apps/userweb/src/components/ListOfNFTsForEvent.tsx @@ -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([]); const [metadata, setMetadata] = useState(); diff --git a/apps/userweb/src/views/Profile.tsx b/apps/userweb/src/views/Profile.tsx index a39e6ce..8503066 100644 --- a/apps/userweb/src/views/Profile.tsx +++ b/apps/userweb/src/views/Profile.tsx @@ -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); diff --git a/apps/vendormobile/src/screens/EventDetails.tsx b/apps/vendormobile/src/screens/EventDetails.tsx index 9418649..b3f72da 100644 --- a/apps/vendormobile/src/screens/EventDetails.tsx +++ b/apps/vendormobile/src/screens/EventDetails.tsx @@ -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 @@ -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 }); @@ -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'; diff --git a/apps/vendorweb/src/components/ListOfNFTsForEvent.tsx b/apps/vendorweb/src/components/ListOfNFTsForEvent.tsx index 60e9290..e38e7e5 100644 --- a/apps/vendorweb/src/components/ListOfNFTsForEvent.tsx +++ b/apps/vendorweb/src/components/ListOfNFTsForEvent.tsx @@ -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([]); const [metadata, setMetadata] = diff --git a/apps/vendorweb/src/components/MintTicketsModal.tsx b/apps/vendorweb/src/components/MintTicketsModal.tsx index 9dcca1d..eeb1d39 100644 --- a/apps/vendorweb/src/components/MintTicketsModal.tsx +++ b/apps/vendorweb/src/components/MintTicketsModal.tsx @@ -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}.`; @@ -84,6 +84,7 @@ export default function MintTicketsModal({ Array(NumGa + NumUnique).fill(Basecost) ] }); + const hash = await w.writeContract(request); passTransactionHash(hash); await updateEventWithTransactionHash(hash); diff --git a/apps/vendorweb/src/views/Details.tsx b/apps/vendorweb/src/views/Details.tsx index 41d4b46..1724ca4 100644 --- a/apps/vendorweb/src/views/Details.tsx +++ b/apps/vendorweb/src/views/Details.tsx @@ -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(); diff --git a/packages/blockchain/src/lib/blockchain.ts b/packages/blockchain/src/lib/blockchain.ts index d34a86b..e496f37 100644 --- a/packages/blockchain/src/lib/blockchain.ts +++ b/packages/blockchain/src/lib/blockchain.ts @@ -1,6 +1,6 @@ import { polygonAmoy } from 'viem/chains'; -export const ContractAddress = '0x41c3462A19a267D8F5690D5b411c4e46aCf0bbcB'; +export const ContractAddress = '0x8BE301eD017D23977F98b48CD9D18EaB91C0ae26'; export type ContractGetEventIdsReturnedMetadata = { min: bigint;