-
Notifications
You must be signed in to change notification settings - Fork 172
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
#201 required chainid #203
Conversation
// func testSessionRequestEmptyNamespaceUnmatchingMethod() { | ||
// var didTriggerRequest = false | ||
// engine.onSessionRequest = { _ in didTriggerRequest = true } | ||
// | ||
// let session = WCSession.stub(isSelfController: true) | ||
// storageMock.setSession(session) | ||
// | ||
// let payload = WCRequestSubscriptionPayload.stubRequest(topic: session.topic, method: "someMethod", chainId: nil) | ||
// networkingInteractor.wcRequestPublisherSubject.send(payload) | ||
// | ||
// XCTAssertTrue(networkingInteractor.didRespondError) | ||
// XCTAssertFalse(didTriggerRequest) | ||
// } | ||
// | ||
// func testSessionRequestEmptyNamespaceMatchingMethod() { | ||
// var didTriggerRequest = false | ||
// engine.onSessionRequest = { _ in didTriggerRequest = true } | ||
// | ||
// var session = WCSession.stub(isSelfController: true) | ||
// session.updateNamespaces([Namespace(chains: [], methods: ["someMethod"], events: [])]) |
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.
wouldn't it better to just remove it? will stay in git history for reference.
a74afba
to
d792138
Compare
@@ -6,6 +6,7 @@ enum WalletConnectError: Error { | |||
case noSessionMatchingTopic(String) | |||
case sessionNotAcknowledged(String) | |||
case pairingNotSettled(String) | |||
case namespaceHasEmptyChains |
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.
personally I would prefer smth like: emptyChainsInNamespaceForbidden or invalidNamespaceStructure
closes #201
Makes
chainId
a required parameter in request and event payloads.