Skip to content

Commit 0dc5265

Browse files
authored
Merge pull request #3235 from DFXswiss/develop
2 parents 445a30e + f059d57 commit 0dc5265

2 files changed

Lines changed: 40 additions & 3 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ thunder-tests/env
4747
.claude/settings.local.json
4848
.api.pid
4949
CLAUDE.md
50+
51+
# Forge build artifacts
52+
test-contracts/

src/subdomains/supporting/log/log-job.service.ts

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,12 @@ export class LogJobService {
575575
ExchangeTxType.DEPOSIT,
576576
yapealEurBank.iban,
577577
);
578+
const pendingEurOlkyScryptMinusAmount = this.getPendingBankAmount(
579+
[curr],
580+
recentEurBankTxScrypt,
581+
ExchangeTxType.DEPOSIT,
582+
olkyBank.iban,
583+
);
578584

579585
// unfiltered lists
580586
const pendingYapealScryptPlusAmountUnfiltered = this.getPendingBankAmount(
@@ -597,6 +603,12 @@ export class LogJobService {
597603
ExchangeTxType.DEPOSIT,
598604
yapealEurBank.iban,
599605
);
606+
const pendingEurOlkyScryptMinusAmountUnfiltered = this.getPendingBankAmount(
607+
[curr],
608+
eurReceiverScryptExchangeTx.filter((t) => t.id >= financeLogPairIds?.toScrypt?.eur?.exchangeTxId),
609+
ExchangeTxType.DEPOSIT,
610+
olkyBank.iban,
611+
);
600612

601613
// Scrypt to Yapeal //
602614

@@ -613,6 +625,12 @@ export class LogJobService {
613625
ExchangeTxType.WITHDRAWAL,
614626
yapealEurBank.iban,
615627
);
628+
const pendingEurScryptOlkyPlusAmount = this.getPendingBankAmount(
629+
[curr],
630+
recentEurScryptYapealTx,
631+
ExchangeTxType.WITHDRAWAL,
632+
olkyBank.iban,
633+
);
616634
const pendingScryptYapealMinusAmount = this.getPendingBankAmount(
617635
[curr],
618636
[...recentChfScryptBankTx, ...recentEurScryptBankTx],
@@ -636,6 +654,14 @@ export class LogJobService {
636654
yapealEurBank.iban,
637655
)
638656
: 0;
657+
const pendingEurScryptOlkyPlusAmountUnfiltered = financeLogPairIds?.fromScrypt?.eur?.exchangeTxId
658+
? this.getPendingBankAmount(
659+
[curr],
660+
eurSenderScryptExchangeTx.filter((t) => t.id >= financeLogPairIds.fromScrypt.eur.exchangeTxId),
661+
ExchangeTxType.WITHDRAWAL,
662+
olkyBank.iban,
663+
)
664+
: 0;
639665
const pendingScryptYapealMinusAmountUnfiltered =
640666
financeLogPairIds?.fromScrypt?.chf?.bankTxId || financeLogPairIds?.fromScrypt?.eur?.bankTxId
641667
? this.getPendingBankAmount(
@@ -663,18 +689,26 @@ export class LogJobService {
663689
pendingYapealKrakenPlusAmount + pendingChfYapealKrakenMinusAmount + pendingEurYapealKrakenMinusAmount;
664690

665691
let fromScrypt =
666-
pendingChfScryptYapealPlusAmount + pendingEurScryptYapealPlusAmount + pendingScryptYapealMinusAmount;
692+
pendingChfScryptYapealPlusAmount +
693+
pendingEurScryptYapealPlusAmount +
694+
pendingEurScryptOlkyPlusAmount +
695+
pendingScryptYapealMinusAmount;
667696
let toScrypt =
668-
pendingYapealScryptPlusAmount + pendingChfYapealScryptMinusAmount + pendingEurYapealScryptMinusAmount;
697+
pendingYapealScryptPlusAmount +
698+
pendingChfYapealScryptMinusAmount +
699+
pendingEurYapealScryptMinusAmount +
700+
pendingEurOlkyScryptMinusAmount;
669701

670702
const fromScryptUnfiltered =
671703
pendingChfScryptYapealPlusAmountUnfiltered +
672704
pendingEurScryptYapealPlusAmountUnfiltered +
705+
pendingEurScryptOlkyPlusAmountUnfiltered +
673706
pendingScryptYapealMinusAmountUnfiltered;
674707
const toScryptUnfiltered =
675708
pendingYapealScryptPlusAmountUnfiltered +
676709
pendingChfYapealScryptMinusAmountUnfiltered +
677-
pendingEurYapealScryptMinusAmountUnfiltered;
710+
pendingEurYapealScryptMinusAmountUnfiltered +
711+
pendingEurOlkyScryptMinusAmountUnfiltered;
678712

679713
const errors = [];
680714

0 commit comments

Comments
 (0)