Skip to content

Commit 7d5ed21

Browse files
committed
refactor(kleros-sdk): sonar-cloud-fixes
1 parent 9b4e9d2 commit 7d5ed21

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ export const validateFetchIpfsJsonMapping = (mapping: ActionMapping) => {
3030
};
3131

3232
export const validateRealityMapping = (mapping: ActionMapping) => {
33-
if (mapping.type !== "reality" || typeof (mapping as RealityMapping).realityQuestionID !== "string") {
33+
if (mapping.type !== "reality" || typeof mapping.realityQuestionID !== "string") {
3434
throw new InvalidMappingError("Expected field 'realityQuestionID' to be a string.");
3535
}
36-
return mapping as RealityMapping;
36+
return mapping;
3737
};
3838

3939
const validateMapping = <T extends ActionMapping>(mapping: T, requiredFields: (keyof T)[]) => {

kleros-sdk/vitest.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { defineConfig } from "vitest/config";
2-
import { configDefaults } from "vitest/config";
1+
import { defineConfig, configDefaults } from "vitest/config";
32

43
export default defineConfig({
54
test: {

0 commit comments

Comments
 (0)