Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2230522
add EU flag
Sharqiewicz Mar 4, 2026
bf3d955
add COP flag
Sharqiewicz Mar 4, 2026
9c9df46
add MX flag
Sharqiewicz Mar 4, 2026
729ef9d
add USD flag
Sharqiewicz Mar 4, 2026
c36399b
remove EUR images and replace placeholder
Sharqiewicz Mar 4, 2026
c6172b1
update useGetAssetIcon to handle new currencies
Sharqiewicz Mar 4, 2026
0456a7b
update useGetAssetIcon to handle new currencies
Sharqiewicz Mar 4, 2026
f533870
add reusable Checkbox component
Sharqiewicz Mar 4, 2026
dbc188c
add business handshake svg for AlfredPay KYB
Sharqiewicz Mar 4, 2026
80a093b
create CustomerDefinitionScreen
Sharqiewicz Mar 4, 2026
14cbbef
extract DoneScreen
Sharqiewicz Mar 4, 2026
20e0e63
extract FailureKYCScreen
Sharqiewicz Mar 4, 2026
428f542
extract FailureScreen
Sharqiewicz Mar 4, 2026
eea51a2
extract FillingScreen
Sharqiewicz Mar 4, 2026
3e62563
extract LinkReadyScreen
Sharqiewicz Mar 4, 2026
8542032
extract LoadingScreen
Sharqiewicz Mar 4, 2026
5f62d89
extract OpeningLinkScreen
Sharqiewicz Mar 4, 2026
7eb4a37
extract PollingScreen
Sharqiewicz Mar 4, 2026
2499231
refactor AlfredpayKycFlow screen
Sharqiewicz Mar 4, 2026
986f2d4
move useQuote to QuoteSummary
Sharqiewicz Mar 4, 2026
43a89a6
remove unnecessary translation
Sharqiewicz Mar 4, 2026
1dca43f
fix MXN flag
Sharqiewicz Mar 4, 2026
8ce6f96
Shared: add MXN/COP tokens + isAlfredpayToken helper
Sharqiewicz Mar 9, 2026
a57cd00
add COP,MXN token mapping
Sharqiewicz Mar 10, 2026
1354ad4
new UI primitives for fiat account management
Sharqiewicz Mar 10, 2026
382e786
fiat account management constants, hooks, machine + service
Sharqiewicz Mar 10, 2026
8b4a5c3
create FiatAccountRegistration screens
Sharqiewicz Mar 10, 2026
10e4c3c
integrate AlfredpayPaymentMethodSelector into SummaryStep
Sharqiewicz Mar 10, 2026
a95d109
FiatAccountRegistration and go back navigation into widget/KYC
Sharqiewicz Mar 10, 2026
46c532d
multi-currency Alfredpay routing
Sharqiewicz Mar 10, 2026
151c614
MXN/COP token display, defaults, and URL params
Sharqiewicz Mar 10, 2026
d09ffac
chores
Sharqiewicz Mar 10, 2026
008fc2e
refactor: rename paymentMethods machine and constants to fiatAccount
Sharqiewicz Mar 11, 2026
b4ff18c
replace AlfredpayPaymentMethodSelector with FiatAccountSelector in Su…
Sharqiewicz Mar 11, 2026
33d46c1
replace MethodPickerScreen with AccountTypePickerScreen in FiatAccoun…
Sharqiewicz Mar 11, 2026
fabf1f9
add AlertBanner component and update FailureScreen
Sharqiewicz Mar 11, 2026
5c09257
disable Payment Summary confirm for alfredpay currencies if no Paymen…
Sharqiewicz Mar 11, 2026
ab53009
Add translations for Alfredpay screens
Sharqiewicz Mar 11, 2026
ebbccb2
Add selectedFiatAccountId? to RampExecutionInput
Sharqiewicz Mar 11, 2026
e96a07c
extract MaskedAccountNumber reusable component
Sharqiewicz Mar 11, 2026
5674acd
Alfredpay KYC screens: layout polish + illustrations
Sharqiewicz Mar 11, 2026
42738aa
polish Alfredpay KYC screens: illustrations, layout, spinner
Sharqiewicz Mar 11, 2026
3d5d23a
add btn-vortex-success variant and btn cursor fix
Sharqiewicz Mar 11, 2026
c63f09d
Remove trailing ellipsis from verifying translation strings
Sharqiewicz Mar 11, 2026
723a6f7
Stories / dev tooling
Sharqiewicz Mar 11, 2026
1383528
implement shared zustand store for Fiat Account Management
Sharqiewicz Mar 11, 2026
8e6e2af
improve fiat accounts store management
Sharqiewicz Mar 12, 2026
ce579f8
Remove hardcoded user ID from token verification response
ebma Mar 13, 2026
bfa40f9
Fix missing translations
ebma Mar 13, 2026
b78c079
Fix wrong symbol for MXN currency
ebma Mar 13, 2026
3c86302
Adjust text
ebma Mar 13, 2026
6019e85
Remove console logs
ebma Mar 13, 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
27 changes: 26 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ This is a **Bun monorepo** using workspaces:

