diff --git a/src/app/components/swap-panel-api.js b/src/app/components/swap-panel-api.js index 3fa4e742b1..e1f8c1c5e6 100644 --- a/src/app/components/swap-panel-api.js +++ b/src/app/components/swap-panel-api.js @@ -5,7 +5,7 @@ class SwapPanelApi { this.event = new EventEmmitter() this.component = swapPanelComponent this.currentContent - verticalIconsComponent.events.on('showContent', (moduleName) => { + verticalIconsComponent.events.on('toggleContent', (moduleName) => { if (!swapPanelComponent.contents[moduleName]) return if (this.currentContent === moduleName) { this.event.emit('toggle', moduleName) @@ -14,6 +14,12 @@ class SwapPanelApi { this.showContent(moduleName) this.event.emit('showing', moduleName) }) + + verticalIconsComponent.events.on('showContent', (moduleName) => { + if (!swapPanelComponent.contents[moduleName]) return + this.showContent(moduleName) + this.event.emit('showing', moduleName) + }) } showContent (moduleName) { diff --git a/src/app/components/vertical-icons-component.js b/src/app/components/vertical-icons-component.js index 4c7c8c04f2..7c3f6799d9 100644 --- a/src/app/components/vertical-icons-component.js +++ b/src/app/components/vertical-icons-component.js @@ -209,7 +209,9 @@ class VerticalIconComponent { } _iconClick (name) { - this.select(name) + this.removeActive() + this.addActive(name) + this.events.emit('toggleContent', name) } render () {