update ganache & add walletconnect

pull/5370/head
yann300 3 years ago
parent cfd9dc778e
commit 6bdc38008e
  1. 2
      apps/remix-ide/src/app/tabs/ganache-provider.tsx
  2. 14
      apps/remix-ide/src/app/udapp/run-tab.js
  3. 1
      apps/remix-ide/src/remixAppManager.js
  4. 1
      apps/remix-ide/src/remixEngine.js

@ -8,7 +8,7 @@ import { AbstractProvider } from './abstract-provider'
const profile = { const profile = {
name: 'ganache-provider', name: 'ganache-provider',
displayName: 'Ganache', displayName: 'Ganache Provider',
kind: 'provider', kind: 'provider',
description: 'Ganache', description: 'Ganache',
methods: ['sendAsync'], methods: ['sendAsync'],

@ -99,6 +99,20 @@ export class RunTab extends ViewPlugin {
async onInitDone () { async onInitDone () {
await this.call('manager', 'activatePlugin', 'hardhat-provider') await this.call('manager', 'activatePlugin', 'hardhat-provider')
await this.call('manager', 'activatePlugin', 'ganache-provider') await this.call('manager', 'activatePlugin', 'ganache-provider')
const udapp = this
await this.call('blockchain', 'addProvider', {
name: 'Wallet Connect',
provider: {
async sendAsync (payload, callback) {
try {
const result = await udapp.call('walletconnect', 'sendAsync', payload)
callback(null, result)
} catch (e) {
callback(e)
}
}
}
})
} }
writeFile (fileName, content) { writeFile (fileName, content) {

@ -133,6 +133,7 @@ export class RemixAppManager extends PluginManager {
} }
} }
return plugins.map(plugin => { return plugins.map(plugin => {
if (plugin.name === 'walletconnect') plugin.url = 'http://127.0.0.1:8081'
return new IframePlugin(plugin) return new IframePlugin(plugin)
// return new IframeReactPlugin(plugin) // return new IframeReactPlugin(plugin)
}) })

@ -18,6 +18,7 @@ export class RemixEngine extends Engine {
if (name === 'notification') return { queueTimeout: 60000 * 4 } if (name === 'notification') return { queueTimeout: 60000 * 4 }
if (name === 'sourcify') return { queueTimeout: 60000 * 4 } if (name === 'sourcify') return { queueTimeout: 60000 * 4 }
if (name === 'fetchAndCompile') return { queueTimeout: 60000 * 4 } if (name === 'fetchAndCompile') return { queueTimeout: 60000 * 4 }
if (name === 'walletconnect') return { queueTimeout: 60000 * 4 }
return { queueTimeout: 10000 } return { queueTimeout: 10000 }
} }

Loading…
Cancel
Save