-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add plugin system, add IEO plugin #607
Conversation
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
[ | ||
{ | ||
"name": "ieo" | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should have IEO plugin enabled by default, keep this file empty
|
||
export const PG_TITLE_PREFIX = 'Cryptobase'; | ||
|
||
export const pgRoutes = (isLoggedIn: boolean, isLight?: boolean): string[][] => { | ||
export const pgRoutes = (isLoggedIn: boolean, Plugins: PluginsManager, isLight?: boolean): string[][] => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file will have conflicts with P2P PR, could we please merge this PR after P2P patch?
@@ -87,10 +88,14 @@ class SidebarContainer extends React.Component<Props, State> { | |||
'pg-sidebar-wrapper--hidden': !isActive, | |||
}); | |||
|
|||
const imageSrc = this.tryRequireRoot(lang) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imageSrc
is declared but not used anywhere
private tryRequireRoot = (name: string) => { | ||
try { | ||
require(`../../assets/images/sidebar/${name}.svg`); | ||
|
||
return true; | ||
} catch (err) { | ||
return false; | ||
} | ||
}; | ||
|
||
private tryRequirePlugins = (name: string) => { | ||
try { | ||
require(`../../plugins/assets/images/${name}.svg`); | ||
|
||
return true; | ||
} catch (err) { | ||
return false; | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make a common func that accepts src address as argument
@@ -118,7 +119,7 @@ export const marketStreams = (market: Market) => { | |||
]; | |||
|
|||
if (incrementalOrderBook()) { | |||
store.dispatch(depthIncrementSubscribe(market.id)); | |||
store(Plugins.getReduxReducer()).dispatch(depthIncrementSubscribe(market.id)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does WS work as expected with this patch?
```javascript | ||
plugins: [{ | ||
name: 'ieo', | ||
config: { | ||
fields: { | ||
name: 'IEO', | ||
description: true, | ||
ratio: true, | ||
metadata: true, | ||
}, | ||
} | ||
}] | ||
``` | ||
|
||
In order to have **Auctions** plugin set these to `env.js` | ||
|
||
```javascript | ||
plugins: [{ | ||
name: 'ieo', | ||
config: { | ||
fields: { | ||
name: 'Auctions', | ||
description: false, | ||
ratio: false, | ||
metadata: false, | ||
}, | ||
} | ||
}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I remember baseapp side doesn't listen for additional IEO configuration, could you please update README
need rewrite to new react 18 etc |
moved to baseapp-aurora |
No description provided.