Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass Tenderly headers correctly #1241

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Pass Tenderly headers correctly #1241

merged 5 commits into from
Mar 5, 2024

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Mar 4, 2024

⚠️ Depends on #1240

Summary

This fixes the Tenderly requests to pass the body and headers correctly.

Changes

  • Fix addContract/deleteContract network request payloads

@iamacook iamacook self-assigned this Mar 4, 2024
@iamacook iamacook requested a review from a team as a code owner March 4, 2024 16:32
@coveralls
Copy link

coveralls commented Mar 4, 2024

Pull Request Test Coverage Report for Build 8157719394

Details

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

Files with Coverage Reduction New Missed Lines %
src/routes/transactions/entities/tests/human-description.builder.ts 3 60.0%
Totals Coverage Status
Change from base Build 8157075120: 0.0%
Covered Lines: 6385
Relevant Lines: 6607

💛 - Coveralls

} catch (error) {
console.log(error);
Copy link
Member

Choose a reason for hiding this comment

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

console.log left here.

@@ -70,7 +74,7 @@ export class TenderlyApi implements IAlertsApi {
async deleteContract(contract: AlertsDeletion): Promise<void> {
try {
const url = `${this.baseUrl}/api/v1/account/${this.account}/project/${this.project}/contract/${contract.chainId}/${contract.address}`;
await this.networkService.delete(url, {
await this.networkService.delete(url, undefined, {
Copy link
Member

Choose a reason for hiding this comment

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

This is out of the scope of this PR, but I'm considering it would be beneficial to accept arguments via an interface in this class functions (args: {...}) as we do in other places, to avoid hardcoding undefined which could be a bit error-prone.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree that it's a good addition. I will keep in mind for a follow up!

hectorgomezv
hectorgomezv previously approved these changes Mar 4, 2024
Base automatically changed from fetch-delete-headers to main March 4, 2024 17:13
@iamacook iamacook dismissed hectorgomezv’s stale review March 4, 2024 17:13

The base branch was changed.

Comment on lines 60 to 64
async delete<T>(
baseUrl: string,
data?: object,
{ params, headers }: NetworkRequest = {},
): Promise<NetworkResponse<T>> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this part of this PR 🤔 I would scope it only with the Tenderly changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was a rebase issue. It should now be resolved.

@iamacook iamacook requested a review from fmrsabino March 5, 2024 14:17
Copy link
Collaborator

@fmrsabino fmrsabino left a comment

Choose a reason for hiding this comment

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

👏

@iamacook iamacook merged commit b679d3a into main Mar 5, 2024
16 checks passed
@iamacook iamacook deleted the tenderly-headers branch March 5, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants