feat: support credit transfers and precious metal valuations
This commit is contained in:
1 parent
425b45c91a
commit
518aea1e59
39 files changed
+1572
-77
No files matched your search
@@ -25,6 +25,7 @@ export async function captureReplay(tx: Prisma.TransactionClient, userId: string
|
||||
}
|
||||
return async () => {
|
||||
const transfers = await tx.transfer.findMany({
|
||||
include: { source: true, target: true },
|
||||
where: { userId, OR: [{ sourceId: { in: ids } }, { targetId: { in: ids } }] },
|
||||
});
|
||||
for (const t of transfers) {
|
||||
@@ -33,6 +34,8 @@ export async function captureReplay(tx: Prisma.TransactionClient, userId: string
|
||||
t.amount.toString(),
|
||||
t.received.toString(),
|
||||
t.fee.toString(),
|
||||
t.source.side,
|
||||
t.target.side,
|
||||
);
|
||||
deltas.set(t.sourceRevisionId, d.source);
|
||||
deltas.set(t.targetRevisionId, d.target);
|
||||
|
||||
Reference in new issue
Block a user