Skip to content

Commit

Permalink
Support ordering for namespaces by dApp. Change <set> to array
Browse files Browse the repository at this point in the history
  • Loading branch information
ant013 committed Dec 10, 2024
1 parent 79491b4 commit c7c4b37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Eip155ProposalHandler {
continue
}

set.items.insert(
set.items.append(
WalletConnectMainModule.BlockchainItem(
namespace: blockchain.namespace,
chainId: chainId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ extension WalletConnectMainModule {
}

struct BlockchainSet {
static var empty: BlockchainSet = .init(items: Set(), methods: Set(), events: Set())
static var empty: BlockchainSet = .init(items: [], methods: Set(), events: Set())

var items: Set<BlockchainItem>
var items: [BlockchainItem]
var methods: Set<String>
var events: Set<String>

mutating func formUnion(_ set: Self) {
items.formUnion(set.items)
items.append(contentsOf: set.items)
methods.formUnion(set.methods)
events.formUnion(set.events)
}
Expand Down

0 comments on commit c7c4b37

Please sign in to comment.