Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
d26ba83
Merge pull request #571 from pendulum-chain/staging
ebma Apr 16, 2025
0f5a4b2
Merge pull request #574 from pendulum-chain/staging
ebma Apr 17, 2025
5c2af40
Merge pull request #582 from pendulum-chain/staging
gianfra-t Apr 22, 2025
434de3c
Merge pull request #584 from pendulum-chain/staging
ebma Apr 22, 2025
c5ef448
Merge pull request #588 from pendulum-chain/staging
ebma Apr 23, 2025
f4e9560
Merge pull request #592 from pendulum-chain/staging
ebma Apr 24, 2025
bc9932e
Merge pull request #596 from pendulum-chain/staging
ebma Apr 24, 2025
16cd2a0
Merge pull request #601 from pendulum-chain/staging
ebma Apr 25, 2025
bedec0f
Merge pull request #609 from pendulum-chain/staging
ebma Apr 30, 2025
d2939a2
Merge pull request #615 from pendulum-chain/staging
ebma May 2, 2025
1ea7f30
Merge pull request #626 from pendulum-chain/staging
ebma May 6, 2025
aaa51a2
Update autodeploy.yaml
ebma May 9, 2025
2d1b7c1
Merge pull request #637 from pendulum-chain/staging
ebma May 13, 2025
075f5a3
Merge pull request #639 from pendulum-chain/staging
ebma May 13, 2025
333d962
Merge pull request #647 from pendulum-chain/staging
ebma May 15, 2025
87c0192
Merge pull request #649 from pendulum-chain/staging
Sharqiewicz May 16, 2025
3d1b2e1
Merge pull request #651 from pendulum-chain/staging
ebma May 17, 2025
ac30264
Merge pull request #656 from pendulum-chain/staging
ebma May 19, 2025
e0cb577
Merge pull request #660 from pendulum-chain/staging
ebma May 20, 2025
898a6fe
Merge pull request #667 from pendulum-chain/staging
ebma May 23, 2025
200a110
Merge pull request #676 from pendulum-chain/staging
ebma May 28, 2025
2dc8501
Merge pull request #700 from pendulum-chain/staging
ebma Jun 5, 2025
d0d665f
Merge pull request #706 from pendulum-chain/staging
ebma Jun 6, 2025
8c14988
Merge pull request #724 from pendulum-chain/staging
ebma Jun 13, 2025
1bf4c4f
Merge pull request #726 from pendulum-chain/staging
ebma Jun 14, 2025
ee807fa
Merge pull request #727 from pendulum-chain/staging
ebma Jun 16, 2025
a1fc913
Merge pull request #729 from pendulum-chain/staging
ebma Jun 17, 2025
05dfa2d
Merge pull request #743 from pendulum-chain/staging
ebma Jun 30, 2025
d8537a1
Merge pull request #757 from pendulum-chain/staging
ebma Jul 10, 2025
4e135b5
Merge pull request #768 from pendulum-chain/staging
ebma Jul 15, 2025
3d4e3e0
Merge pull request #771 from pendulum-chain/staging
ebma Jul 18, 2025
cbfaf17
Merge pull request #780 from pendulum-chain/staging
ebma Jul 24, 2025
04aafd9
Merge pull request #785 from pendulum-chain/staging
ebma Jul 29, 2025
e7f27f4
Create a new issue for adding support for Avenia's API v2
ebma Aug 18, 2025
c25abba
Delete ISSUE_TEMPLATE/avenia_api_v2_support.md
ebma Aug 18, 2025
9278e84
Merge pull request #807 from pendulum-chain/staging
ebma Aug 21, 2025
7d059b8
Merge pull request #810 from pendulum-chain/staging
ebma Aug 22, 2025
48b5634
Merge pull request #814 from pendulum-chain/staging
gianfra-t Aug 26, 2025
a485bdf
Merge pull request #830 from pendulum-chain/staging
ebma Sep 16, 2025
29b6afe
Update 01-general-rules.md
ebma Sep 17, 2025
e5ecbba
Update 01-general-rules.md
ebma Sep 17, 2025
08bd51b
Merge pull request #848 from pendulum-chain/staging
ebma Sep 23, 2025
549a068
Merge pull request #853 from pendulum-chain/staging
ebma Sep 29, 2025
236cc0e
Merge pull request #856 from pendulum-chain/staging
ebma Sep 30, 2025
f7158b0
Merge pull request #878 from pendulum-chain/staging
ebma Oct 16, 2025
ecc4724
Merge pull request #881 from pendulum-chain/staging
ebma Oct 17, 2025
eaa93c3
Merge pull request #895 from pendulum-chain/staging
ebma Oct 27, 2025
85dfb87
Merge pull request #899 from pendulum-chain/staging
ebma Oct 28, 2025
d9a60bb
Merge pull request #906 from pendulum-chain/staging
ebma Oct 29, 2025
6db7cf8
Merge pull request #909 from pendulum-chain/staging
ebma Oct 30, 2025
28b8d77
Merge pull request #914 from pendulum-chain/staging
ebma Oct 31, 2025
c27ed61
Merge pull request #916 from pendulum-chain/staging
ebma Nov 5, 2025
c5d1399
Merge pull request #918 from pendulum-chain/staging
ebma Nov 6, 2025
c90d99f
Merge pull request #920 from pendulum-chain/staging
ebma Nov 6, 2025
f641fb4
Merge pull request #921 from pendulum-chain/staging
ebma Nov 6, 2025
72070c2
Merge pull request #922 from pendulum-chain/staging
ebma Nov 6, 2025
979372f
Merge pull request #926 from pendulum-chain/staging
ebma Nov 10, 2025
d2d5562
Merge pull request #928 from pendulum-chain/staging
ebma Nov 10, 2025
025404d
Merge pull request #930 from pendulum-chain/staging
ebma Nov 11, 2025
fa6cdf7
Merge pull request #933 from pendulum-chain/staging
ebma Nov 14, 2025
3da082e
Merge pull request #939 from pendulum-chain/staging
ebma Nov 14, 2025
031d780
Merge pull request #942 from pendulum-chain/staging
ebma Nov 18, 2025
7f9e1ea
Merge pull request #946 from pendulum-chain/staging
ebma Nov 19, 2025
b5172c6
Merge pull request #949 from pendulum-chain/staging
ebma Nov 20, 2025
1cbb933
Merge pull request #951 from pendulum-chain/staging
ebma Nov 24, 2025
ca9bcb8
Merge pull request #956 from pendulum-chain/staging
ebma Dec 1, 2025
f631a21
Merge pull request #962 from pendulum-chain/staging
ebma Dec 10, 2025
68384b8
Merge pull request #971 from pendulum-chain/staging
ebma Dec 16, 2025
8e4dc9b
Merge pull request #972 from pendulum-chain/staging
ebma Dec 16, 2025
b81e804
Merge pull request #973 from pendulum-chain/staging
ebma Dec 16, 2025
fdff0cf
Merge pull request #976 from pendulum-chain/staging
ebma Dec 22, 2025
2062fd5
Merge pull request #983 from pendulum-chain/staging
ebma Dec 23, 2025
3f89b70
Merge pull request #995 from pendulum-chain/staging
ebma Jan 6, 2026
bea83d3
Merge pull request #1000 from pendulum-chain/staging
ebma Jan 8, 2026
cec7a03
Merge pull request #1005 from pendulum-chain/staging
ebma Jan 12, 2026
e9f1382
Merge pull request #1006 from pendulum-chain/staging
gianfra-t Jan 12, 2026
546ffa6
Merge pull request #1013 from pendulum-chain/staging
ebma Jan 14, 2026
7b33309
Merge pull request #1020 from pendulum-chain/staging
ebma Jan 19, 2026
7748ac0
Merge pull request #1025 from pendulum-chain/staging
ebma Jan 21, 2026
42e24af
Merge pull request #1030 from pendulum-chain/staging
ebma Jan 22, 2026
0e128f3
Merge pull request #1032 from pendulum-chain/staging
gianfra-t Jan 22, 2026
75d10b9
Merge pull request #1033 from pendulum-chain/staging
ebma Jan 23, 2026
27665c0
Merge pull request #1034 from pendulum-chain/staging
ebma Jan 24, 2026
578a383
Merge pull request #1035 from pendulum-chain/staging
ebma Jan 24, 2026
e29077d
Merge pull request #1036 from pendulum-chain/staging
ebma Jan 24, 2026
12482a5
Merge pull request #1037 from pendulum-chain/staging
ebma Jan 25, 2026
a8a9d19
Merge pull request #1038 from pendulum-chain/staging
ebma Jan 25, 2026
3643eae
Merge pull request #1039 from pendulum-chain/staging
ebma Jan 26, 2026
28c8189
Merge pull request #1040 from pendulum-chain/staging
ebma Jan 26, 2026
a7e8333
Merge pull request #1045 from pendulum-chain/staging
ebma Jan 27, 2026
c43fea3
Merge pull request #1051 from pendulum-chain/staging
ebma Jan 30, 2026
673ee4d
Merge pull request #1053 from pendulum-chain/staging
gianfra-t Feb 2, 2026
6d66ab5
Merge pull request #1054 from pendulum-chain/staging
ebma Feb 3, 2026
6364652
Merge pull request #1056 from pendulum-chain/staging
ebma Feb 3, 2026
e7eca40
Merge pull request #1062 from pendulum-chain/staging
ebma Feb 10, 2026
808b4bd
Merge pull request #1078 from pendulum-chain/staging
ebma Feb 20, 2026
e77dc2a
Merge pull request #1082 from pendulum-chain/staging
ebma Feb 22, 2026
64134ef
Merge pull request #1084 from pendulum-chain/staging
ebma Feb 23, 2026
f4023c6
Merge pull request #1087 from pendulum-chain/staging
Sharqiewicz Mar 3, 2026
04a7022
Merge pull request #1090 from pendulum-chain/staging
ebma Mar 11, 2026
794586a
Merge pull request #1092 from pendulum-chain/staging
ebma Mar 12, 2026
a588d8d
Merge pull request #1096 from pendulum-chain/staging
ebma Mar 26, 2026
682c4cf
Merge pull request #1102 from pendulum-chain/staging
ebma Mar 31, 2026
5e7cdc8
Merge pull request #1114 from pendulum-chain/staging
ebma Apr 7, 2026
8ad7588
Merge pull request #1122 from pendulum-chain/staging
ebma May 4, 2026
1031af3
Merge pull request #1133 from pendulum-chain/staging
ebma May 5, 2026
68505d2
first pass, add ars changes
gianfra-t May 8, 2026
3c5fedc
simplify ARS components, helpers
gianfra-t May 12, 2026
98fc828
Merge branch 'staging' into add-alfredpay-ars-support
gianfra-t May 12, 2026
11862c6
add logic for broken kyc flows, ARS and cbu type supprts
gianfra-t May 12, 2026
f94e661
Merge branch 'staging' into add-alfredpay-ars-support
gianfra-t May 20, 2026
3f55ea7
add ars as "free" token configuration, minor adjustments
gianfra-t May 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
2 changes: 1 addition & 1 deletion .clinerules/01-general-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Architecture Decision Records

