-
Notifications
You must be signed in to change notification settings - Fork 191
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
[Push] Add push messages history getter, add account to subscription #675
Conversation
add account to push subscription
…lletConnect/WalletConnectSwiftV2 into add-get-push-messages # Conflicts: # Sources/WalletConnectPush/Types/PushSubscription.swift # Sources/WalletConnectUtils/RPCHistory/RPCHistory.swift
@@ -45,6 +46,7 @@ public class WalletPushClient { | |||
proposeResponder: PushRequestResponder, | |||
pushMessageSubscriber: PushMessageSubscriber, | |||
subscriptionsProvider: SubscriptionsProvider, | |||
pushMessagesProvider: PushMessagesProvider, | |||
deletePushSubscriptionService: DeletePushSubscriptionService, | |||
deletePushSubscriptionSubscriber: DeletePushSubscriptionSubscriber, | |||
resubscribeService: PushResubscribeService) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resubscribeService unused in PushClient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is in use, it's calling setUpResubscription func after initialisation
import Foundation | ||
import WalletConnectUtils | ||
|
||
class PushMessagesProvider { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
public func getAll<Object: Codable>(of type: Object.Type, topic: String) -> [Object] { | ||
return storage.getAll() | ||
.filter{$0.topic == topic} | ||
.compactMap { record in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.compactMap { try? $0.request.params?.get(Object.self) }
according to spec change
https://github.com/WalletConnect/walletconnect-docs/pull/416/files