refacto: Remove overengineered convertAction func
Because it can be simply replaced by a condition. Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
5f67ba2279
commit
fed6459f9d
4 changed files with 1 additions and 15 deletions
12
utils.go
12
utils.go
|
|
@ -33,18 +33,6 @@ func ConvertMojo(value float64) float64 {
|
|||
return value / MojoToXCHDivider
|
||||
}
|
||||
|
||||
// ConvertAction returns "Miner" for Ethereum and "Farmer" for Chia
|
||||
// Because Chia is farmed and not mined
|
||||
func ConvertAction(coin string) (string, error) {
|
||||
switch coin {
|
||||
case "eth":
|
||||
return "Mined", nil
|
||||
case "xch":
|
||||
return "Farmed", nil
|
||||
}
|
||||
return "", fmt.Errorf("Coin %s not supported", coin)
|
||||
}
|
||||
|
||||
// FormatBlockURL returns the URL on the respective blockchain explorer given the coin and the block hash
|
||||
func FormatBlockURL(coin string, hash string) (string, error) {
|
||||
switch coin {
|
||||
|
|
|
|||
Reference in a new issue