Only one CoreContext for all REST commands

This commit is contained in:
Christopher Goes
2018-04-25 16:49:31 +02:00
parent 228bc4add9
commit fd40d39556
13 changed files with 167 additions and 157 deletions
+1 -3
View File
@@ -14,9 +14,7 @@ import (
)
// register REST routes
func RegisterRoutes(r *mux.Router, cdc *wire.Codec, storeName string) {
ctx := context.NewCoreContextFromViper()
func RegisterRoutes(ctx context.CoreContext, r *mux.Router, cdc *wire.Codec, storeName string) {
r.HandleFunc(
"/accounts/{address}",
QueryAccountRequestHandler(storeName, cdc, auth.GetAccountDecoder(cdc), ctx),