Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions apps/circuit-compiler/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ module.exports = composePlugins(withNx(), (config) => {
})
)

// set the define plugin to load the WALLET_CONNECT_PROJECT_ID
config.plugins.push(
new webpack.DefinePlugin({
WALLET_CONNECT_PROJECT_ID: JSON.stringify(process.env.WALLET_CONNECT_PROJECT_ID),
})
)

// source-map loader
config.module.rules.push({
test: /\.js$/,
Expand Down
7 changes: 0 additions & 7 deletions apps/learneth/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ module.exports = composePlugins(withNx(), (config) => {
})
)

// set the define plugin to load the WALLET_CONNECT_PROJECT_ID
config.plugins.push(
new webpack.DefinePlugin({
WALLET_CONNECT_PROJECT_ID: JSON.stringify(process.env.WALLET_CONNECT_PROJECT_ID),
})
)

// source-map loader
config.module.rules.push({
test: /\.js$/,
Expand Down
7 changes: 0 additions & 7 deletions apps/quick-dapp/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ module.exports = composePlugins(withNx(), (config) => {
})
)

// set the define plugin to load the WALLET_CONNECT_PROJECT_ID
config.plugins.push(
new webpack.DefinePlugin({
WALLET_CONNECT_PROJECT_ID: JSON.stringify(process.env.WALLET_CONNECT_PROJECT_ID),
})
)

// source-map loader
config.module.rules.push({
test: /\.js$/,
Expand Down
18 changes: 15 additions & 3 deletions apps/remix-dapp/src/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import { toBytes, addHexPrefix } from '@ethereumjs/util';
import { toast } from 'react-toastify';
import txRunner from '../utils/txRunner';
import metamask from '../utils/metamask';
import walletConnect from '../utils/walletConnect';
import buildData from '../utils/buildData';

import walletConnect from '../utils/walletConnect';
const { txFormat, txHelper: { makeFullTypeDefinition } } = execution;

const decodeInputParams = (data: any, abi: any) => {
Expand Down Expand Up @@ -61,8 +60,21 @@ export const setProvider = async (payload: any) => {
}

if (provider === 'walletconnect') {
walletConnect.openModal().then(() => {
txRunner.setProvider(walletConnect as any);
});
}

const isConnected = walletConnect.isWalletConnected()

if (isConnected) {
await walletConnect.openModal()
txRunner.setProvider(walletConnect as any);
walletConnect.subscribeToEvents();
} else {
await walletConnect.openModal()
walletConnect.events.on('connectionSuccessful', () => {
txRunner.setProvider(walletConnect as any)
})
}
};

Expand Down
8 changes: 4 additions & 4 deletions apps/remix-dapp/src/components/SettingsUI/network.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ export function NetworkUI() {
<option value={'metamask'} key={'metamask'}>
MetaMask
</option>
<option value={'walletconnect'} key={'walletconnect'}>
{/* <option value={'walletconnect'} key={'walletconnect'}>
WalletConnect
</option>
</option> */}
</select>
</div>
<div className="position-relative w-100" data-id="settingsNetworkEnv">
<span className="badge badge-secondary">{networkName}</span>
</div>
{provider === 'walletconnect' && (
{/* {provider === 'walletconnect' && (
<div className="mt-2">
<w3m-button />
</div>
)}
)} */}
</div>
);
}
1 change: 1 addition & 0 deletions apps/remix-dapp/src/locales/en/udapp.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"udapp.environmentDocs": "Click for docs about Environment",
"udapp.tooltipText2": "Open chainlist.org and get the connection specs of the chain you want to interact with.",
"udapp.tooltipText3": "Click to open a bridge for converting L1 mainnet ETH to the selected network currency.",
"udapp.tooltipText14": "Click to open a wallet connect modal.",

"udapp._comment_instanceContainerUI.tsx": "libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx",
"udapp.deployedContracts": "Deployed Contracts",
Expand Down
15 changes: 7 additions & 8 deletions apps/remix-dapp/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ export const constants = {
zkSync,
zora,
],
};

export const PROJECT_ID = 'a4ba105e642ae64cdb5b9a86debc0a66';
export const METADATA = {
name: 'Quick Dapp',
description: 'Quick Dapp',
url: window.origin,
icons: ['https://remix.ethereum.org/favicon.ico'],
PROJECT_ID: 'a4ba105e642ae64cdb5b9a86debc0a66',
METADATA: {
name: 'Quick Dapp',
description: 'Quick Dapp',
url: window.origin,
icons: ['https://remix.ethereum.org/favicon.ico'],
}
};
Loading