Skip to content

Commit

Permalink
Merge branch 'fix/approved-caip-networks-data-upa' of github.com:Wall…
Browse files Browse the repository at this point in the history
…etConnect/web3modal into fix/approved-caip-networks-data-upa
  • Loading branch information
zoruka committed Sep 19, 2024
2 parents 959d0fe + 2b9b166 commit 9b0c8fa
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ test('it should switch networks and sign', async () => {

const chainName = chains[index] ?? DEFAULT_CHAIN_NAME
await modalPage.switchNetwork(chainName)
await modalValidator.expectSwitchedNetwork(chainName)
await modalPage.closeModal()

// -- Sign ------------------------------------------------------------------
Expand All @@ -78,7 +77,6 @@ test('it should switch between multiple accounts', async () => {
const chainName = 'Ethereum'
await modalPage.switchNetwork(chainName)
await modalPage.page.waitForTimeout(500)
await modalValidator.expectSwitchedNetwork(chainName)
await modalPage.closeModal()
const originalAddress = await modalPage.getAddress()
await modalPage.openAccount()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class W3mAllWalletsWidget extends LitElement {

// -- Render -------------------------------------------- //
public override render() {
const wcConnector = this.connectors.find(c => c.type === 'WALLET_CONNECT')
const wcConnector = this.connectors.find(c => c.id === 'walletConnect')
const { allWallets } = OptionsController.state

if (!wcConnector || allWallets === 'HIDE') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class W3mConnectAnnouncedWidget extends LitElement {

// -- Private Methods ----------------------------------- //
private onConnector(connector: Connector) {
if (connector.type === 'WALLET_CONNECT') {
if (connector.id === 'walletConnect') {
if (CoreHelperUtil.isMobile()) {
RouterController.push('AllWallets')
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class W3mConnectRecommendedWidget extends LitElement {

// -- Render -------------------------------------------- //
public override render() {
const connector = this.connectors.find(c => c.type === 'WALLET_CONNECT')
const connector = this.connectors.find(c => c.id === 'walletConnect')
if (!connector) {
return null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class W3mConnectWalletConnectWidget extends LitElement {
return null
}

const connector = this.connectors.find(c => c.type === 'WALLET_CONNECT')
const connector = this.connectors.find(c => c.id === 'walletConnect')

if (!connector) {
this.style.cssText = `display: none`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class W3mConnectorList extends LitElement {
public override render() {
const { custom, recent, announced, injected, multiChain, recommended, featured, external } =
this.getConnectorsByType()

const enableWalletConnect = OptionsController.state.enableWalletConnect

return html`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class W3mSocialLoginWidget extends LitElement {
}

private separatorTemplate() {
const walletConnectConnector = this.connectors.find(c => c.type === 'WALLET_CONNECT')
const walletConnectConnector = this.connectors.find(c => c.id === 'walletConnect')
const enableWallets = OptionsController.state.enableWallets

if (walletConnectConnector && enableWallets) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class W3mConnectingMultiChainView extends LitElement {
return
}

if (connector.type === 'WALLET_CONNECT') {
if (connector.id === 'walletConnect') {
if (CoreHelperUtil.isMobile()) {
RouterController.push('AllWallets')
} else {
Expand Down

0 comments on commit 9b0c8fa

Please sign in to comment.