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

[Refactor] Networking package Part 1 #391 #480

Merged
merged 4 commits into from
Sep 2, 2022

Conversation

flypaper0
Copy link
Contributor

Description

  • WalletConnectNetwork package
  • package connected to Auth and Chat SDK

Resolves #391

How Has This Been Tested?

Run unit/integration tests

Due Dilligence

  • Breaking change
  • Requires a documentation update

@flypaper0 flypaper0 requested a review from llbartekll September 1, 2022 19:29
@arein arein added the accepted label Sep 1, 2022
@flypaper0 flypaper0 changed the base branch from main to develop September 1, 2022 19:30
Copy link

@jackromo888 jackromo888 left a comment

Choose a reason for hiding this comment

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

k

Comment on lines -16 to +18
let jsonRpcHistory = JsonRpcHistory<ChatRequestParams>(logger: logger, keyValueStore: CodableStore<JsonRpcRecord>(defaults: keyValueStorage, identifier: StorageDomainIdentifiers.jsonRpcHistory.rawValue))
let networkingInteractor = NetworkingInteractor(relayClient: relayClient, serializer: serialiser, logger: logger, jsonRpcHistory: jsonRpcHistory)
let rpcHistory = RPCHistory(keyValueStore: CodableStore<RPCHistory.Record>(defaults: keyValueStorage, identifier: StorageDomainIdentifiers.jsonRpcHistory.rawValue))
Copy link
Contributor

Choose a reason for hiding this comment

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

have you tried if old records will be derived with new RPCHistory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

decided to not make migration

}.store(in: &publishers)
}
networkingInteractor.requestPublisher.sink { [unowned self] payload in
guard payload.request.method == "wc_chatInvite"
Copy link
Contributor

Choose a reason for hiding this comment

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

what do you think if at some point we have an enum with protocol methods? so we do like:
guard payload.request.method == ChatProtocolMethods.invite.rawValue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will solve these issue in next PR

Sources/Chat/Types/Message.swift Show resolved Hide resolved
@flypaper0 flypaper0 force-pushed the feature/networking-package-#391 branch from 429b32e to a9f921b Compare September 2, 2022 16:47
@flypaper0 flypaper0 merged commit 40735fb into develop Sep 2, 2022
@flypaper0 flypaper0 deleted the feature/networking-package-#391 branch September 2, 2022 17:18
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.

Refactor NetworkInteractor for usage in all APIs
4 participants