added toast

r_light
yann300 4 months ago
parent 4c68f8bf7c
commit 6f81ad5fdd
  1. 6
      apps/remix-ide/src/app/providers/environment-explorer.tsx

@ -113,11 +113,13 @@ export class EnvironmentExplorer extends ViewPlugin {
pinStateCallback={async (pinned: boolean) => {
if (pinned) {
this.emit('providerPinned', provider.name, provider)
this.call('notification', 'toast', `"${provider.displayName}" has been added to the Network list of the Deploy & Run Transactions module.`)
return true
}
const providerName = await this.call('blockchain', 'getProvider')
if (providerName !== provider.name) {
this.emit('providerUnpinned', provider.name, provider)
this.call('notification', 'toast', `"${provider.displayName}" has been removed from the Network list of the Deploy & Run Transactions module.`)
return true
} else {
this.call('notification', 'toast', 'Cannot unpin the current selected provider')
@ -144,11 +146,13 @@ export class EnvironmentExplorer extends ViewPlugin {
pinStateCallback={async (pinned: boolean) => {
if (pinned) {
this.emit('providerPinned', provider.name, provider)
this.call('notification', 'toast', `"${provider.displayName}" has been added to the Network list of the Deploy & Run Transactions module.`)
return true
}
const providerName = await this.call('blockchain', 'getProvider')
if (providerName !== provider.name) {
this.emit('providerUnpinned', provider.name, provider)
this.call('notification', 'toast', `"${provider.displayName}" has been removed from the Network list of the Deploy & Run Transactions module.`)
return true
} else {
this.call('notification', 'toast', 'Cannot unpin the current selected provider')
@ -174,11 +178,13 @@ export class EnvironmentExplorer extends ViewPlugin {
pinStateCallback={async (pinned: boolean) => {
if (pinned) {
this.emit('providerPinned', provider.name, provider)
this.call('notification', 'toast', `"${provider.displayName}" has been added to the Network list of the Deploy & Run Transactions module.`)
return true
}
const providerName = await this.call('blockchain', 'getProvider')
if (providerName !== provider.name) {
this.emit('providerUnpinned', provider.name, provider)
this.call('notification', 'toast', `"${provider.displayName}" has been removed from the Network list of the Deploy & Run Transactions module.`)
return true
} else {
this.call('notification', 'toast', 'Cannot unpin the current selected provider')

Loading…
Cancel
Save