-
Notifications
You must be signed in to change notification settings - Fork 180
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
#207 Update namespaces #212
Conversation
@@ -5,8 +5,7 @@ import WalletConnectKMS | |||
import Combine | |||
|
|||
final class ControllerSessionStateMachine: SessionStateMachineValidating { | |||
var onAccountsUpdate: ((String, Set<Account>)->())? | |||
var onNamespacesUpdate: ((String, Set<Namespace>)->())? | |||
var onNamespacesUpdate: ((String, [String: SessionNamespace])->())? | |||
var onExpiryUpdate: ((String, Date)->())? |
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.
we could rename that callback to onExtend
to not use expiry update
any more
@@ -69,17 +69,17 @@ final class PairingEngine { | |||
return uri | |||
} | |||
|
|||
func propose(pairingTopic: String, namespaces: Set<Namespace>, relay: RelayProtocolOptions) async throws { | |||
func propose(pairingTopic: String, namespaces: [String: ProposalNamespace], relay: RelayProtocolOptions) async throws { |
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.
what do you think of having a ProposalNamespaces
typealias for [String: ProposalNamespace]
?
case .sessionUpdateExpiry: | ||
case .sessionUpdate: | ||
handleUpdateResponse(topic: response.topic, result: response.result) | ||
case .sessionExtend: | ||
handleUpdateExpiryResponse(topic: response.topic, result: response.result) |
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.
handleExtendResponse
?
@@ -6,8 +6,7 @@ import Combine | |||
|
|||
final class NonControllerSessionStateMachine: SessionStateMachineValidating { | |||
|
|||
var onAccountsUpdate: ((String, Set<Account>)->())? | |||
var onNamespacesUpdate: ((String, Set<Namespace>)->())? | |||
var onNamespacesUpdate: ((String, [String: SessionNamespace])->())? | |||
var onExpiryUpdate: ((String, Date) -> ())? |
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.
onExtend
closes #207, closes #202
Refactors the client to work with the new namespace spec. Does not implement validation yet.
updateAccount
method.updateExpiry
back toextend
Temporary changes:
Namespace validation will be done in next PR.