## Essential Commands

> Always use `bun`- never `npm`, `yarn`, or `pnpm`. Run `bun lint:fix` after any code change.

```bash
# Install all dependencies
bun install
Expand Down Expand Up @@ -70,7 +72,7 @@ Phase metadata and valid transitions are stored in PostgreSQL and seeded via `se
### Frontend Architecture

- **State**: Zustand stores (`stores/`) + React Context (`contexts/`)
- **Forms**: React Hook Form with Yup validation
- **Forms**: React Hook Form with Zod validation (not Yup)
- **Data Fetching**: TanStack Query
- **Routing**: TanStack Router (route tree auto-generated in `routeTree.gen.ts`)
- **State Machines**: XState machines in `machines/` for complex flows (KYC, ramp process)
Expand All @@ -95,6 +97,8 @@ Contains cross-package utilities:

**Important**: Always rebuild shared when making changes: `bun build:shared`

After ANY change to `packages/shared`, run `bun build:shared` before running frontend/api.

## Code Style Guidelines

From `.clinerules/`:
Expand All @@ -110,6 +114,11 @@ From `.clinerules/`:
- Extract complex conditional rendering into new components
- Skip useless comments; only comment race conditions, TODOs, or genuinely confusing code

### XState v5
- Use `setup({ ... }).createMachine(...)` API- not `createMachine` directly
- Actor refs from `useActor` / `useSelector` from `@xstate/react`
- Machine files live in `apps/frontend/src/machines/`

### Biome Configuration
- Line width: 128
- Indent: 2 spaces
Expand All @@ -118,6 +127,22 @@ From `.clinerules/`:
- Quote style: double
- Sorted Tailwind classes enforced via `useSortedClasses` rule

## Token Exhaustiveness

`FiatToken` currently has 6 values: `EURC`, `ARS`, `BRL`, `USD`, `MXN`, `COP`.

Any `Record<FiatToken, X>` must include ALL six. Missing entries cause TypeScript errors
when shared is rebuilt. Check: tokenAvailability, mapFiatToDestination, success page
ARRIVAL_TEXT_BY_TOKEN, sep10 tokenMapping.

## No Over-Engineering

- Don't add features, refactors, or "improvements" beyond what was asked
- Don't add docstrings/comments to code you didn't touch
- Don't create helpers/utilities for one-time operations
- Don't validate inputs that can't be invalid (internal calls, typed params)
- Three similar lines is better than a premature abstraction

## Testing

