switch "getEntity" to "getOne"

pull/1/head
Grandschtroumpf 6 years ago
parent 9e8d304b1f
commit c787981444
  1. 2
      src/app/components/swap-panel-component.js
  2. 4
      src/app/components/vertical-icons-component.js
  3. 4
      src/remixAppManager.js

@ -22,7 +22,7 @@ class SwapPanelComponent {
})
this.store.event.on('activate', (name) => {
const { profile, api } = this.store.getEntity(name)
const { profile, api } = this.store.getOne(name)
if (((profile.prefferedLocation === this.name) || (!profile.prefferedLocation && opt.default)) &&
profile.icon && api.render && typeof api.render === 'function') {
this.add(name, api.render())

@ -13,11 +13,11 @@ class VerticalIconComponent {
this.iconKind = {}
this.store.event.on('activate', (name) => {
const item = this.store.getEntity(name)
const item = this.store.getOne(name)
if (item && item.profile.icon && name !== 'code editor') this.addIcon(item.profile)
})
this.store.event.on('deactivate', (name) => {
const item = this.store.getEntity(name)
const item = this.store.getOne(name)
if (item && this.icons[name]) this.removeIcon(item.profile)
})
this.store.event.on('add', (entity) => { })

@ -20,7 +20,7 @@ export class RemixAppManager extends AppManagerApi {
}
setActive (name, isActive) {
const entity = this.getEntity(name)
const entity = this.getOne(name)
// temp
if (entity && name === 'solidity') {
isActive ? this.data.proxy.register(entity.api) : this.data.proxy.unregister(entity.api)
@ -32,7 +32,7 @@ export class RemixAppManager extends AppManagerApi {
}
getEntity (entityName) {
return this.store.getEntity(entityName)
return this.store.getOne(entityName)
}
addEntity (entity) {

Loading…
Cancel
Save