Update TradingView instructions (#58)

This commit is contained in:
Maximilian Schneider 2021-02-03 00:21:57 +01:00 committed by GitHub
parent 7246e4b6bc
commit da08dd706e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View File

@ -35,6 +35,13 @@ It is possible to add OHLCV candles built from on chain data using [Bonfida's AP
"./src/components/TradingView/index.tsx"
```
5. Uncomment the following in `public/index.html`
```
<script src="%PUBLIC_URL%/datafeeds/udf/dist/polyfills.js"></script>
<script src="%PUBLIC_URL%/datafeeds/udf/dist/bundle.js">
```
<p align="center">
<img height="300" src="https://i.imgur.com/UyFKmTv.png">
</p>

View File

@ -39,6 +39,12 @@
content="Serum DEX - The world's first completely decentralized derivatives exchange with trustless cross-chain trading"
/>
<meta name="twitter:image" content="https://i.imgur.com/YS5Csfy.png" />
<!--
uncomment the script tags below to enable the TradingView display
<script src="%PUBLIC_URL%/datafeeds/udf/dist/polyfills.js"></script>
<script src="%PUBLIC_URL%/datafeeds/udf/dist/bundle.js"></script>
-->
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
@ -53,6 +59,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Serum</title>
</head>
<body>

View File

@ -4,6 +4,7 @@ import {
widget,
ChartingLibraryWidgetOptions,
IChartingLibraryWidget,
ResolutionString
} from '../../charting_library'; // Make sure to follow step 1 of the README
import { useMarket } from '../../utils/markets';
import { BONFIDA_DATA_FEED } from '../../utils/bonfidaConnector';
@ -34,7 +35,7 @@ export const TVChartContainer = () => {
// @ts-ignore
const defaultProps: ChartContainerProps = {
symbol: 'BTC/USDC',
interval: '60',
interval: '60' as ResolutionString,
theme: 'Dark',
containerId: 'tv_chart_container',
datafeedUrl: BONFIDA_DATA_FEED,