Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
add metadata on WalletConnect init (#347)
Browse files Browse the repository at this point in the history
* add metadata on WalletConnect init

* add changeset

* fix:typo changeset

* chore: update changeset

---------

Co-authored-by: Tom Meagher <[email protected]>
  • Loading branch information
glitch-txs and tmm authored Jun 20, 2023
1 parent f6ee133 commit 28219ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cyan-cougars-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/connectors": minor
---

Added metadata property to WalletConnect init function
8 changes: 7 additions & 1 deletion packages/connectors/src/walletConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,12 @@ export class WalletConnectConnector extends Connector<
} = await import('@walletconnect/ethereum-provider')
const [defaultChain, ...optionalChains] = this.chains.map(({ id }) => id)
if (defaultChain) {
const { projectId, showQrModal = true, qrModalOptions } = this.options
const {
projectId,
showQrModal = true,
qrModalOptions,
metadata,
} = this.options
this.#provider = await EthereumProvider.init({
showQrModal,
qrModalOptions,
Expand All @@ -299,6 +304,7 @@ export class WalletConnectConnector extends Connector<
chain.rpcUrls.default.http[0]!,
]),
),
metadata,
})
}
}
Expand Down

0 comments on commit 28219ae

Please sign in to comment.