Skip to content

Commit 33a47a9

Browse files
committed
chore: address-rabbit-feedback
1 parent 2925a4e commit 33a47a9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kleros-sdk/src/dataMappings/utils/lambdas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const lambdas = {
22
// Converts a value to hex representation
33
hex: function () {
4-
return function (text: string, render: Function) {
4+
return function (text: string, render: (value: string) => string) {
55
const originalValueStr = render(text);
66
const num = parseInt(originalValueStr, 10);
77
if (!isNaN(num)) {

kleros-sdk/src/dataMappings/utils/populateTemplate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import DisputeDetailsSchema, { RefuseToArbitrateAnswer } from "./disputeDetailsS
44
import { lambdas } from "./lambdas";
55

66
export const populateTemplate = (mustacheTemplate: string, data: any): DisputeDetails => {
7-
const render = mustache.render(mustacheTemplate, { ...data, ...lambdas });
7+
const render = mustache.render(mustacheTemplate, { ...lambdas, ...data });
88
const dispute = JSON.parse(render);
99

1010
const validation = DisputeDetailsSchema.safeParse(dispute);

0 commit comments

Comments
 (0)