Skip to content

Commit

Permalink
feat: enable orderbook for all users (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Aug 4, 2022
1 parent 952e24b commit 2d9d13e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
26 changes: 11 additions & 15 deletions src/components/Earn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import SegmentedTabs from './SegmentedTabs'
import { CreateFidelityBond } from './fb/CreateFidelityBond'
import { ExistingFidelityBond } from './fb/ExistingFidelityBond'
import { EarnReportOverlay } from './EarnReport'
import { isFeatureEnabled } from '../constants/features'
import * as Api from '../libs/JmWalletApi'
import styles from './Earn.module.css'
import { OrderbookOverlay } from './Orderbook'
Expand Down Expand Up @@ -521,20 +520,17 @@ export default function Earn() {
</rb.Col>
</rb.Row>
<rb.Row className="mt-5 mb-3">
{isFeatureEnabled('orderbook') && (
<rb.Col className="d-flex justify-content-center">
<OrderbookOverlay show={isShowOrderbook} onHide={() => setIsShowOrderbook(false)} />

<rb.Button
variant="outline-dark"
className="border-0 mb-2 d-inline-flex align-items-center"
onClick={() => setIsShowOrderbook(true)}
>
<Sprite symbol="globe" width="24" height="24" className="me-2" />
{t('earn.button_show_orderbook')}
</rb.Button>
</rb.Col>
)}
<rb.Col className="d-flex justify-content-center">
<OrderbookOverlay show={isShowOrderbook} onHide={() => setIsShowOrderbook(false)} />
<rb.Button
variant="outline-dark"
className="border-0 mb-2 d-inline-flex align-items-center"
onClick={() => setIsShowOrderbook(true)}
>
<Sprite symbol="globe" width="24" height="24" className="me-2" />
{t('earn.button_show_orderbook')}
</rb.Button>
</rb.Col>
<rb.Col className="d-flex justify-content-center">
<EarnReportOverlay show={isShowReport} onHide={() => setIsShowReport(false)} />

Expand Down
2 changes: 0 additions & 2 deletions src/constants/features.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
interface Features {
skipWalletBackupConfirmation: boolean
orderbook: boolean
}

const devMode = process.env.NODE_ENV === 'development'

const features: Features = {
skipWalletBackupConfirmation: devMode,
orderbook: devMode,
}

type Feature = keyof Features
Expand Down

0 comments on commit 2d9d13e

Please sign in to comment.