Commit abfb18b
Release: develop -> master (#2873)
* fix: use eth chain for sell endpoint. (#2872)
* fix: use eth for delegation check. (#2875)
* fix: round FiatOutput amount to 2 decimal places (#2876)
Add Util.round(amount, 2) when setting FiatOutput.amount in:
- create(): after entity creation from DTO
- createInternal(): when calculating from buyFiats and before save
- update(): before saving DTO amount
Fiat amounts must always be rounded to 2 decimal places for
correct bank transaction processing.
* fix: case-insensitive bankUsage matching in findMatchingBuy (#2877)
* fix: case-insensitive bankUsage matching in findMatchingBuy
The remittanceInfo was compared case-sensitively with bankUsage,
causing transactions with lowercase usage codes (e.g. 6ed3-090b-25a8)
to not match their routes (stored as 6ED3-090B-25A8).
Add .toUpperCase() to normalized candidate for consistent matching.
* fix: correct order of toUpperCase and O-to-0 replacement
Move toUpperCase() before replace(/O/g, '0') so that lowercase 'o'
is first converted to 'O', then replaced with '0'.
This handles edge cases like '6ed3-o90b-25a8' where user types
lowercase 'o' instead of '0'.
* Refactoring
* Refactoring 2
* [NOTASK] add bankDataUserMismatch auto fail
* Bank refund checks (#2880)
* fix: improved bank refund
* fix: enforce creditor data for bank refunds
* fix: tests
* feat: add Special ZCHF 0.5% fee for userData 363001 (#2886)
* feat: add Special ZCHF 0.5% fee for userData 363001
Add migration that:
- Creates new 'Special ZCHF 0.5%' fee (type: Special, rate: 0.005)
- Applies to all ZCHF chains: Ethereum, Polygon, Arbitrum, Optimism, BSC, Base
- Assigns fee to userData 363001 via individualFees field
This reduces the fee for all ZCHF buy/sell/swap transactions from
the standard Organization rate (1.99%-2.49%) to 0.5%.
* fix: correct blockchainFactor and add financialTypes to fee migration
- Change blockchainFactor from 1 to 0 (consistent with Fee 67, 111)
- Add financialTypes: 'CHF' (consistent with existing ZCHF fees)
- Use unique label 'Special ZCHF 0.5% UserData 363001' to avoid collisions
- Fix down() migration: use STUFF/LEFT instead of fragile SUBSTRING
---------
Co-authored-by: Lam Nguyen <32935491+xlamn@users.noreply.github.com>
Co-authored-by: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com>
Co-authored-by: David May <david.leo.may@gmail.com>
Co-authored-by: Yannick1712 <52333989+Yannick1712@users.noreply.github.com>
Co-authored-by: David May <85513542+davidleomay@users.noreply.github.com>15 files changed
Lines changed: 215 additions & 160 deletions
File tree
- migration
- src
- subdomains
- core
- aml/enums
- buy-crypto/process
- entities
- services
- history
- controllers
- dto
- generic/support
- supporting
- bank-tx
- bank-tx-return
- __tests__
- bank-tx/services
- fiat-output
- realunit
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | | - | |
6 | 11 | | |
7 | | - | |
8 | | - | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | | - | |
12 | | - | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
204 | 208 | | |
205 | 209 | | |
206 | 210 | | |
| |||
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
| 536 | + | |
544 | 537 | | |
| 538 | + | |
| 539 | + | |
545 | 540 | | |
546 | 541 | | |
547 | 542 | | |
| |||
556 | 551 | | |
557 | 552 | | |
558 | 553 | | |
559 | | - | |
| 554 | + | |
560 | 555 | | |
561 | 556 | | |
562 | 557 | | |
| |||
Lines changed: 11 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
279 | 282 | | |
280 | 283 | | |
281 | 284 | | |
| |||
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
| 299 | + | |
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
| |||
541 | 545 | | |
542 | 546 | | |
543 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
544 | 552 | | |
545 | 553 | | |
546 | 554 | | |
| |||
551 | 559 | | |
552 | 560 | | |
553 | 561 | | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
| 562 | + | |
560 | 563 | | |
561 | 564 | | |
562 | 565 | | |
| |||
570 | 573 | | |
571 | 574 | | |
572 | 575 | | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
| 576 | + | |
581 | 577 | | |
582 | 578 | | |
583 | 579 | | |
| |||
Lines changed: 34 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
| 396 | + | |
402 | 397 | | |
403 | 398 | | |
404 | 399 | | |
| |||
412 | 407 | | |
413 | 408 | | |
414 | 409 | | |
415 | | - | |
| 410 | + | |
416 | 411 | | |
417 | 412 | | |
418 | 413 | | |
| |||
446 | 441 | | |
447 | 442 | | |
448 | 443 | | |
449 | | - | |
| 444 | + | |
450 | 445 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
459 | 456 | | |
460 | 457 | | |
| 458 | + | |
| 459 | + | |
461 | 460 | | |
462 | 461 | | |
463 | | - | |
| 462 | + | |
464 | 463 | | |
465 | 464 | | |
466 | 465 | | |
467 | 466 | | |
468 | 467 | | |
469 | 468 | | |
470 | 469 | | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | 470 | | |
488 | 471 | | |
489 | 472 | | |
| |||
499 | 482 | | |
500 | 483 | | |
501 | 484 | | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
502 | 488 | | |
503 | 489 | | |
| 490 | + | |
504 | 491 | | |
505 | 492 | | |
506 | 493 | | |
507 | 494 | | |
| 495 | + | |
508 | 496 | | |
509 | 497 | | |
510 | 498 | | |
| |||
518 | 506 | | |
519 | 507 | | |
520 | 508 | | |
521 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
522 | 521 | | |
523 | 522 | | |
524 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 46 | + | |
53 | 47 | | |
54 | 48 | | |
55 | 49 | | |
| |||
0 commit comments