Skip to content

Commit fbc98f4

Browse files
committed
merge conflict and alignment issue
2 parents 5f3ec29 + 521cb8d commit fbc98f4

17 files changed

Lines changed: 1048 additions & 416 deletions

File tree

devcon-api/src/controllers/account.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -731,12 +731,12 @@ async function SendAccreditationEmail(req: Request, res: Response) {
731731
// #swagger.ignore = true
732732
// Private route: requires apiKey
733733

734-
const { email, name, insuranceLink } = req.body
734+
const { email, name, accreditationLink } = req.body
735735

736-
if (!email || !name || !insuranceLink) {
736+
if (!email || !name || !accreditationLink) {
737737
return res.status(400).send({
738738
code: 400,
739-
message: 'Missing required fields: email, name, insuranceLink'
739+
message: 'Missing required fields: email, name, accreditationLink'
740740
})
741741
}
742742

@@ -745,13 +745,13 @@ async function SendAccreditationEmail(req: Request, res: Response) {
745745
const { sendAccreditationConfirmationEmail } = await import('@/services/email')
746746

747747
// Send the accreditation confirmation email
748-
const success = await sendAccreditationConfirmationEmail(email, name, insuranceLink)
748+
const success = await sendAccreditationConfirmationEmail(email, name, accreditationLink)
749749

750750
if (success) {
751751
return res.status(200).send({
752752
code: 200,
753753
message: 'Accreditation confirmation email sent successfully',
754-
data: { email, name, insuranceLink }
754+
data: { email, name, accreditationLink }
755755
})
756756
} else {
757757
return res.status(500).send({

devcon-api/src/services/email-templates.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
]
3535
},
3636
"accreditationConfirmation": {
37-
"html": "<!doctype html><html><head><meta name='viewport' content='width=device-width'><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Devcon.org - Accreditation Confirmed</title><style>/* ------------------------------------- RESPONSIVE AND MOBILE FRIENDLY STYLES ------------------------------------- */@media only screen and (max-width: 620px) {table[class=body] h1 {font-size: 28px !important; margin-bottom: 10px !important;}table[class=body] p, table[class=body] ul, table[class=body] ol, table[class=body] td, table[class=body] span, table[class=body] a {font-size: 16px !important;}table[class=body] .wrapper, table[class=body] .article {padding: 10px !important;}table[class=body] .content {padding: 0 !important;}table[class=body] .container {padding: 0 !important; width: 100% !important;}table[class=body] .main {border-left-width: 0 !important; border-radius: 0 !important; border-right-width: 0 !important;}table[class=body] .btn table {width: 100% !important;}table[class=body] .btn a {width: 100% !important;}table[class=body] .img-responsive {height: auto !important; max-width: 100% !important; width: auto !important;}}/* ------------------------------------- PRESERVE THESE STYLES IN THE HEAD ------------------------------------- */@media all {.ExternalClass {width: 100%;}.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;}#MessageViewBody a {color: inherit; text-decoration: none; font-size: inherit; font-family: inherit; font-weight: inherit; line-height: inherit;}.btn-primary table td:hover {background-color: #F8F8F8 !important;}.btn-primary a {background-color: #FFFFFF !important; border-color: #30354b !important; border-style: solid; border-width: 2px; color: #30354b;}.btn-primary a:hover {background-color: #F8F8F8 !important; border-color: #30354b !important; border-style: solid; border-width: 2px;}}</style></head><body style='background-color: #F8F8F8; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;'><table role='presentation' border='0' cellpadding='0' cellspacing='0' class='body' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #F8F8F8;'><tr><td style='font-family: sans-serif; font-size: 14px; vertical-align: top;'>&nbsp;</td><td class='container' style='font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; Margin: 0 auto; max-width: 580px; padding: 10px; width: 580px;'><div class='content' style='box-sizing: border-box; display: block; Margin: 0 auto; max-width: 580px; padding: 10px;'><!-- START LOGO --><div class='footer' style='clear: both; Margin-top: 10px; text-align: center; width: 100%; padding-bottom: 15px;'><img src='https://devconnect.org/devconnect-arg/devconnect-arg-logo.png' alt='Devconnect.org' width='200' height='62' border='0' style='border:0;'></div><!-- END FOOTER --><!-- START CENTERED WHITE CONTAINER --><table role='presentation' class='main' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background: #ffffff; border-radius: 3px;'><!-- START MAIN CONTENT AREA --><tr><td class='wrapper' style='font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;color: #30354b;'><table role='presentation' border='0' cellpadding='0' cellspacing='0' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;'><tr><td style='font-family: sans-serif; font-size: 14px; vertical-align: top;'><h2 style='font-family: sans-serif; font-weight: normal; margin: 0; Margin-bottom: 15px;'>🎉 Accreditation Confirmed!</h2><p style='font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;'>Dear {%Name%},<br/><br/>Congratulations! Your accreditation has been confirmed. You can now access your insurance information using the link below.<br/></p><table role='presentation' border='0' cellpadding='0' cellspacing='0' class='btn btn-primary' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; box-sizing: border-box;'><tbody><tr><td align='center' style='font-family: sans-serif; font-size: 14px; vertical-align: top; padding-bottom: 15px;'><table role='presentation' border='0' cellpadding='0' cellspacing='0' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;'><tbody><tr><td style='font-family: sans-serif; font-size: 14px; vertical-align: top; background-color: #30354b; text-align: center;'><a href='{%InsuranceLink%}' target='_blank' style='display: inline-block; box-sizing: border-box; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-transform: capitalize;'>View Insurance Details</a></td></tr></tbody></table></td></tr></tbody></table><p style='font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;'>If you have any questions, please don't hesitate to contact our support team.<br/></p></td></tr></table></td></tr><!-- END MAIN CONTENT AREA --></table><!-- START FOOTER --><div class='footer' style='clear: both; Margin-top: 10px; text-align: center; width: 100%;'><table role='presentation' border='0' cellpadding='0' cellspacing='0' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;'><tr><td class='content-block' style='font-family: sans-serif; vertical-align: top; padding-top: 10px; font-size: 12px; color: #9098a1; text-align: center;'><span class='apple-link' style='color: #9098a1; font-size: 12px; text-align: center;'>You are receiving this email as a service notification from devconnect.org.</span><br/>It's not possible to unsubscribe from these emails.</td></tr><tr><td class='content-block' style='font-family: sans-serif; vertical-align: top; padding-top: 10px; font-size: 12px; color: #9098a1; text-align: center;'>If you didn't expect this email, please contact us at <a href='mailto:support@devcon.org' style='text-decoration: underline; color: #9098a1; font-size: 12px; text-align: center;'>support@devcon.org</a>.</td></tr><tr><td class='content-block powered-by' style='font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #9098a1; text-align: center;'>© 2025 — Devconnect.org</td></tr></table></div><!-- END FOOTER --><!-- END CENTERED WHITE CONTAINER --></div></td><td style='font-family: sans-serif; font-size: 14px; vertical-align: top;'>&nbsp;</td></tr></table></body></html>",
37+
"html": "<!doctype html><html><head><meta name='viewport' content='width=device-width'><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Devcon.org - Accreditation Confirmed</title><style>/* ------------------------------------- RESPONSIVE AND MOBILE FRIENDLY STYLES ------------------------------------- */@media only screen and (max-width: 620px) {table[class=body] h1 {font-size: 28px !important; margin-bottom: 10px !important;}table[class=body] p, table[class=body] ul, table[class=body] ol, table[class=body] td, table[class=body] span, table[class=body] a {font-size: 16px !important;}table[class=body] .wrapper, table[class=body] .article {padding: 10px !important;}table[class=body] .content {padding: 0 !important;}table[class=body] .container {padding: 0 !important; width: 100% !important;}table[class=body] .main {border-left-width: 0 !important; border-radius: 0 !important; border-right-width: 0 !important;}table[class=body] .btn table {width: 100% !important;}table[class=body] .btn a {width: 100% !important;}table[class=body] .img-responsive {height: auto !important; max-width: 100% !important; width: auto !important;}}/* ------------------------------------- PRESERVE THESE STYLES IN THE HEAD ------------------------------------- */@media all {.ExternalClass {width: 100%;}.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;}#MessageViewBody a {color: inherit; text-decoration: none; font-size: inherit; font-family: inherit; font-weight: inherit; line-height: inherit;}.btn-primary table td:hover {background-color: #F8F8F8 !important;}.btn-primary a {background-color: #FFFFFF !important; border-color: #30354b !important; border-style: solid; border-width: 2px; color: #30354b;}.btn-primary a:hover {background-color: #F8F8F8 !important; border-color: #30354b !important; border-style: solid; border-width: 2px;}}</style></head><body style='background-color: #F8F8F8; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;'><table role='presentation' border='0' cellpadding='0' cellspacing='0' class='body' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #F8F8F8;'><tr><td style='font-family: sans-serif; font-size: 14px; vertical-align: top;'>&nbsp;</td><td class='container' style='font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; Margin: 0 auto; max-width: 580px; padding: 10px; width: 580px;'><div class='content' style='box-sizing: border-box; display: block; Margin: 0 auto; max-width: 580px; padding: 10px;'><!-- START LOGO --><div class='footer' style='clear: both; Margin-top: 10px; text-align: center; width: 100%; padding-bottom: 15px;'><img src='https://devconnect.org/devconnect-arg/devconnect-arg-logo.png' alt='Devconnect.org' width='200' height='62' border='0' style='border:0;'></div><!-- END FOOTER --><!-- START CENTERED WHITE CONTAINER --><table role='presentation' class='main' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background: #ffffff; border-radius: 3px;'><!-- START MAIN CONTENT AREA --><tr><td class='wrapper' style='font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;color: #30354b;'><table role='presentation' border='0' cellpadding='0' cellspacing='0' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;'><tr><td style='font-family: sans-serif; font-size: 14px; vertical-align: top;'><h2 style='font-family: sans-serif; font-weight: normal; margin: 0; Margin-bottom: 15px;'>🎉 Accreditation Confirmed!</h2><p style='font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;'>Dear {%Name%},<br/><br/>Congratulations! Your accreditation has been confirmed. You can now access your insurance information using the link below.<br/></p><table role='presentation' border='0' cellpadding='0' cellspacing='0' class='btn btn-primary' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; box-sizing: border-box;'><tbody><tr><td align='center' style='font-family: sans-serif; font-size: 14px; vertical-align: top; padding-bottom: 15px;'><table role='presentation' border='0' cellpadding='0' cellspacing='0' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;'><tbody><tr><td style='font-family: sans-serif; font-size: 14px; vertical-align: top; background-color: #30354b; text-align: center;'><a href='{%AccreditationLink%}' target='_blank' style='display: inline-block; box-sizing: border-box; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-transform: capitalize;'>View Accreditation Details</a></td></tr></tbody></table></td></tr></tbody></table><p style='font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;'>If you have any questions, please don't hesitate to contact our support team.<br/></p></td></tr></table></td></tr><!-- END MAIN CONTENT AREA --></table><!-- START FOOTER --><div class='footer' style='clear: both; Margin-top: 10px; text-align: center; width: 100%;'><table role='presentation' border='0' cellpadding='0' cellspacing='0' style='border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;'><tr><td class='content-block' style='font-family: sans-serif; vertical-align: top; padding-top: 10px; font-size: 12px; color: #9098a1; text-align: center;'><span class='apple-link' style='color: #9098a1; font-size: 12px; text-align: center;'>You are receiving this email as a service notification from devconnect.org.</span><br/>It's not possible to unsubscribe from these emails.</td></tr><tr><td class='content-block' style='font-family: sans-serif; vertical-align: top; padding-top: 10px; font-size: 12px; color: #9098a1; text-align: center;'>If you didn't expect this email, please contact us at <a href='mailto:support@devcon.org' style='text-decoration: underline; color: #9098a1; font-size: 12px; text-align: center;'>support@devcon.org</a>.</td></tr><tr><td class='content-block powered-by' style='font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #9098a1; text-align: center;'>© 2025 — Devconnect.org</td></tr></table></div><!-- END FOOTER --><!-- END CENTERED WHITE CONTAINER --></div></td><td style='font-family: sans-serif; font-size: 14px; vertical-align: top;'>&nbsp;</td></tr></table></body></html>",
3838
"text": [
3939
"# 🎉 Accreditation Confirmed!",
4040
"",
4141
"Dear {%Name%},",
4242
"",
4343
"Congratulations! Your accreditation has been confirmed. You can now access your insurance information using the link below.",
4444
"",
45-
"View Insurance Details - {%InsuranceLink%}",
45+
"View Accreditation Details - {%AccreditationLink%}",
4646
"",
4747
"If you have any questions, please don't hesitate to contact our support team.",
4848
"",

devcon-api/src/services/email.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ export async function sendMail(to: string, template: EmailTemplates, subject: st
4242
export async function sendAccreditationConfirmationEmail(
4343
to: string,
4444
name: string,
45-
insuranceLink: string
45+
accreditationLink: string
4646
) {
4747
const properties = {
4848
Name: name,
49-
InsuranceLink: insuranceLink
49+
AccreditationLink: accreditationLink
5050
}
5151

5252
return sendMail(

devconnect-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"starknet": "^7.6.4",
6767
"tailwind-merge": "^3.3.1",
6868
"usehooks-ts": "^3.1.1",
69-
"viem": "^2.33.0",
69+
"viem": "^2.36.0",
7070
"wagmi": "^2.16.8",
7171
"zustand": "^5.0.7"
7272
},

devconnect-app/src/components/ConnectedWallet.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { useConnectorClient } from 'wagmi';
2020
import { verifySignature, truncateSignature } from '@/utils/signature';
2121
import LinkTicket from './LinkTicket';
2222
import PortfolioModal from './PortfolioModal';
23+
import NetworkSwitcher from './NetworkSwitcher';
2324
import { useUnifiedConnection } from '@/hooks/useUnifiedConnection';
2425
import { ZupassProvider } from '@/context/ZupassProvider';
2526

@@ -592,6 +593,11 @@ export default function ConnectedWallet() {
592593
</div>
593594
</div>
594595
)}
596+
597+
{/* Network Switcher Section */}
598+
<div className="border-t pt-4">
599+
<NetworkSwitcher />
600+
</div>
595601
<div className="flex flex-row gap-2 items-center border-t pt-4">
596602
<Button
597603
onClick={() => open({ view: 'Connect' })}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
'use client';
2+
3+
import { useState } from 'react';
4+
import { getNetworkLogo } from '@/config/networks';
5+
6+
interface NetworkLogoProps {
7+
chainId: number;
8+
size?: 'sm' | 'md' | 'lg';
9+
className?: string;
10+
}
11+
12+
export default function NetworkLogo({
13+
chainId,
14+
size = 'md',
15+
className = ''
16+
}: NetworkLogoProps) {
17+
const [imageError, setImageError] = useState(false);
18+
const [imageLoading, setImageLoading] = useState(true);
19+
20+
const zapperUrl = getNetworkLogo(chainId);
21+
22+
// If no Zapper URL available, show nothing
23+
if (!zapperUrl) {
24+
return null;
25+
}
26+
27+
const handleImageError = () => {
28+
setImageError(true);
29+
setImageLoading(false);
30+
};
31+
32+
const handleImageLoad = () => {
33+
setImageLoading(false);
34+
};
35+
36+
if (imageError) {
37+
return null;
38+
}
39+
40+
return (
41+
<div className={`relative flex items-center justify-center ${className}`}>
42+
<img
43+
src={zapperUrl}
44+
alt={`${chainId} network logo`}
45+
className={`${imageLoading ? 'opacity-0' : 'opacity-100'} transition-opacity duration-200`}
46+
onError={handleImageError}
47+
onLoad={handleImageLoad}
48+
style={{
49+
width: size === 'sm' ? '16px' : size === 'md' ? '24px' : '32px',
50+
height: size === 'sm' ? '16px' : size === 'md' ? '24px' : '32px',
51+
}}
52+
/>
53+
</div>
54+
);
55+
}

0 commit comments

Comments
 (0)