File tree 1 file changed +21
-0
lines changed
amisforum/live/conference
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,27 @@ function fundEth(newAddress, amt) {
260
260
} ) ;
261
261
}
262
262
263
+ function setSafeLowGasPrice ( ) {
264
+ var HttpClient = function ( ) {
265
+ this . get = function ( aUrl , aCallback ) {
266
+ var anHttpRequest = new XMLHttpRequest ( ) ;
267
+ anHttpRequest . onreadystatechange = function ( ) {
268
+ if ( anHttpRequest . readyState == 4 && anHttpRequest . status == 200 )
269
+ aCallback ( anHttpRequest . responseText ) ;
270
+ }
271
+ anHttpRequest . open ( "GET" , aUrl , true ) ;
272
+ anHttpRequest . send ( null ) ;
273
+ }
274
+ }
275
+ var theurl = 'https://www.etherchain.org/api/gasPriceOracle' ;
276
+ var client = new HttpClient ( ) ;
277
+ client . get ( theurl , function ( response ) {
278
+ var response1 = JSON . parse ( response ) ;
279
+
280
+ safeLowGasPrice = response1 . safeLow ;
281
+ } ) ;
282
+ }
283
+
263
284
window . onload = function ( ) {
264
285
265
286
web3 . eth . getAccounts ( function ( err , accs ) {
You can’t perform that action at this time.
0 commit comments