@@ -42,18 +42,27 @@ func GasTicker(gasTicker *time.Ticker, nodes *node.Nodes, queueOutput *chan stri
42
42
43
43
oldGasPrice = gasPrice
44
44
45
+ // // tip / priority fee
46
+ // var gasTip int
47
+ // if gasInfo.GasTipWei.Cmp(big.NewInt(0)) > 0 {
48
+ // gasTipGwei, _ := node.WeiToGwei(gasInfo.GasTipWei).Float64()
49
+ // gasTip = int(math.Round(gasTipGwei))
50
+ // fmt.Printf("gasInfo.GasTipWei: %+v | gasTipGwei: %+v | gasTip: %+v\n", gasInfo.GasTipWei, gasTipGwei, gasTip)
51
+ // }
52
+
45
53
intro := style .DarkerGrayStyle .Render ("~ " ) + style .DarkGrayStyle .Render ("gas" ) + style .DarkerGrayStyle .Render (" ~ " )
46
54
outro := style .DarkerGrayStyle .Render (" ~ ~" )
47
- formattedGas := style .LightGrayStyle .Render (fmt .Sprintf ("%d" , gasPrice )) + style .DarkGrayStyle .Render ("gw" )
48
55
divider := style .DarkerGrayStyle .Render (" ~ ~ ~ ~ ~ ~ " )
49
56
50
- gasLine .WriteString (intro + formattedGas + divider + formattedGas + divider + formattedGas + outro )
57
+ formattedGas := style .GrayStyle .Render (fmt .Sprintf ("%d" , gasPrice )) + style .DarkGrayStyle .Render ("gw" )
58
+ formattedGasAndTip := formattedGas
59
+
60
+ // if gasTip > 0 {
61
+ // formattedGasAndTip = formattedGas + "|" + style.GrayStyle.Render(fmt.Sprintf("%d", gasTip)) + style.DarkGrayStyle.Render("gw")
62
+ // }
63
+
64
+ gasLine .WriteString (intro + formattedGas + divider + formattedGasAndTip + divider + formattedGas + outro )
51
65
}
52
- // // tip / priority fee
53
- // if gasInfo.GasTipWei.Cmp(big.NewInt(0)) > 0 {
54
- // gasTipGwei, _ := weiToGwei(gasInfo.GasTipWei).Float64()
55
- // gasLine.WriteString(style.GrayStyle.Render(fmt.Sprintf(" | tip: %d", int(math.Ceil(gasTipGwei)))))
56
- // }
57
66
}
58
67
59
68
* queueOutput <- gasLine .String ()
0 commit comments