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

[Verify, Echo] Fallback to .org #1016

Merged
merged 8 commits into from
Aug 16, 2023
Merged

Conversation

alexander-lsvk
Copy link
Contributor

Description

Resolves # (issue)

How Has This Been Tested?

Due Dilligence

  • Breaking change
  • Requires a documentation update

@alexander-lsvk alexander-lsvk temporarily deployed to internal August 7, 2023 18:47 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal August 7, 2023 18:47 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal August 8, 2023 12:01 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal August 8, 2023 12:01 — with GitHub Actions Inactive
Copy link
Contributor

@radeknovis radeknovis left a comment

Choose a reason for hiding this comment

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

Left mostly minor questions, otherwise looks good!

Sources/HTTPClient/HTTPNetworkClient.swift Outdated Show resolved Hide resolved
Sources/HTTPClient/HTTPNetworkClient.swift Show resolved Hide resolved
case dataTaskError(Error)
case noResponse
case badStatusCode(Int)
case responseDataNil
case jsonDecodeFailed(Error, Data)

public static func ==(lhs: HTTPError, rhs: HTTPError) -> Bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I wonder if you could use if case let pattern matching instead of conforming to Equatable. When I'm not sure how to write it I use this website https://fuckingifcaseletsyntax.com/ :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But the enum still has to be equitable for this, no? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Not necessarily if case let works in same way as switch, and you don't need Equatable for the switch.

@alexander-lsvk alexander-lsvk temporarily deployed to internal August 10, 2023 08:43 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal August 10, 2023 17:43 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal August 10, 2023 17:43 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal August 11, 2023 10:24 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal August 11, 2023 15:28 — with GitHub Actions Inactive
@asi90sp asi90sp mentioned this pull request Aug 13, 2023
Sources/WalletConnectEcho/EchoClient.swift Outdated Show resolved Hide resolved
Sources/WalletConnectEcho/EchoClient.swift Outdated Show resolved Hide resolved
Comment on lines 37 to 49
return try await originVerifier.verifyOrigin(assertionId: assertionId)
do {
return try await originVerifier.verifyOrigin(assertionId: assertionId)
} catch {
if (error as? HTTPError) == .couldNotConnect && !fallback {
fallback = true
originVerifier.verifyHostFallback()
return try await verifyOrigin(assertionId: assertionId)
}
throw error
}
Copy link
Contributor

Choose a reason for hiding this comment

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

same here could we move the implementation from the client?

Copy link
Contributor

Choose a reason for hiding this comment

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

@llbartekll done

it's still in the client 😅

@alexander-lsvk alexander-lsvk temporarily deployed to internal August 14, 2023 12:36 — with GitHub Actions Inactive
@alexander-lsvk
Copy link
Contributor Author

@llbartekll done

@alexander-lsvk alexander-lsvk temporarily deployed to internal August 16, 2023 09:26 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal August 16, 2023 09:39 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk merged commit 37dc259 into develop Aug 16, 2023
8 checks passed
@alexander-lsvk alexander-lsvk deleted the verify-echo-fallback-to-org branch August 16, 2023 09:52
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.

3 participants