pull/1917/head
bunsenstraat 3 years ago
parent db43f1926f
commit a90caf699f
  1. 4
      apps/remix-ide/src/app/plugins/permission-handler-plugin.tsx
  2. 6
      apps/remix-ide/src/app/plugins/remixd-handle.tsx
  3. 4
      apps/remix-ide/src/app/tabs/hardhat-provider.tsx
  4. 12
      libs/remix-core-plugin/src/lib/gist-handler.ts

@ -72,7 +72,7 @@ export class PermissionHandlerPlugin extends Plugin {
const { allow, hash } = this.permissions[to.name][method][from.name]
if (!allow) {
const warning = this.notAllowWarning(from, to, method)
this.call('modal', 'toast', warning)
this.call('notification', 'toast', warning)
return false
}
return hash === from.hash
@ -100,7 +100,7 @@ export class PermissionHandlerPlugin extends Plugin {
cancelLabel: 'Decline'
}
const result = await this.call('modal', 'modal', modal)
const result = await this.call('notification', 'modal', modal)
return new Promise((resolve, reject) => {
if (result) {
if (this.permissions[to.name][method][from.name]) {

@ -69,7 +69,7 @@ export class RemixdHandle extends WebsocketPlugin {
id: 'connectionAlert',
message: 'Cannot connect to the remixd daemon. Please make sure you have the remixd running in the background.'
}
this.call('modal', 'alert', alert)
this.call('notification', 'alert', alert)
this.canceled()
} else {
const intervalId = setInterval(() => {
@ -80,7 +80,7 @@ export class RemixdHandle extends WebsocketPlugin {
id: 'connectionAlert',
message: 'Connection to remixd terminated.Please make sure remixd is still running in the background.'
}
this.call('modal', 'alert', alert)
this.call('notification', 'alert', alert)
this.canceled()
}
}, 3000)
@ -102,7 +102,7 @@ export class RemixdHandle extends WebsocketPlugin {
okLabel: 'Connect',
cancelLabel: 'Cancel',
}
const result = await this.call('modal', 'modal', mod)
const result = await this.call('notification', 'modal', mod)
if(result) {
try {
this.localhostProvider.preInit()

@ -83,7 +83,7 @@ export class HardhatProvider extends Plugin {
},
defaultValue: 'http://127.0.0.1:8545'
}
this.call('modal', 'modal', modalContent)
this.call('notification', 'modal', modalContent)
})
})()
} catch (e) {
@ -114,7 +114,7 @@ export class HardhatProvider extends Plugin {
title: 'Hardhat Provider',
message: `Error while connecting to the hardhat provider: ${error.message}`,
}
this.call('modal', 'alert', modalContent)
this.call('notification', 'alert', modalContent)
await this.call('udapp', 'setEnvironmentMode', { context: 'vm', fork: 'london' })
this.provider = null
setTimeout(_ => { this.blocked = false }, 1000) // we wait 1 second for letting remix to switch to vm

@ -45,7 +45,7 @@ export class GistHandler extends Plugin {
setTimeout(() => reject(new Error('Hide')), 0)
}
}
this.call('modal', 'modal', modalContent)
this.call('notification', 'modal', modalContent)
})
})()
} catch (e) {
@ -63,7 +63,7 @@ export class GistHandler extends Plugin {
title: 'Gist load error',
message: 'Error while loading gist. Please provide a valid Gist ID or URL.'
}
this.call('modal', 'alert', modalContent)
this.call('notification', 'alert', modalContent)
}
} else {
const modalContent = {
@ -71,7 +71,7 @@ export class GistHandler extends Plugin {
title: 'Gist load error',
message: 'Error while loading gist. Id cannot be empty.'
}
this.call('modal', 'alert', modalContent)
this.call('notification', 'alert', modalContent)
}
return loadingFromGist
} else {
@ -97,7 +97,7 @@ export class GistHandler extends Plugin {
modalType: 'alert',
okLabel: 'OK'
}
await this.call('modal', 'modal', modalContent)
await this.call('notification', 'modal', modalContent)
return
}
} catch (e: any) {
@ -107,7 +107,7 @@ export class GistHandler extends Plugin {
message: e.message
}
await this.call('modal', 'alert', modalContent)
await this.call('notification', 'alert', modalContent)
return
}
@ -124,7 +124,7 @@ export class GistHandler extends Plugin {
message: errorSavingFiles.message || errorSavingFiles
}
this.call('modal', 'alert', modalContent)
this.call('notification', 'alert', modalContent)
}
})
})

Loading…
Cancel
Save