@@ -3473,6 +3473,8 @@ func (i *jsonAPIHandler) GETEstimateFee(w http.ResponseWriter, r *http.Request)
3473
3473
feeLevel = wallet .NORMAL
3474
3474
case "ECONOMIC" :
3475
3475
feeLevel = wallet .ECONOMIC
3476
+ case "SUPER_ECONOMIC" :
3477
+ feeLevel = wallet .SUPER_ECONOMIC
3476
3478
default :
3477
3479
ErrorResponse (w , http .StatusBadRequest , "Unknown feeLevel" )
3478
3480
return
@@ -3516,25 +3518,28 @@ func (i *jsonAPIHandler) GETEstimateFee(w http.ResponseWriter, r *http.Request)
3516
3518
func (i * jsonAPIHandler ) GETFees (w http.ResponseWriter , r * http.Request ) {
3517
3519
_ , coinType := path .Split (r .URL .Path )
3518
3520
type fees struct {
3519
- Priority * repo.CurrencyValue `json:"priority"`
3520
- Normal * repo.CurrencyValue `json:"normal"`
3521
- Economic * repo.CurrencyValue `json:"economic"`
3521
+ Priority * repo.CurrencyValue `json:"priority"`
3522
+ Normal * repo.CurrencyValue `json:"normal"`
3523
+ Economic * repo.CurrencyValue `json:"economic"`
3524
+ SuperEconomic * repo.CurrencyValue `json:"superEconomic"`
3522
3525
}
3523
3526
if coinType == "fees" {
3524
3527
ret := make (map [string ]interface {})
3525
3528
for ct , wal := range i .node .Multiwallet {
3526
3529
priority := wal .GetFeePerByte (wallet .PRIOIRTY )
3527
3530
normal := wal .GetFeePerByte (wallet .NORMAL )
3528
3531
economic := wal .GetFeePerByte (wallet .ECONOMIC )
3532
+ superEconomic := wal .GetFeePerByte (wallet .SUPER_ECONOMIC )
3529
3533
defn , err := i .node .LookupCurrency (wal .CurrencyCode ())
3530
3534
if err != nil {
3531
3535
ErrorResponse (w , http .StatusInternalServerError , err .Error ())
3532
3536
return
3533
3537
}
3534
3538
ret [ct .CurrencyCode ()] = fees {
3535
- Priority : & repo.CurrencyValue {Currency : defn , Amount : & priority },
3536
- Normal : & repo.CurrencyValue {Currency : defn , Amount : & normal },
3537
- Economic : & repo.CurrencyValue {Currency : defn , Amount : & economic },
3539
+ Priority : & repo.CurrencyValue {Currency : defn , Amount : & priority },
3540
+ Normal : & repo.CurrencyValue {Currency : defn , Amount : & normal },
3541
+ Economic : & repo.CurrencyValue {Currency : defn , Amount : & economic },
3542
+ SuperEconomic : & repo.CurrencyValue {Currency : defn , Amount : & superEconomic },
3538
3543
}
3539
3544
}
3540
3545
out , err := json .MarshalIndent (ret , "" , " " )
@@ -3553,15 +3558,17 @@ func (i *jsonAPIHandler) GETFees(w http.ResponseWriter, r *http.Request) {
3553
3558
priority := wal .GetFeePerByte (wallet .PRIOIRTY )
3554
3559
normal := wal .GetFeePerByte (wallet .NORMAL )
3555
3560
economic := wal .GetFeePerByte (wallet .ECONOMIC )
3561
+ superEconomic := wal .GetFeePerByte (wallet .SUPER_ECONOMIC )
3556
3562
defn , err := i .node .LookupCurrency (wal .CurrencyCode ())
3557
3563
if err != nil {
3558
3564
ErrorResponse (w , http .StatusInternalServerError , err .Error ())
3559
3565
return
3560
3566
}
3561
3567
f := fees {
3562
- Priority : & repo.CurrencyValue {Currency : defn , Amount : & priority },
3563
- Normal : & repo.CurrencyValue {Currency : defn , Amount : & normal },
3564
- Economic : & repo.CurrencyValue {Currency : defn , Amount : & economic },
3568
+ Priority : & repo.CurrencyValue {Currency : defn , Amount : & priority },
3569
+ Normal : & repo.CurrencyValue {Currency : defn , Amount : & normal },
3570
+ Economic : & repo.CurrencyValue {Currency : defn , Amount : & economic },
3571
+ SuperEconomic : & repo.CurrencyValue {Currency : defn , Amount : & superEconomic },
3565
3572
}
3566
3573
out , err := json .MarshalIndent (f , "" , " " )
3567
3574
if err != nil {
0 commit comments