1- import { PLATFORMS , sleep , startPolling , STRATEGIES } from " src/lib" ;
1+ import { PLATFORMS , sleep , startPolling , STRATEGIES } from ' src/lib'
22
33interface Message {
4- type : string ;
4+ type : string
55 data : {
66 platforms : {
7- [ PLATFORMS . PancakeSwap ] : boolean ;
8- [ PLATFORMS . CandleGenieBTC ] : boolean ;
9- [ PLATFORMS . CandleGenieBNB ] : boolean ;
10- [ PLATFORMS . CandleGenieETH ] : boolean ;
11- } ;
12- strategy : STRATEGIES ;
13- } ;
7+ [ PLATFORMS . PancakeSwap ] : boolean
8+ [ PLATFORMS . CandleGenieBTC ] : boolean
9+ [ PLATFORMS . CandleGenieBNB ] : boolean
10+ [ PLATFORMS . CandleGenieETH ] : boolean
11+ }
12+ strategy : STRATEGIES
13+ }
1414}
1515
1616chrome . runtime . onMessage . addListener ( async ( message : Message ) => {
17- if ( message . type === " START" ) {
17+ if ( message . type === ' START' ) {
1818 const { privateKey, betAmount } = await chrome . storage . sync . get ( [
19- " privateKey" ,
20- " betAmount" ,
21- ] ) ;
19+ ' privateKey' ,
20+ ' betAmount'
21+ ] )
2222
2323 if ( message . data . platforms [ PLATFORMS . PancakeSwap ] ) {
2424 startPolling (
@@ -27,8 +27,8 @@ chrome.runtime.onMessage.addListener(async (message: Message) => {
2727 message . data . strategy ,
2828 true ,
2929 PLATFORMS . PancakeSwap
30- ) . catch ( ) ;
31- await sleep ( 3000 ) ;
30+ ) . catch ( )
31+ await sleep ( 3000 )
3232 }
3333
3434 if ( message . data . platforms [ PLATFORMS . CandleGenieBTC ] ) {
@@ -38,8 +38,8 @@ chrome.runtime.onMessage.addListener(async (message: Message) => {
3838 message . data . strategy ,
3939 true ,
4040 PLATFORMS . CandleGenieBTC
41- ) . catch ( ) ;
42- await sleep ( 3000 ) ;
41+ ) . catch ( )
42+ await sleep ( 3000 )
4343 }
4444
4545 if ( message . data . platforms [ PLATFORMS . CandleGenieBNB ] ) {
@@ -49,8 +49,8 @@ chrome.runtime.onMessage.addListener(async (message: Message) => {
4949 message . data . strategy ,
5050 true ,
5151 PLATFORMS . CandleGenieBNB
52- ) . catch ( ) ;
53- await sleep ( 3000 ) ;
52+ ) . catch ( )
53+ await sleep ( 3000 )
5454 }
5555
5656 if ( message . data . platforms [ PLATFORMS . CandleGenieETH ] ) {
@@ -60,7 +60,7 @@ chrome.runtime.onMessage.addListener(async (message: Message) => {
6060 message . data . strategy ,
6161 true ,
6262 PLATFORMS . CandleGenieETH
63- ) . catch ( ) ;
63+ ) . catch ( )
6464 }
6565 }
66- } ) ;
66+ } )
0 commit comments