diff --git a/examples/uma-server/vasp1.go b/examples/uma-server/vasp1.go index 9f13272..9d97f17 100644 --- a/examples/uma-server/vasp1.go +++ b/examples/uma-server/vasp1.go @@ -26,22 +26,22 @@ import ( // Vasp1 is an implementation of the sending VASP in the UMA protocol. type Vasp1 struct { - config *UmaConfig - pubKeyCache uma.PublicKeyCache - requestCache *Vasp1RequestCache - nonceCache uma.NonceCache - client *services.LightsparkClient + config *UmaConfig + pubKeyCache uma.PublicKeyCache + requestCache *Vasp1RequestCache + nonceCache uma.NonceCache + client *services.LightsparkClient umaRequestStorage *Vasp1UmaRequestStorage } func NewVasp1(config *UmaConfig, pubKeyCache uma.PublicKeyCache) *Vasp1 { oneDayAgo := time.Now().AddDate(0, 0, -1) return &Vasp1{ - config: config, - pubKeyCache: pubKeyCache, - requestCache: NewVasp1RequestCache(), - nonceCache: uma.NewInMemoryNonceCache(oneDayAgo), - client: services.NewLightsparkClient(config.ApiClientID, config.ApiClientSecret, config.ClientBaseURL), + config: config, + pubKeyCache: pubKeyCache, + requestCache: NewVasp1RequestCache(), + nonceCache: uma.NewInMemoryNonceCache(oneDayAgo), + client: services.NewLightsparkClient(config.ApiClientID, config.ApiClientSecret, config.ClientBaseURL), umaRequestStorage: &Vasp1UmaRequestStorage{}, } } @@ -321,7 +321,7 @@ func (v *Vasp1) handlePayInvoice(context *gin.Context) { return } - senderNode, err := GetNode(v.client, v.config.NodeUUID) + senderNode, err := GetNode(v.client, v.config.NodeUUID) if err != nil || senderNode == nil { context.JSON(http.StatusInternalServerError, gin.H{ "status": "ERROR", @@ -595,7 +595,7 @@ func (v *Vasp1) handlePayRequest( payreqResponse, *pubKeys, v.nonceCache, - "$" + v.config.Username + "@" + v.getVaspDomain(context), + "$"+v.config.Username+"@"+v.getVaspDomain(context), payeeIdentifier, ); err != nil { context.JSON(http.StatusBadRequest, gin.H{ @@ -1041,4 +1041,4 @@ func (v *Vasp1) handleRequestPayInvoice(context *gin.Context) { v.umaRequestStorage.AddUmaRequestToStorage(*invoice.SenderUma, invoiceString) context.Status(http.StatusOK) -} \ No newline at end of file +}