### Backend Integration Tests
Expand Down
6 changes: 0 additions & 6 deletions apps/api/src/api/controllers/alfredpay.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ import {
AlfredpayCreateCustomerResponse,
AlfredpayCustomerType,
AlfredpayGetKybRedirectLinkResponse,
AlfredpayGetKybStatusResponse,
AlfredpayGetKycRedirectLinkRequest,
AlfredpayGetKycRedirectLinkResponse,
AlfredpayGetKycStatusRequest,
AlfredpayGetKycStatusResponse,
AlfredpayKybStatus,
AlfredpayKycRedirectFinishedRequest,
AlfredpayKycRedirectOpenedRequest,
AlfredpayKycStatus,
AlfredpayStatusRequest,
AlfredpayStatusResponse
Expand Down Expand Up @@ -258,10 +254,8 @@ export class AlfredpayController {
: await alfredpayService.getKycStatus(alfredPayCustomer.alfredPayId, lastSubmission.submissionId);

const newStatus = AlfredpayController.mapKycStatus(statusResponse.status);
console.log("newStatus", newStatus);
const updateData: Partial<AlfredPayCustomer> = {};

console.log("our status", alfredPayCustomer.status);
if (newStatus && newStatus !== alfredPayCustomer.status) {
updateData.status = newStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
getNetworkId,
getOnChainTokenDetails,
getRoute,
isEvmToken,
multiplyByPowerOfTen,
Networks,
RampCurrency,
Expand Down
4 changes: 3 additions & 1 deletion apps/api/src/api/services/sep10/sep10.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export const signSep10Challenge = async (
[FiatToken.EURC]: "EURC",
[FiatToken.ARS]: "ARS",
[FiatToken.BRL]: "BRL",
[FiatToken.USD]: "USDC" // USD maps to USDC for consistency, though not used for SEP10
[FiatToken.USD]: "USDC",
[FiatToken.MXN]: "USDC",
[FiatToken.COP]: "USDC"
};

const outToken = tokenMapping[fiatToken];
Expand Down
35 changes: 29 additions & 6 deletions apps/frontend/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

:root:has(:is(.modal-open, .modal:target, .modal-toggle:checked + .modal, .modal[open])) {
scrollbar-gutter: unset;
overflow-y: scroll;
}
}

Expand Down Expand Up @@ -123,6 +124,7 @@
.btn {
height: 3rem;
box-shadow: none;
cursor: pointer !important;
}

.btn-vortex-primary {
Expand All @@ -135,7 +137,7 @@
}

.btn-vortex-primary:hover {
@apply bg-blue-200 text-blue-700;
@apply bg-blue-100 text-blue-700;
}

.btn-vortex-primary:disabled {
Expand All @@ -162,10 +164,30 @@
@apply border-blue-300;
}

.btn-vortex-success {
@apply bg-green-500;
@apply text-white;
@apply rounded-[var(--radius-field)];
@apply border;
@apply border-green-500;
@apply duration-200;
transition: scale 0.1s ease-in-out;
}

.btn-vortex-success:active {
scale: 0.98;
}

.btn-vortex-success:hover {
@apply bg-green-100;
@apply text-green-700;
@apply border-green-300;
}

.btn-vortex-primary-inverse {
@apply bg-white;
@apply text-blue-700;
@apply rounded-xl;
@apply rounded-[var(--radius-field)];
@apply border;
@apply border-blue-700;
@apply cursor-pointer;
Expand Down Expand Up @@ -198,6 +220,7 @@
.btn-vortex-secondary {
@apply text-white;
@apply bg-pink-600;
@apply rounded-[var(--radius-field)];
@apply border-pink-600;
@apply shadow-none;
transition: scale 0.1s ease-in-out;
Expand All @@ -215,11 +238,11 @@
}

.btn-vortex-danger {
@apply bg-red-600;
@apply text-white;
@apply bg-red-800;
@apply text-red-100;
@apply rounded-xl;
@apply border;
@apply border-red-600;
@apply border-red-800;
@apply shadow-none;
transition: scale 0.1s ease-in-out;
}
Expand All @@ -229,7 +252,7 @@
}

.btn-vortex-danger:hover {
@apply bg-white;
@apply bg-red-100;
@apply text-red-800;
@apply border-red-800;
}
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"numora": "^3.0.2",
"numora-react": "3.0.3",
"qrcode.react": "^4.2.0",
"radix-ui": "^1.4.3",
"react": "=19.2.0",
"react-dom": "=19.2.0",
"react-hook-form": "^7.65.0",
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/src/assets/business-handshake.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/frontend/src/assets/coins/COP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/frontend/src/assets/coins/EU.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 0 additions & 35 deletions apps/frontend/src/assets/coins/EUR.svg

This file was deleted.

Binary file removed apps/frontend/src/assets/coins/EURC.png
Binary file not shown.
Binary file added apps/frontend/src/assets/coins/MXN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/frontend/src/assets/coins/USD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions apps/frontend/src/assets/coins/placeholder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions apps/frontend/src/assets/document_ready.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading