Skip to content

Commit

Permalink
chore: remove schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler committed Jun 5, 2024
1 parent 10f4d44 commit 7fb635f
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 651 deletions.
1 change: 0 additions & 1 deletion integrations/tendermint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"dependencies": {
"@kyvejs/protocol": "1.1.7",
"ajv": "^8.12.0",
"axios": "^0.27.2",
"dotenv": "^16.3.1"
},
Expand Down
27 changes: 0 additions & 27 deletions integrations/tendermint/src/runtime.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { DataItem, IRuntime, Validator, VOTE } from '@kyvejs/protocol';
import { name, version } from '../package.json';
import axios from 'axios';
import Ajv from 'ajv';
import block_schema from './schemas/block.json';
import block_results_schema from './schemas/block_result.json';

const ajv = new Ajv();

// Tendermint config
interface IConfig {
Expand Down Expand Up @@ -100,28 +95,6 @@ export default class Tendermint implements IRuntime {
);
}

// validate block schema
const block_validate = ajv.compile(block_schema);

if (!block_validate(item.value.block)) {
throw new Error(
`Block schema validation failed: ${JSON.stringify(
block_validate.errors
)}`
);
}

// validate block_results schema
const block_results_validate = ajv.compile(block_results_schema);

if (!block_results_validate(item.value.block_results)) {
throw new Error(
`Block results schema validation failed: ${JSON.stringify(
block_results_validate.errors
)}`
);
}

return true;
}

Expand Down
345 changes: 0 additions & 345 deletions integrations/tendermint/src/schemas/block.json

This file was deleted.

Loading

0 comments on commit 7fb635f

Please sign in to comment.