Create ADRs in /docs/adr for:
Create ADRs in /docs/adr for:

- Major dependency changes
- Architectural pattern changes
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/autodeploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run-name: Gitlab Pipeline Executor
on:
push:
branches:
- staging
- main
jobs:
Execute-Gitlab-Pipeline:
runs-on: ubuntu-latest
Expand All @@ -13,4 +13,4 @@ jobs:
- name: Triggers Gitlab Pipeline
run: |
ls ${{ github.workspace }}
curl -X POST -F token=${{ secrets.GITLAB_TRIGGER }} -F "ref=development" -F "variables[PRODUCTION]=N" -F "variables[STAGING]=N" -F "variables[STAGVTX]=Y" -F "variables[PRODPOL]=N" -F "variables[STAGPOL]=N" https://gitlab.com/api/v4/projects/${{ secrets.PROJECT_ID }}/trigger/pipeline
curl -X POST -F token=${{ secrets.GITLAB_TRIGGER }} -F "ref=development" -F "variables[PRODVTX]=Y" https://gitlab.com/api/v4/projects/${{ secrets.PROJECT_ID }}/trigger/pipeline
80 changes: 71 additions & 9 deletions apps/api/src/api/controllers/alfredpay.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,20 @@ export class AlfredpayController {

const alfredpayService = AlfredpayApiService.getInstance();

const newCustomer = await alfredpayService.createCustomer(userEmail, AlfredpayCustomerType.INDIVIDUAL, country);
const customerId = newCustomer.customerId;
let customerId: string;
try {
const newCustomer = await alfredpayService.createCustomer(userEmail, AlfredpayCustomerType.INDIVIDUAL, country);
customerId = newCustomer.customerId;
} catch (error) {
const errorMessage = (error as Error)?.message || "";
if (errorMessage.includes("409") || errorMessage.includes("already registered")) {
logger.info("Customer already exists in Alfredpay, fetching existing customer");
const existingCustomer = await alfredpayService.findCustomer(userEmail, country);
customerId = existingCustomer.customerId;
} else {
throw error;
}
}

await AlfredPayCustomer.create({
alfredPayId: customerId,
Expand Down Expand Up @@ -340,7 +352,7 @@ export class AlfredpayController {
const linkResponse = await alfredpayService.getKybRedirectLink(alfredPayCustomer.alfredPayId);
await alfredPayCustomer.update({ status: AlfredPayStatus.Consulted });
return res.json(linkResponse as AlfredpayGetKybRedirectLinkResponse);
} else if (country === "MX" || country === "CO") {
} else if (country === "MX" || country === "CO" || country === "AR") {
// MX/CO use API-based (form) KYC — no redirect link needed.
// Just reset status so the user can re-fill the form.
await alfredPayCustomer.update({ status: AlfredPayStatus.Consulted });
Expand Down Expand Up @@ -379,8 +391,20 @@ export class AlfredpayController {

const alfredpayService = AlfredpayApiService.getInstance();

const newCustomer = await alfredpayService.createCustomer(userEmail, type, country);
const customerId = newCustomer.customerId;
let customerId: string;
try {
const newCustomer = await alfredpayService.createCustomer(userEmail, type, country);
customerId = newCustomer.customerId;
} catch (error) {
const errorMessage = (error as Error)?.message || "";
if (errorMessage.includes("409") || errorMessage.includes("already registered")) {
logger.info("Business customer already exists in Alfredpay, fetching existing customer");
const existingCustomer = await alfredpayService.findCustomer(userEmail, country);
customerId = existingCustomer.customerId;
} else {
throw error;
}
}

await AlfredPayCustomer.create({
alfredPayId: customerId,
Expand Down Expand Up @@ -443,7 +467,7 @@ export class AlfredpayController {

static async submitKycInformation(req: Request, res: Response) {
try {
const { country, ...kycData } = req.body as SubmitKycInformationRequest & { country: string };
const { country, ...kycData } = req.body as SubmitKycInformationRequest;
const userId = req.userId!;

const alfredPayCustomer = await AlfredPayCustomer.findOne({
Expand All @@ -455,7 +479,21 @@ export class AlfredpayController {
}

const alfredpayService = AlfredpayApiService.getInstance();
const result = await alfredpayService.submitKycInformation(alfredPayCustomer.alfredPayId, { ...kycData, country });
let result: Awaited<ReturnType<typeof alfredpayService.submitKycInformation>>;
try {
result = await alfredpayService.submitKycInformation(alfredPayCustomer.alfredPayId, { ...kycData, country });
} catch (error) {
const errorMessage = (error as Error)?.message || "";
if (errorMessage.includes("422") && errorMessage.includes("KYC record cannot be retried")) {
logger.info("KYC record cannot be retried, fetching existing submission");
const existingSubmission = await alfredpayService.getLastKycSubmission(alfredPayCustomer.alfredPayId);
result = { submissionId: existingSubmission.submissionId } as Awaited<
ReturnType<typeof alfredpayService.submitKycInformation>
>;
} else {
throw error;
}
}

res.json(result);
} catch (error) {
Expand All @@ -481,7 +519,12 @@ export class AlfredpayController {
if (!alfredPayCustomer) {
return res.status(404).json({ error: "Alfredpay customer not found" });
}

console.log("Received request to submit KYC file with data:", {
country,
fileName: req.file.originalname,
fileType,
submissionId
});
const fileBlob = new File([new Uint8Array(req.file.buffer)], req.file.originalname, { type: req.file.mimetype });
const alfredpayService = AlfredpayApiService.getInstance();
await alfredpayService.submitKycFile(
Expand Down Expand Up @@ -537,7 +580,21 @@ export class AlfredpayController {
}

const alfredpayService = AlfredpayApiService.getInstance();
const result = await alfredpayService.submitKybInformation(alfredPayCustomer.alfredPayId, { ...kybData, country });
let result: Awaited<ReturnType<typeof alfredpayService.submitKybInformation>>;
try {
result = await alfredpayService.submitKybInformation(alfredPayCustomer.alfredPayId, { ...kybData, country });
} catch (error) {
const errorMessage = (error as Error)?.message || "";
if (errorMessage.includes("422") && errorMessage.includes("KYC record cannot be retried")) {
logger.info("KYB record cannot be retried, fetching existing submission");
const existingSubmission = await alfredpayService.getLastKybSubmission(alfredPayCustomer.alfredPayId);
result = { submissionId: existingSubmission.submissionId } as Awaited<
ReturnType<typeof alfredpayService.submitKybInformation>
>;
} else {
throw error;
}
}

res.json(result);
} catch (error) {
Expand Down Expand Up @@ -729,6 +786,11 @@ export class AlfredpayController {
accountType: accountType ?? "",
metadata: { accountHolderName: accountName, documentNumber, documentType }
};
} else if (alfredpayFiatAccountType === AlfredpayFiatAccountType.COELSA) {
fiatAccountFields = {
accountNumber,
accountType: accountType ?? ""
};
} else {
// BANK_USA — external accounts need address fields inside metadata
fiatAccountFields = isExternal
Expand Down
29 changes: 29 additions & 0 deletions apps/api/src/api/middlewares/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
PriceProvider,
QuoteError,
RampDirection,
SubmitKycInformationRequest,
TokenConfig,
VALID_CRYPTO_CURRENCIES,
VALID_FIAT_CURRENCIES,
Expand Down Expand Up @@ -483,6 +484,34 @@ export const validateGetWidgetUrlInput: RequestHandler<unknown, unknown, GetWidg
next();
};

const countryValidators: Record<string, (body: SubmitKycInformationRequest) => string | null> = {
AR: ({ phoneNumber, cuit, nationalities, pep }) => {
if (!phoneNumber) return "Phone number is required for Argentina";
if (!phoneNumber.startsWith("+54")) return "Phone number must use Argentina country code (+54)";
if (cuit && !/^\d{11}$/.test(cuit)) return "CUIT must be exactly 11 digits";
if (nationalities && !nationalities.every(n => /^[A-Z]{2}$/.test(n))) return "Nationalities must use alpha-2 country codes";
if (typeof pep !== "boolean") return "PEP declaration is required for Argentina";
return null;
}
};

export const validateKycSubmission: RequestHandler = (req, res, next) => {
const body = req.body as SubmitKycInformationRequest;
const validator = countryValidators[body.country];

if (!validator) {
return next();
}

const error = validator(body);
if (error) {
res.status(httpStatus.BAD_REQUEST).json({ error });
return;
}

next();
};

export const validateStartKyc2: RequestHandler = (req, res, next) => {
const { documentType } = req.body as AveniaKYCDataUploadRequest;

Expand Down
9 changes: 8 additions & 1 deletion apps/api/src/api/routes/v1/alfredpay.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import multer from "multer";
import { AlfredpayController } from "../../controllers/alfredpay.controller";
import { validateResultCountry } from "../../middlewares/alfredpay.middleware";
import { requireAuth } from "../../middlewares/supabaseAuth";
import { validateKycSubmission } from "../../middlewares/validators";

const router = Router();
const upload = multer({ limits: { fileSize: 5 * 1024 * 1024 }, storage: multer.memoryStorage() });
Expand All @@ -18,7 +19,13 @@ router.post("/createBusinessCustomer", requireAuth, validateResultCountry, Alfre
router.get("/getKybRedirectLink", requireAuth, validateResultCountry, AlfredpayController.getKybRedirectLink);

// MXN/CO API-based KYC
router.post("/submitKycInformation", requireAuth, validateResultCountry, AlfredpayController.submitKycInformation);
router.post(
"/submitKycInformation",
requireAuth,
validateResultCountry,
validateKycSubmission,
AlfredpayController.submitKycInformation
);
router.post("/submitKycFile", requireAuth, upload.single("file"), validateResultCountry, AlfredpayController.submitKycFile);
router.post("/sendKycSubmission", requireAuth, validateResultCountry, AlfredpayController.sendKycSubmission);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ export class BrlaOnrampMintHandler extends BasePhaseHandler {
// transferred to the ephemeral. We accept a balance of at least 95% of the
// pre-computed expected amount to account for fee differences between quote
// creation time and execution time.
const recoveryThresholdRaw = new Big(preComputedExpectedAmountRaw)
.times(EPHEMERAL_FUNDED_TOLERANCE_FACTOR)
.toFixed(0, 0);
const recoveryThresholdRaw = new Big(preComputedExpectedAmountRaw).times(EPHEMERAL_FUNDED_TOLERANCE_FACTOR).toFixed(0, 0);

if (await this.ephemeralAlreadyFunded(tokenDetails.erc20AddressSourceChain, evmEphemeralAddress, recoveryThresholdRaw)) {
logger.info(
Expand Down Expand Up @@ -149,10 +147,7 @@ export class BrlaOnrampMintHandler extends BasePhaseHandler {
// Derive the expected on-chain amount from the live quote's outputAmount rather than
// the stale pre-computed metadata value. The live quote accounts for the actual fees
// applied at execution time, so this is the amount that will truly arrive on Base.
const expectedAmountReceived = multiplyByPowerOfTen(
new Big(aveniaQuote.outputAmount),
tokenDetails.decimals
).toFixed(0, 0);
const expectedAmountReceived = multiplyByPowerOfTen(new Big(aveniaQuote.outputAmount), tokenDetails.decimals).toFixed(0, 0);

logger.info(
`BrlaOnrampMintHandler: Live Avenia quote output is ${aveniaQuote.outputAmount} BRLA (raw: ${expectedAmountReceived}). Pre-computed metadata value was ${preComputedExpectedAmountRaw}.`
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/api/services/priceFeed.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class PriceFeedService {
logger.debug(`Cache miss for ${cacheKey}. Fetching from CoinGecko API.`);

try {
logger.debug(`Fetching price for ${tokenId} in ${vsCurrency} from CoinGecko`);
logger.info(`Fetching price for ${tokenId} in ${vsCurrency} from CoinGecko`);

// Construct the API URL
const url = new URL(`${this.coingeckoApiBaseUrl}/simple/price`);
Expand Down Expand Up @@ -200,7 +200,7 @@ export class PriceFeedService {
}

// Check if the currency has a Pendulum representative (Nabla pool).
// Currencies like MXN and COP are TokenType.Fiat with no Pendulum pool — use CoinGecko for those.
// Currencies like MXN, COP, and ARS are TokenType.Fiat with no Pendulum pool — use CoinGecko for those.
let outputTokenPendulumDetails;
try {
outputTokenPendulumDetails = getPendulumDetails(toCurrency);
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/api/services/quote/core/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const SUPPORTED_CHAINS: {
from: [
EPaymentMethod.PIX as DestinationType,
EPaymentMethod.SEPA as DestinationType,
EPaymentMethod.CBU as DestinationType,
EPaymentMethod.ACH as DestinationType,
EPaymentMethod.SPEI as DestinationType
],
Expand Down
3 changes: 2 additions & 1 deletion apps/api/src/api/services/quote/engines/finalize/onramp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export class OnRampFinalizeEngine extends BaseFinalizeEngine {
} else if (
request.inputCurrency === FiatToken.USD ||
request.inputCurrency === FiatToken.MXN ||
request.inputCurrency === FiatToken.COP
request.inputCurrency === FiatToken.COP ||
request.inputCurrency === FiatToken.ARS
) {
// evmToEvm is set when Squid Router ran (e.g. USDC Polygon → USDT Arbitrum).
// When destination is USDC on Polygon, Squid Router is skipped (skipRouteCalculation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export class OffRampFromEvmInitializeEngine extends BaseInitializeEngine {
rampType: req.rampType,
toNetwork: this.network
};

const bridgeQuote = await getEvmBridgeQuote(quoteRequest);

ctx.evmToEvm = {
Expand Down
3 changes: 2 additions & 1 deletion apps/api/src/api/services/quote/routes/route-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ export class RouteResolver {
case "wire":
case "ach":
case "spei":
case "cbu":
return offrampEvmToAlfredpayStrategy;
case "sepa":
case "cbu":

default:
return offrampToStellarStrategy;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export async function prepareAlfredpayToEvmOnrampTransactions({
const fiatToCountry: Partial<Record<FiatToken, AlfredPayCountry>> = {
[FiatToken.USD]: AlfredPayCountry.US,
[FiatToken.MXN]: AlfredPayCountry.MX,
[FiatToken.COP]: AlfredPayCountry.CO
[FiatToken.COP]: AlfredPayCountry.CO,
[FiatToken.ARS]: AlfredPayCountry.AR
};
const customerCountry = fiatToCountry[quote.inputCurrency as FiatToken];
if (!customerCountry) {
Expand Down
11 changes: 9 additions & 2 deletions apps/frontend/src/components/Alfredpay/AlfredpayKycFlow.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useCallback } from "react";
import { useAlfredpayKycActor, useAlfredpayKycSelector } from "../../contexts/rampState";
import { ArKycFormScreen } from "./ArKycFormScreen";
import { ColKycFormScreen } from "./ColKycFormScreen";
import { CustomerDefinitionScreen } from "./CustomerDefinitionScreen";
import { DoneScreen } from "./DoneScreen";
Expand Down Expand Up @@ -59,6 +60,7 @@ export const AlfredpayKycFlow = () => {
const kycOrKyb = context.business ? "KYB" : "KYC";
const isMxn = context.country === "MX";
const isCo = context.country === "CO";
const isAr = context.country === "AR";

if (
stateValue === "CheckingStatus" ||
Expand Down Expand Up @@ -86,8 +88,13 @@ export const AlfredpayKycFlow = () => {
return <ColKycFormScreen onSubmit={submitForm} />;
}

if (stateValue === "UploadingDocuments" && (isMxn || isCo)) {
return <MxnDocumentUploadScreen onSubmit={submitFiles} />;
if (stateValue === "FillingKycForm" && isAr) {
return <ArKycFormScreen onSubmit={submitForm} />;
}

if (stateValue === "UploadingDocuments" && (isMxn || isCo || isAr)) {
const includeSelfie = isAr;
return <MxnDocumentUploadScreen includeSelfie={includeSelfie} onSubmit={submitFiles} />;
}

if (stateValue === "FillingKybForm") {
Expand Down
Loading
Loading