File tree Expand file tree Collapse file tree 5 files changed +41
-2
lines changed
Expand file tree Collapse file tree 5 files changed +41
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,18 @@ func CryptoBalance(coin, address string) string {
1616 fmt .Println (err )
1717 return "0"
1818 }
19+ case "BCH" :
20+ balance , err = BitcoinBalance (BCHapi , address )
21+ if err != nil {
22+ fmt .Println (err )
23+ return "0"
24+ }
25+ case "BCHTEST" :
26+ balance , err = BitcoinBalance (BCHTESTapi , address )
27+ if err != nil {
28+ fmt .Println (err )
29+ return "0"
30+ }
1931 case "BTCTEST" :
2032 balance , err = BitcoinBalance (BTCTESTapi , address )
2133 if err != nil {
@@ -32,10 +44,22 @@ func CryptoBalance(coin, address string) string {
3244 if err != nil {
3345 return "0"
3446 }
47+ case "DASH" :
48+ balance , err = BitcoinBalance (DASHapi , address )
49+ if err != nil {
50+ return "0"
51+ }
52+ case "ZCASH" :
53+ balance , err = BitcoinBalance (ZCASHapi , address )
54+ if err != nil {
55+ return "0"
56+ }
3557 case "ETH" :
3658 balance = EthBalance (eth , address )
3759 case "ROPSTEN" :
3860 balance = EthBalance (ropsten , address )
61+ case "RINKEBY" :
62+ balance = EthBalance (rinkeby , address )
3963 default :
4064 balance = "0"
4165 }
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
1515var (
1616 eth * ethclient.Client
1717 ropsten * ethclient.Client
18+ rinkeby * ethclient.Client
1819)
1920
2021func LoadEthBlockchains () error {
@@ -27,6 +28,10 @@ func LoadEthBlockchains() error {
2728 if err != nil {
2829 return err
2930 }
31+ rinkeby , err = ethclient .Dial (RINKEBYapi )
32+ if err != nil {
33+ return err
34+ }
3035 return err
3136}
3237
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ func StartHTTPServer() {
2424 r := Router ()
2525 srv := & http.Server {
2626 Addr : "0.0.0.0:9090" ,
27- WriteTimeout : time .Second * 5 ,
28- ReadTimeout : time .Second * 5 ,
27+ WriteTimeout : time .Second * 10 ,
28+ ReadTimeout : time .Second * 10 ,
2929 IdleTimeout : time .Second * 30 ,
3030 Handler : r ,
3131 }
Original file line number Diff line number Diff line change 1111 LTCTESTapi string
1212 ETHapi string
1313 ROPSTENapi string
14+ RINKEBYapi string
15+ DASHapi string
16+ ZCASHapi string
17+ BCHapi string
18+ BCHTESTapi string
1419 statusHourHits int64
1520)
1621
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ func GetEnv() {
1515 LTCTESTapi = os .Getenv ("LTCTEST" )
1616 ETHapi = os .Getenv ("ETH" )
1717 ROPSTENapi = os .Getenv ("ROPSTEN" )
18+ RINKEBYapi = os .Getenv ("RINKEBY" )
19+ DASHapi = os .Getenv ("DASH" )
20+ ZCASHapi = os .Getenv ("ZCASH" )
21+ BCHapi = os .Getenv ("BCH" )
22+ BCHTESTapi = os .Getenv ("BCHTEST" )
1823}
1924
2025func CoinMarketCapTicker () {
You can’t perform that action at this time.
0 commit comments