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

[Relay] Relay Singleton instance #438

Merged
merged 7 commits into from
Aug 17, 2022
Merged

Conversation

flypaper0
Copy link
Contributor

@flypaper0 flypaper0 commented Aug 15, 2022

Description

  • Relay singleton wrapper
  • Replace onMessage with combine publisher
  • SignClient Delegate removed, Sign singleton is SignClient instance
  • RelayClient onMessage replaced with combine publisher

Resolves #430 #431 #432

How Has This Been Tested?

  • run unit, integration tests

Due Dilligence

Copy link
Contributor

@llbartekll llbartekll left a comment

Choose a reason for hiding this comment

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

Good work! much cleaner.
I just wonder if we should not require relay configuration separately, consider that wallet want to integrate sign and chat alongside wouldn't it be better if configuration looks as follows?:

  1. relay.configure(projectId etc.)
  2. chat.configure()
  3. sign.configure()
    imo currently is better for only one sdk because we do not expose relay configuration but it will e quite weird if we require:
    1 . chat.configure(projectId? etc)
    2 . sign.configure(projectId? etc)

func didChangeSocketConnectionStatus(_ status: SocketConnectionStatus) {
onConnected?()
}
class ClientDelegate {
Copy link
Contributor

@llbartekll llbartekll Aug 17, 2022

Choose a reason for hiding this comment

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

actually, we do not depend on sign delegate anymore , so we could remove this class entirely.
maybe we can create an issue and do it at some point?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ClientDelegate usage looks good in tests for me

Copy link
Contributor

Choose a reason for hiding this comment

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

we could subscribe for SignClients events only now

@flypaper0 flypaper0 merged commit 5d25aa3 into develop Aug 17, 2022
@flypaper0 flypaper0 deleted the feature/singleton-relay-#431 branch August 17, 2022 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants