Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Small Code typing improvement #88

Merged
merged 3 commits into from
May 20, 2022
Merged

Small Code typing improvement #88

merged 3 commits into from
May 20, 2022

Conversation

henrypalacios
Copy link
Contributor

@henrypalacios henrypalacios commented May 6, 2022

Summary

  • Remove unnecessary OrderMetaData from cow-sdk

  • Fulfill with the rules alerted in SearchComponent

  • Comply with the rules alerted in COW_SDK

Background

@henrypalacios henrypalacios added app:Explorer Explorer App Low Severity indicator for defects. It won't cause any major break-down of the system Protofire labels May 6, 2022
@henrypalacios henrypalacios self-assigned this May 6, 2022
@henrypalacios henrypalacios mentioned this pull request May 6, 2022
@coveralls
Copy link

coveralls commented May 6, 2022

Pull Request Test Coverage Report for Build 2358130585

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 44.267%

Totals Coverage Status
Change from base Build 2278377333: 0.0%
Covered Lines: 2170
Relevant Lines: 4173

💛 - Coveralls

export type SingleOrder = RawOrder | OrderMetaData | null
export type MultipleOrders = RawOrder[] | OrderMetaData[] | null
export type SingleOrder = RawOrder | null
export type MultipleOrders = RawOrder[] | null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both types were the same

src/api/operator/types.ts

import { OrderMetaData, TradeMetaData } from '@cowprotocol/cow-sdk'

// Raw API response
export type RawOrder = OrderMetaData

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this was discussed in this comment.

@github-actions
Copy link

github-actions bot commented May 6, 2022

@henrypalacios
Copy link
Contributor Author

henrypalacios commented May 19, 2022

@ramirotw, @matextrem could we make a temporary definition so as not to use any in COW_SDK statement?

Or will you have the types defined in the SDK package?

@matextrem
Copy link
Contributor

matextrem commented May 19, 2022

@ramirotw, @matextrem could we make a temporary definition so as not to use any in COW_SDK statement?

Or will you have the types defined in the SDK package?

It was already exported by the sdk, so SupportedChainId can be imported and used here

@henrypalacios henrypalacios marked this pull request as ready for review May 20, 2022 12:09
@henrypalacios henrypalacios merged commit 183ee90 into develop May 20, 2022
@henrypalacios henrypalacios deleted the typing-improvement branch May 20, 2022 14:15
@henrypalacios henrypalacios mentioned this pull request Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
app:Explorer Explorer App Low Severity indicator for defects. It won't cause any major break-down of the system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants