Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
5bcb1be
Create architecture docs for supabase auth implementation
ebma Oct 31, 2025
707d11d
Implement Supabase authentication routes and user ID tracking in models
ebma Oct 31, 2025
91fbb4a
Add user model and establish associations with other entities
ebma Oct 31, 2025
d649c08
Add initial configuration files and scripts for project setup
ebma Oct 31, 2025
531564f
Implement authentication flow with email verification and OTP handling
ebma Oct 31, 2025
82e1cd8
Add email and OTP authentication steps to the user flow
ebma Oct 31, 2025
693cff7
Merge branch 'staging' into 882-account-creation-on-vortex
ebma Dec 3, 2025
eee8f73
Update @supabase/supabase-js dependency to use catalog version
ebma Dec 3, 2025
f88ea27
Add userId to registerRamp functionality for enhanced user tracking
ebma Dec 3, 2025
b30a9a8
Fix tax_ids migration to safely rename column and add enum value
ebma Dec 3, 2025
f8a1670
Add userId extraction and handling in quote and ramp routes for impro…
ebma Dec 3, 2025
de2e6bf
Refactor useAuthTokens to accept actorRef and update ramp machine for…
ebma Dec 3, 2025
063ac40
Fix quote not generated if user not logged in
ebma Dec 5, 2025
7cc19e9
Fix email change button not working
ebma Dec 5, 2025
b7ed019
Fix session refresh not working
ebma Dec 5, 2025
5c2443e
Rename authTokens to userSessionTokens
ebma Dec 5, 2025
8b1af39
Move auth before details page
ebma Dec 5, 2025
267cdca
Fix initial auth state
ebma Dec 5, 2025
b0cf245
Change stepper
ebma Dec 5, 2025
e328411
Adjust styling of auth cards
ebma Dec 5, 2025
8bf845b
Add logout feature to details page
ebma Dec 5, 2025
a1c28f5
Fix email not stored
ebma Dec 5, 2025
5a912d4
Adjust magic link template
ebma Dec 5, 2025
06f7958
Adjust magic link template again
ebma Dec 5, 2025
a52726d
Make quote summary always expand over card content itself
ebma Dec 8, 2025
b005ecb
Make quote summary also overlap on other cards
ebma Dec 8, 2025
54aa972
Adjust spacing of card content
ebma Dec 8, 2025
260935f
Refactor layout and improve z-index for QuoteSummary in multiple comp…
ebma Dec 9, 2025
e16f378
Refactor to deduplicate
ebma Dec 9, 2025
0834101
Merge branch 'staging' into 882-account-creation-on-vortex
ebma Dec 9, 2025
901733e
Add revertMigration function to handle specific migration rollbacks
ebma Dec 9, 2025
a6f8d0e
Adjust migrations to properly apply to existing data
ebma Dec 9, 2025
b1d23bf
Add proxy to migrator script
ebma Dec 9, 2025
8841ca9
Make AuthOTPStep responsive
ebma Dec 10, 2025
7f48fac
Fix issue with otp fields not cleared on second error
ebma Dec 10, 2025
44de0e3
Add signup email template
ebma Dec 10, 2025
5cea2fa
Adjust magic_link.html template
ebma Dec 10, 2025
c9e82d0
Adjust 022-add-user-id-to-entities.ts to prevent losing data on down()
ebma Dec 10, 2025
133a5ff
Fix other bug in 022 migration
ebma Dec 10, 2025
c1c0ae0
Fix type issues
ebma Dec 10, 2025
f330aa6
Use cn()
ebma Dec 11, 2025
41c4482
Remove userSessionTokens from ramp machine
ebma Dec 11, 2025
a130238
Refactor layout by removing unnecessary overflow-y-auto classes in Av…
ebma Dec 12, 2025
32ae0cb
Make sure quote is persisted on rampState machine
ebma Dec 12, 2025
d6886d9
Try to fix the spacing between action button and quote summary
ebma Dec 12, 2025
12de1b8
Use different method to position widget action and quote summary
ebma Dec 12, 2025
f251695
Fix access to userId from requests
ebma Dec 12, 2025
cf59dae
Allow rampState userId to be null on database model
ebma Dec 15, 2025
e24ed22
Adjust the spacing below the actions button
ebma Dec 15, 2025
15b845c
Fix stepper phases
ebma Dec 15, 2025
ffb2a70
Remove automatic scroll on quote summary
ebma Dec 15, 2025
eaae3e5
Fix issue with quote not set on ramp state when starting on email flow
ebma Dec 15, 2025
c8e91a1
Fix action button alignment in AveniaLivenessStep
ebma Dec 15, 2025
daa2475
Rename 'users' table to 'profiles' to adhere to Supabase best practice
ebma Dec 15, 2025
5197de3
Merge architecture documents for auth feature
ebma Dec 15, 2025
7211e32
Initial plan
Copilot Dec 15, 2025
5f979be
Address code review comments: logging, PostgreSQL compatibility, rate…
Copilot Dec 15, 2025
b8125dd
Fix code review issues: truncate auth header in logs, use ref to prev…
Copilot Dec 15, 2025
8a8169c
Refactor URL token handling in authentication flow to set Supabase se…
ebma Dec 15, 2025
20d0c5f
Refactor email input form structure and styling for improved accessib…
ebma Dec 15, 2025
ed92096
Replace console log with logger
ebma Dec 15, 2025
22671a6
Refactor authentication token handling to use camelCase properties fo…
ebma Dec 15, 2025
ca868ef
Configure supabase signup template in config
ebma Dec 16, 2025
70568bd
Merge pull request #969 from pendulum-chain/copilot/sub-pr-912
ebma Dec 16, 2025
2fbed83
Add doc for supabase auth
ebma Dec 23, 2025
64697b0
Merge branch 'staging' into 882-account-creation-on-vortex
ebma Jan 9, 2026
95d2f33
Fix type issues after merge
ebma Jan 12, 2026
54281ec
Fix email not set correctly on ramp state
ebma Jan 12, 2026
d2de645
Fix issue with local templates
ebma Jan 12, 2026
1e969d4
Enhance authentication middleware and enforce user authentication for…
ebma Jan 12, 2026
91ac142
Add checkbox for t&c
ebma Jan 12, 2026
f703c9d
Refactor KYC user ID handling to allow null values and update routes …
ebma Jan 12, 2026
a8f8592
Allow continuing in 'Enter details' page even if quote expired
ebma Jan 12, 2026
aec2a45
Merge branch 'staging' into 882-account-creation-on-vortex
ebma Jan 13, 2026
c70f78d
Add more translations for other widget cards
ebma Jan 13, 2026
0999560
Fix user can't proceed on 'enter details' page if quote expired
ebma Jan 13, 2026
fc797bd
Change go-back behaviour on payment summary to go back to 'enter deta…
ebma Jan 13, 2026
e5480d0
Remove comments
ebma Jan 13, 2026
35b6b07
implement InputOTP
Sharqiewicz Jan 16, 2026
9175421
Merge branch '882-account-creation-on-vortex' of github.com:pendulum-…
Sharqiewicz Jan 16, 2026
17dc7d5
unify styles of email input
Sharqiewicz Jan 16, 2026
d08cda8
implement hold and submit button
Sharqiewicz Jan 18, 2026
db9ff5d
create TextArea component
Sharqiewicz Jan 18, 2026
6092422
implement useContactForm hook for contact-sales page
Sharqiewicz Jan 18, 2026
bd603ef
create ContactForm
Sharqiewicz Jan 18, 2026
e7f672b
create contact page
Sharqiewicz Jan 18, 2026
78d7a90
connect contact page to routing
Sharqiewicz Jan 18, 2026
5608ff8
implement contact.controller
Sharqiewicz Jan 18, 2026
36f8609
implement contact.service
Sharqiewicz Jan 18, 2026
ee4c7d0
create contact.endpoints
Sharqiewicz Jan 18, 2026
d32722e
create contact.route
Sharqiewicz Jan 18, 2026
88c197d
apply formatting
Sharqiewicz Jan 18, 2026
8730b25
lint fixes
Sharqiewicz Jan 18, 2026
484108d
improve email validation
Sharqiewicz Jan 18, 2026
652d111
improve email validation
Sharqiewicz Jan 18, 2026
2ee1d77
simplify QuoteSummary animations
Sharqiewicz Jan 18, 2026
ed122c6
fix partnerApiKeys type issue
Sharqiewicz Jan 19, 2026
6416dd1
remove unused shadcn config
Sharqiewicz Jan 19, 2026
2f2b0d7
lint fixes
Sharqiewicz Jan 19, 2026
075ef08
remove unused vars
Sharqiewicz Jan 19, 2026
849a5ad
remove duplicated inline style for quote summary
Sharqiewicz Jan 20, 2026
ac28722
change quote summary layout height
Sharqiewicz Jan 20, 2026
615cc77
implement numora config and numora input
Sharqiewicz Jan 21, 2026
f159586
improve /contact animations and accessibility
Sharqiewicz Jan 22, 2026
6354caf
refactor contact styles
Sharqiewicz Jan 22, 2026
c0bdb87
improve Hold to Submit error styles
Sharqiewicz Jan 22, 2026
54d4358
fix back button appearance
Sharqiewicz Jan 27, 2026
041e20d
fix skipping kyc back button
Sharqiewicz Jan 27, 2026
11fe720
Merge branch 'staging' into feat/implement-numora
Sharqiewicz Feb 9, 2026
e974c6a
fix numora event handling
Sharqiewicz Feb 9, 2026
ae8f0ae
remove double check
Sharqiewicz Feb 10, 2026
f8a43a7
update numora-react version
Sharqiewicz Feb 10, 2026
12bc9c8
fix package version
Sharqiewicz Feb 10, 2026
af753ea
Merge pull request #1043 from pendulum-chain/chore/bug-fixed-v3
ebma Feb 10, 2026
7023da5
Merge pull request #1027 from pendulum-chain/feat/implement-numora
ebma Feb 10, 2026
ea842df
optimize ToastPopover by using useSyncExternalStore
Sharqiewicz Feb 10, 2026
1974e17
Update GotQuestions url to the contact page
Sharqiewicz Feb 10, 2026
5c10d38
remove externalUrl icon from contact us /business
Sharqiewicz Feb 10, 2026
ac9a366
Merge branch 'staging' into feat/contact-sales-page
Sharqiewicz Feb 10, 2026
b1ab6d9
Fix issue with layout shift after wrong otp code entered
ebma Feb 10, 2026
03ad840
Merge branch 'staging' into 882-account-creation-on-vortex
ebma Feb 10, 2026
8ec7907
Amend merge
ebma Feb 10, 2026
61af81e
Merge pull request #912 from pendulum-chain/882-account-creation-on-v…
ebma Feb 10, 2026
0d47bb1
Adjust templates
ebma Feb 11, 2026
afb5f24
Add back button to auth email card
ebma Feb 11, 2026
a07b68f
Add document for the ramp machine widget flow
ebma Feb 11, 2026
b076ed8
Fix order of cards and back button behavior
ebma Feb 11, 2026
cae469d
Fix accidental 'go back' after Monerium redirect
ebma Feb 11, 2026
675353b
Hide HistoryMenuButton when not authenticated
ebma Feb 11, 2026
9bba451
Add back button to auth otp step
ebma Feb 11, 2026
cf15c74
Fix link to wrong T&C
ebma Feb 11, 2026
e295f93
Make auth otp input group more responsive
ebma Feb 11, 2026
46c3523
Update ramp-machine-widget-flow.md
ebma Feb 11, 2026
86eb264
Reset error message on GO_BACK action in ramp machine
ebma Feb 11, 2026
78323f1
Update apps/frontend/src/components/menus/SettingsMenu/index.tsx
ebma Feb 11, 2026
40fc24f
Merge pull request #1064 from pendulum-chain/fix-email-prompt-card-order
ebma Feb 12, 2026
f5b0d44
Merge pull request #1019 from pendulum-chain/feat/contact-sales-page
ebma Feb 12, 2026
6aff04b
Add 'GO_BACK' behavior for UpdateRamp state
ebma Feb 12, 2026
264b33e
wip
Sharqiewicz Feb 12, 2026
38d3443
Change reset behavior to go to widget and not landing page
ebma Feb 12, 2026
f4c93a0
Refactor ramp machine to remove unnecessary reloads and enhance reset…
ebma Feb 12, 2026
ebdd427
Use React's useSyncExternalStore to subscribe directly to shared modu…
Sharqiewicz Feb 12, 2026
ba6ee2f
simplify findOnChainToken logic
Sharqiewicz Feb 12, 2026
446b2e8
fixes
Sharqiewicz Feb 13, 2026
d0c3a8c
Merge branch 'staging' into fix/params
Sharqiewicz Feb 13, 2026
f908533
update listener error catch
Sharqiewicz Feb 13, 2026
65d7017
use logger instead of console in dynamicEvmTokens
Sharqiewicz Feb 16, 2026
6da2198
implement enable clicking out the url params from the quote form
Sharqiewicz Feb 17, 2026
d201b8b
unify styles of submit buttons and quote summary
Sharqiewicz Feb 17, 2026
f295256
Unify the Step Footer component
Sharqiewicz Feb 17, 2026
083e8b6
Add language-specific content to email templates for Brazilian users
ebma Feb 18, 2026
6a7ce3c
Add locale support to OTP request for email authentication
ebma Feb 18, 2026
54dd6cf
Adjust templates again
ebma Feb 18, 2026
db0c0ea
Adjust auth card header text
ebma Feb 18, 2026
c0d3138
Initial plan
Copilot Feb 18, 2026
f44857e
Fix missing diacritics in Portuguese text for email templates
Copilot Feb 18, 2026
9390779
Apply suggestions from code review
ebma Feb 18, 2026
9a1de01
Merge branch 'add-language-specific-supabase-template' into copilot/s…
ebma Feb 18, 2026
096a5aa
Merge pull request #1071 from pendulum-chain/copilot/sub-pr-1070
ebma Feb 18, 2026
4f99f79
Change logic so that the language of the browser is used
ebma Feb 19, 2026
422f44e
Capitalize card header text
ebma Feb 19, 2026
cf132e5
adjust QuoteSummaryDetails for mobile
Sharqiewicz Feb 19, 2026
1fa33dd
Add forced fees to FeeComputation for monerium-to-evm onramp engine w…
ebma Feb 20, 2026
6c69f7d
refactor: read URL params via TanStack Router useSearch
Sharqiewicz Feb 20, 2026
9bce48e
feat: add SET_QUOTE event to ramp machine; fix forceSetQuote derivati…
Sharqiewicz Feb 20, 2026
16b9805
fix: native form submit and reduced motion in Avenia components
Sharqiewicz Feb 20, 2026
19bc108
remove unnecessary console logs
Sharqiewicz Feb 20, 2026
4a26fd4
refactor: remove unused icon/network props from CurrencyExchange and …
Sharqiewicz Feb 20, 2026
4e1f1ac
fix: use functional setState in CollapsibleCard toggle
Sharqiewicz Feb 20, 2026
094244b
fix: replace spacer div with bottom padding in quote page
Sharqiewicz Feb 20, 2026
3323673
refactor: move NetworkProvider and EventsProvider into root route
Sharqiewicz Feb 20, 2026
30af3e0
remove incorrect value
Sharqiewicz Feb 20, 2026
51147e4
fix margins
Sharqiewicz Feb 20, 2026
0d4fbdd
fix margings
Sharqiewicz Feb 20, 2026
45e83ee
fix quote fetching for QuoteReady
Sharqiewicz Feb 20, 2026
95ab04b
generate random address for every squidrouter request
Sharqiewicz Feb 20, 2026
4920ef9
Fix wrong width of StepFooter on SummaryStep
ebma Feb 20, 2026
bc4176d
Merge pull request #1065 from pendulum-chain/fix/params
ebma Feb 20, 2026
370b8d3
Merge pull request #1077 from pendulum-chain/1047-processing-fee-is-a…
ebma Feb 20, 2026
9805c27
Merge pull request #1070 from pendulum-chain/add-language-specific-su…
ebma Feb 20, 2026
dd8a1d7
fix button width
Sharqiewicz Feb 20, 2026
9fb5a80
Merge branch 'staging' into fix/params
ebma Feb 20, 2026
b77b42b
Refactor StepFooter component to remove unnecessary flex class
ebma Feb 20, 2026
552752e
Merge pull request #1079 from pendulum-chain/fix/params
ebma Feb 20, 2026
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
5 changes: 5 additions & 0 deletions apps/api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ SANDBOX_ENABLED=false
# Example: openssl rand -base64 32
ADMIN_SECRET=your-secure-admin-secret-here

