Skip to content

Commit 7001003

Browse files
committed
fix: linting
1 parent d91cab7 commit 7001003

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

kleros-sdk/src/dataMappings/actions/callAction.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ export const callAction = async (mapping: AbiCallMapping) => {
88
const publicClient = getPublicClient();
99

1010
const { abi: source, address, args, seek, populate } = mapping;
11-
let parsedAbi = typeof source === "string" ? parseAbiItem(source) : source;
11+
const parsedAbi = typeof source === "string" ? parseAbiItem(source) : source;
1212

1313
const data = await publicClient.readContract({
14-
address: address,
14+
address,
1515
abi: [parsedAbi],
16-
args: args,
16+
args,
1717
});
1818

1919
return createResultObject(data, seek, populate);

kleros-sdk/src/dataMappings/actions/eventAction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ export const eventAction = async (mapping: AbiEventMapping) => {
88
const publicClient = getPublicClient();
99

1010
const { abi: source, address, eventFilter, seek, populate } = mapping;
11-
let parsedAbi = typeof source === "string" ? parseAbiItem(source) : source;
11+
const parsedAbi = typeof source === "string" ? parseAbiItem(source) : source;
1212

1313
const filter = await publicClient.createEventFilter({
14-
address: address,
14+
address,
1515
event: parsedAbi,
1616
args: eventFilter.args,
1717
fromBlock: eventFilter.fromBlock,

kleros-sdk/src/dataMappings/executeActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const executeAction = async (mapping: ActionMapping, context = {}) => {
3838
};
3939

4040
export const executeActions = async (mappings, initialContext = {}) => {
41-
let context = { ...initialContext };
41+
const context = { ...initialContext };
4242

4343
for (const mapping of mappings) {
4444
const actionResult = await executeAction(mapping, context);

kleros-sdk/src/dataMappings/retrieveRealityData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,6 @@ export const retrieveRealityData = async (realityQuestionID: string, arbitrable?
102102
realityAddress: questionData.arbitrator,
103103
questionId: questionData.realityQuestionID,
104104
realityUser: questionData.realityUser,
105-
answers: answers,
105+
answers,
106106
};
107107
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Can this be replaced by Mustache ?
22
export const createResultObject = (sourceData, seek, populate) => {
3-
let result = {};
3+
const result = {};
44
seek.forEach((key, idx) => {
55
let foundValue;
66
if (typeof sourceData !== "object" || key === "0") {

kleros-sdk/test/dataMappings.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ describe("subgraphAction with variables", () => {
5151

5252
const mapping = {
5353
type: "graphql",
54-
endpoint: endpoint,
55-
query: query,
56-
variables: variables,
57-
seek: seek,
58-
populate: populate,
54+
endpoint,
55+
query,
56+
variables,
57+
seek,
58+
populate,
5959
};
6060

6161
const result = await subgraphAction(mapping);
@@ -78,7 +78,7 @@ describe("callAction", () => {
7878

7979
const mapping = {
8080
type: "abi/call",
81-
abi: abi,
81+
abi,
8282
address: contractAddress,
8383
args: [knownAddress],
8484
seek: [""],
@@ -104,8 +104,8 @@ describe("eventAction", () => {
104104
abi: eventAbi,
105105
address: contractAddress,
106106
eventFilter: {
107-
fromBlock: fromBlock,
108-
toBlock: toBlock,
107+
fromBlock,
108+
toBlock,
109109
},
110110
seek: ["from", "to", "value"],
111111
populate: ["fromAddress", "toAddress", "transferValue"],
@@ -128,9 +128,9 @@ describe("fetchIpfsJsonAction", () => {
128128

129129
const mapping = {
130130
type: "fetch/ipfs/json",
131-
ipfsUri: ipfsUri,
132-
seek: seek,
133-
populate: populate,
131+
ipfsUri,
132+
seek,
133+
populate,
134134
};
135135

136136
const result = await fetchIpfsJsonAction(mapping);

0 commit comments

Comments
 (0)