Skip to content

Commit

Permalink
πŸ“ˆ server: attach installment data to sentry events
Browse files Browse the repository at this point in the history
  • Loading branch information
cruzdanilo committed Nov 1, 2024
1 parent 791cea5 commit 1eaea98
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/hooks/cryptomate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ export default new Hono().post(
} as const;
}
const preview = await previewPromise;
const { amounts } = startSpan({ name: "split installments", op: "exa.split" }, () =>
setContext("preview", preview);
const installments = startSpan({ name: "split installments", op: "exa.split" }, () =>
splitInstallments(
amount,
preview.floatingAssets,
Expand All @@ -157,9 +158,10 @@ export default new Hono().post(
preview.interestRateModel,
),
);
setContext("installments", installments);
return {
functionName: "collectInstallments",
args: [BigInt(firstMaturity), amounts, maxUint256, BigInt(timestamp), signature],
args: [BigInt(firstMaturity), installments.amounts, maxUint256, BigInt(timestamp), signature],
} as const;
})();
setContext("tx", { call });
Expand Down

0 comments on commit 1eaea98

Please sign in to comment.