# Supabase Configuration
SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_ANON_KEY=your-anon-key-here
SUPABASE_SERVICE_KEY=your-service-role-key-here

# Database
DB_HOST=localhost
DB_PORT=5432
Expand Down
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@polkadot/util": "catalog:",
"@polkadot/util-crypto": "catalog:",
"@scure/bip39": "^1.5.4",
"@supabase/supabase-js": "^2.87.1",
"@supabase/supabase-js": "catalog:",
"@vortexfi/shared": "workspace:*",
"@wagmi/core": "catalog:",
"axios": "catalog:",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { generateApiKey, getKeyPrefix, hashApiKey } from "../../middlewares/apiK
*/
export async function createApiKey(req: Request<{ partnerName: string }>, res: Response): Promise<void> {
try {
const partnerName = req.params.partnerName as string;
const partnerName = req.params.partnerName;
const { name, expiresAt } = req.body;

// Verify at least one partner with this name exists and is active
Expand Down Expand Up @@ -78,7 +78,7 @@ export async function createApiKey(req: Request<{ partnerName: string }>, res: R
expiresAt: expirationDate,
isActive: true,
partnerCount: partners.length,
partnerName: partnerName,
partnerName,
publicKey: {
id: publicKeyRecord.id,
key: publicKey, // Can be shown anytime (it's public)
Expand Down Expand Up @@ -112,7 +112,7 @@ export async function createApiKey(req: Request<{ partnerName: string }>, res: R
*/
export async function listApiKeys(req: Request<{ partnerName: string }>, res: Response): Promise<void> {
try {
const partnerName = req.params.partnerName as string;
const partnerName = req.params.partnerName;

// Verify partner exists
const partners = await Partner.findAll({
Expand Down
168 changes: 168 additions & 0 deletions apps/api/src/api/controllers/auth.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
import { Request, Response } from "express";
import User from "../../models/user.model";
import { SupabaseAuthService } from "../services/auth";

export class AuthController {
/**
* Check if email is registered
* GET /api/v1/auth/check-email?email=user@example.com
*/
static async checkEmail(req: Request, res: Response) {
try {
const { email } = req.query;

if (!email || typeof email !== "string") {
return res.status(400).json({
error: "Email is required"
});
}

const exists = await SupabaseAuthService.checkUserExists(email);

return res.json({
action: exists ? "signin" : "signup",
exists
});
} catch (error) {
console.error("Error in checkEmail:", error);
return res.status(500).json({
error: "Failed to check email"
});
}
}

/**
* Request OTP
* POST /api/v1/auth/request-otp
*/
static async requestOTP(req: Request, res: Response) {
try {
const { email, locale } = req.body;

if (!email) {
return res.status(400).json({
error: "Email is required"
});
}

if (locale !== undefined && typeof locale !== "string") {
return res.status(400).json({
error: "Locale must be a string"
});
}

await SupabaseAuthService.sendOTP(email, locale);

return res.json({
message: "OTP sent to email",
success: true
});
} catch (error) {
console.error("Error in requestOTP:", error);
return res.status(500).json({
error: "Failed to send OTP"
});
}
}

/**
* Verify OTP
* POST /api/v1/auth/verify-otp
*/
static async verifyOTP(req: Request, res: Response) {
try {
const { email, token } = req.body;

if (!email || !token) {
return res.status(400).json({
error: "Email and token are required"
});
}

const result = await SupabaseAuthService.verifyOTP(email, token);

// Sync user to local database (upsert)
await User.upsert({
email: email,
id: result.user_id
});

return res.json({
access_token: result.access_token,
refresh_token: result.refresh_token,
success: true,
user_id: result.user_id
});
} catch (error) {
console.error("Error in verifyOTP:", error);
return res.status(400).json({
error: "Invalid OTP or OTP expired"
});
}
}

/**
* Refresh token
* POST /api/v1/auth/refresh
*/
static async refreshToken(req: Request, res: Response) {
try {
const { refresh_token } = req.body;

if (!refresh_token) {
return res.status(400).json({
error: "Refresh token is required"
});
}

const result = await SupabaseAuthService.refreshToken(refresh_token);

return res.json({
access_token: result.access_token,
refresh_token: result.refresh_token,
success: true
});
} catch (error) {
console.error("Error in refreshToken:", error);
return res.status(401).json({
error: "Invalid refresh token"
});
}
}

/**
* Verify token
* POST /api/v1/auth/verify
*/
static async verifyToken(req: Request, res: Response) {
try {
const { access_token } = req.body;

if (!access_token) {
return res.status(400).json({
error: "Access token is required"
});
}

const result = await SupabaseAuthService.verifyToken(access_token);

if (!result.valid) {
return res.status(401).json({
error: "Invalid token",
valid: false
});
}

return res.json({
user_id: result.user_id,
valid: true
});
} catch (error) {
console.error("Error in verifyToken:", error);
return res.status(401).json({
error: "Token verification failed",
valid: false
});
}
}
}
9 changes: 7 additions & 2 deletions apps/api/src/api/controllers/brla.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,14 @@ export const recordInitialKycAttempt = async (
taxId
}
});

if (!taxIdRecord) {
const accountType = isValidCnpj(taxId)
? AveniaAccountType.COMPANY
: isValidCpf(taxId)
? AveniaAccountType.INDIVIDUAL
: undefined;

// Create the entry only if a valid taxId is provided. Otherwise we ignore the request.
if (accountType) {
await TaxId.create({
Expand All @@ -217,7 +219,8 @@ export const recordInitialKycAttempt = async (
initialSessionId: sessionId ?? null,
internalStatus: TaxIdInternalStatus.Consulted,
subAccountId: "",
taxId
taxId,
userId: req.userId ?? null
});
}
}
Expand Down Expand Up @@ -317,14 +320,16 @@ export const createSubaccount = async (
} else {
// The entry should have been created the very first a new cpf/cnpj is consulted.
// We leave this as is for now to avoid breaking changes.

await TaxId.create({
accountType,
initialQuoteId: quoteId,
initialSessionId: sessionId ?? null,
internalStatus: TaxIdInternalStatus.Requested,
requestedDate: new Date(),
subAccountId: id,
taxId: taxId
taxId: taxId,
userId: req.userId ?? null
});
}

Expand Down
32 changes: 32 additions & 0 deletions apps/api/src/api/controllers/contact.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { SubmitContactErrorResponse, SubmitContactResponse } from "@vortexfi/shared";
import type { Request, Response } from "express";
import { config } from "../../config";
import { storeDataInGoogleSpreadsheet } from "./googleSpreadSheet.controller";

enum ContactSheetHeaders {
Timestamp = "timestamp",
FullName = "fullName",
Email = "email",
ProjectName = "projectName",
Inquiry = "inquiry"
}

const CONTACT_SHEET_HEADER_VALUES = [
ContactSheetHeaders.Timestamp,
ContactSheetHeaders.FullName,
ContactSheetHeaders.Email,
ContactSheetHeaders.ProjectName,
ContactSheetHeaders.Inquiry
];

export { CONTACT_SHEET_HEADER_VALUES };

export const submitContact = async (
req: Request,
res: Response<SubmitContactResponse | SubmitContactErrorResponse>
): Promise<void> => {
if (!config.spreadsheet.contactSheetId) {
throw new Error("Contact sheet ID is not configured");
}
await storeDataInGoogleSpreadsheet(req, res, config.spreadsheet.contactSheetId, CONTACT_SHEET_HEADER_VALUES);
};
2 changes: 1 addition & 1 deletion apps/api/src/api/controllers/maintenance.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const getAllMaintenanceSchedules: RequestHandler = async (_, res) => {
*/
export const updateScheduleActiveStatus: RequestHandler<{ id: string }> = async (req, res) => {
try {
const id = req.params.id as string;
const id = req.params.id;
const { isActive } = req.body;

if (typeof isActive !== "boolean") {
Expand Down
6 changes: 3 additions & 3 deletions apps/api/src/api/controllers/metrics.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ let supabaseClient: SupabaseClient | null = null;

function getSupabaseClient() {
if (!supabaseClient) {
if (!config.supabaseUrl) {
if (!config.supabase.url) {
throw new Error("Missing Supabase URL in configuration.");
}
if (!config.supabaseKey) {
if (!config.supabase.anonKey) {
throw new Error("Missing Supabase Key in configuration.");
}
supabaseClient = createClient(config.supabaseUrl, config.supabaseKey);
supabaseClient = createClient(config.supabase.url, config.supabase.anonKey);
}
return supabaseClient;
}
Expand Down
6 changes: 4 additions & 2 deletions apps/api/src/api/controllers/quote.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export const createQuote = async (
partnerId,
partnerName: publicKeyPartnerName,
rampType,
to
to,
userId: req.userId
});

res.status(httpStatus.CREATED).json(quote);
Expand Down Expand Up @@ -85,7 +86,8 @@ export const createBestQuote = async (
partnerId,
partnerName: publicKeyPartnerName,
rampType,
to
to,
userId: req.userId
});

res.status(httpStatus.CREATED).json(quote);
Expand Down
3 changes: 2 additions & 1 deletion apps/api/src/api/controllers/ramp.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export const registerRamp = async (req: Request, res: Response<RampProcess>, nex
const ramp = await rampService.registerRamp({
additionalData,
quoteId,
signingAccounts
signingAccounts,
userId: req.userId
});

res.status(httpStatus.CREATED).json(ramp);
Expand Down
Loading