Closed Harman-singh-waraich closed 1 month ago
The changes simplify the SDK's function signatures by removing the alchemyApiKey
parameter from several functions, including callAction
, eventAction
, and executeActions
. A new function, validateContext
, is introduced to ensure required variables are present in the context before rendering templates. Type safety is enhanced across various functions. Significant updates are made to the subgraph.yaml
files and the package.json
for versioning and data source configurations. Additionally, new TypeScript configuration files are added, and existing configurations are modified to reflect changes in module handling and output settings.
File Path | Change Summary |
---|---|
kleros-sdk/package.json | Updated version to 2.1.7 , modified main entry point, added new dependencies, and updated scripts. |
kleros-sdk/src/dataMappings/actions/callAction.ts | Removed alchemyApiKey parameter from callAction function signature and updated error handling. |
kleros-sdk/src/dataMappings/actions/eventAction.ts | Removed alchemyApiKey parameter from eventAction function signature and updated error handling. |
kleros-sdk/src/dataMappings/executeActions.ts | Updated initialContext parameter type for executeActions function; removed context.alchemyApiKey . |
kleros-sdk/src/dataMappings/utils/replacePlaceholdersWithValues.ts | Added function validateContext to validate template variables in context. |
kleros-sdk/test/dataMappings.test.ts | Enhanced dispute template tests with new properties and updated handling for missing variables. |
subgraph/core/src/entities/Dispute.ts | Added updateDisputeRequestData function and modified createDisputeFromEvent to call it. |
web/src/context/Web3Provider.tsx | Added configureSDK import and modified alchemyTransport function definition. |
subgraph/core-neo/subgraph.yaml | Added new data sources and updated versioning in the subgraph configuration. |
subgraph/core-university/subgraph.yaml | Added new data sources and updated versioning in the subgraph configuration. |
subgraph/core/subgraph.yaml | Added new data sources, updated versioning, and modified event handlers in the subgraph configuration. |
kleros-sdk/src/index.ts | Exported all entities from ./sdk , ./types , ./utils , ./dataMappings , and ./dataMappings/utils . |
kleros-sdk/tsconfig.json | Updated TypeScript configuration, changing output directory and extending a new base config. |
kleros-sdk/vitest.config.ts | Introduced new configuration file for Vitest, excluding specific directories from test runs. |
tsconfig/base.json | Deleted file containing TypeScript configuration settings. |
tsconfig/base18.json | Added new TypeScript configuration extending from @tsconfig/node18/tsconfig.json . |
tsconfig/base20.json | Added new TypeScript configuration extending from @tsconfig/node20/tsconfig.json . |
tsconfig/react-library.json | Updated configuration to extend from base20.json and change ECMAScript library version. |
web/tsconfig.json | Removed "target": "es2020" from TypeScript configuration. |
totalCoherent
and totalResolvedDisputes
properties, which are relevant to the callAction
function's logic in the main PR, as both involve handling user metrics related to disputes and voting.Type: Enhancement :sparkles:
, Package: Web
🐰 In the fields where we play,
New functions hop in every day!
With keys for graphs, we leap and bound,
In code and joy, our changes found!
So gather 'round, both near and far,
For every change, we raise a star! 🌟
Name | Link |
---|---|
Latest commit | 7b2ccd3818f507353bae044f162ca01eb7563975 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet/deploys/671b41ad9ecef700084fb7dc |
Deploy Preview | https://deploy-preview-1703--kleros-v2-testnet.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | 7b2ccd3818f507353bae044f162ca01eb7563975 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-university/deploys/671b41add8fc25000815fa7b |
Deploy Preview | https://deploy-preview-1703--kleros-v2-university.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | 7b2ccd3818f507353bae044f162ca01eb7563975 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-neo/deploys/671b41addbf1160008c89689 |
Deploy Preview | https://deploy-preview-1703--kleros-v2-neo.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | 7b2ccd3818f507353bae044f162ca01eb7563975 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet-devtools/deploys/671b41addc5fd700089969bf |
Deploy Preview | https://deploy-preview-1703--kleros-v2-testnet-devtools.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Code Climate has analyzed commit d2cb2601 and detected 20 issues on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Complexity | 8 |
Duplication | 6 |
Style | 6 |
View more on Code Climate.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
PR-Codex overview
This PR focuses on significant updates and refactoring within the
kleros-sdk
, including the removal of obsolete files, enhancements in error handling, and the introduction of new utility functions. It also updates the TypeScript configuration and improves the integration of GraphQL queries.Detailed summary
tsconfig
,kleros-sdk/src/dataMappings
, andweb/src/hooks
.base18.json
,base20.json
.kleros-sdk/src/errors
.kleros-sdk/src/sdk.ts
.web/src/hooks/queries
.kleros-sdk/src/dataMappings/utils
.kleros-sdk/package.json
.kleros-sdk/test/__snapshots__
.Summary by CodeRabbit
New Features
Evidence
component to fetch dispute details instead of evidence group data.CaseDetails
component's routing for the evidence section.Bug Fixes