This repository was archived by the owner on Feb 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ class ChartContent extends PureComponent {
4141 this . state = {
4242 chartType : 'mountain' ,
4343 granularity : 0 ,
44- symbol : 'R_100' ,
4544 barrierType : undefined ,
4645 high : undefined ,
4746 low : undefined ,
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ import GTM from '../../common/gtm';
4343import { saveBeforeUnload } from './blockly/utils' ;
4444
4545let realityCheckTimeout ;
46+ let chart ;
4647
4748const api = generateLiveApiInstance ( ) ;
4849
@@ -89,8 +90,6 @@ const addBalanceForToken = token => {
8990 } ) ;
9091} ;
9192
92- const chart = new Chart ( api ) ;
93-
9493const tradingView = new TradingView ( ) ;
9594
9695const showRealityCheck = ( ) => {
@@ -212,7 +211,9 @@ const updateTokenList = () => {
212211 $ ( '.account-type' ) . text ( `${ prefix } ` ) ;
213212 } else {
214213 $ ( '.login-id-list' ) . append (
215- `<a href="#" value="${ tokenInfo . token } "><li><span>${ prefix } </span><div>${ tokenInfo . accountName } </div></li></a><div class="separator-line-thin-gray"></div>`
214+ `<a href="#" value="${ tokenInfo . token } "><li><span>${ prefix } </span><div>${
215+ tokenInfo . accountName
216+ } </div></li></a><div class="separator-line-thin-gray"></div>`
216217 ) ;
217218 }
218219 } ) ;
@@ -419,6 +420,10 @@ export default class View {
419420 } ) ;
420421
421422 $ ( '#chartButton' ) . click ( ( ) => {
423+ if ( ! chart ) {
424+ chart = new Chart ( api ) ;
425+ }
426+
422427 chart . open ( ) ;
423428 } ) ;
424429
You can’t perform that action at this time.
0 commit comments