From 6f81ad5fdd52e1057c62605ac88c2e6321e9506a Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 17 Jul 2024 17:57:10 +0200 Subject: [PATCH] added toast --- apps/remix-ide/src/app/providers/environment-explorer.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/remix-ide/src/app/providers/environment-explorer.tsx b/apps/remix-ide/src/app/providers/environment-explorer.tsx index ab4cd34860..c8f6fc4d6e 100644 --- a/apps/remix-ide/src/app/providers/environment-explorer.tsx +++ b/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')