-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…268) * Enabled session approve test, failing * Workaround fix test * Refactor working session approve test * Renamed test to SignClientTests * Removed controller flag from tests Co-authored-by: André Vants
- Loading branch information
1 parent
147e100
commit 4b5f6dc
Showing
7 changed files
with
118 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import WalletConnectSign | ||
|
||
extension ProposalNamespace { | ||
static func stubRequired() -> [String: ProposalNamespace] { | ||
return [ | ||
"eip155": ProposalNamespace( | ||
chains: [Blockchain("eip155:1")!], | ||
methods: ["personal_sign"], | ||
events: []) | ||
] | ||
} | ||
} | ||
|
||
extension SessionNamespace { | ||
static func make(toRespond namespaces: [String: ProposalNamespace]) -> [String: SessionNamespace] { | ||
return namespaces.mapValues { proposalNamespace in | ||
SessionNamespace( | ||
accounts: Set(proposalNamespace.chains.map { Account(blockchain: $0, address: "0x00")! }), | ||
methods: proposalNamespace.methods, | ||
events: proposalNamespace.events | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters