diff --git a/internal/chain/transaction.go b/internal/chain/transaction.go index 9f66070..10b1b65 100644 --- a/internal/chain/transaction.go +++ b/internal/chain/transaction.go @@ -59,6 +59,7 @@ func (b *TxBuild) Transfer(ctx context.Context, to string, value *big.Int) (byte if err != nil { panic(err) } + log.Infof("DEBUG: value passed into transfer is %s", value) amount, err := convertToUint128(value) if err != nil { diff --git a/internal/server/server.go b/internal/server/server.go index 0fd0daa..e2c91dc 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -63,7 +63,9 @@ func (s *Server) consumeQueue() { defer s.mutex.Unlock() for len(s.queue) != 0 { address := <-s.queue + log.Infof("DEBUG: cfg value before transfer from queue is %s", s.cfg.payoutNano) txHash, err := s.Transfer(context.Background(), address, s.cfg.payoutNano) + log.Infof("DEBUG: cfg value after transfer from queue is %s", s.cfg.payoutNano) if err != nil { log.WithError(err).Error("Failed to handle transaction in the queue") } else { @@ -102,7 +104,9 @@ func (s *Server) handleClaim() http.HandlerFunc { ctx, cancel := context.WithTimeout(r.Context(), 5*time.Second) defer cancel() + log.Infof("DEBUG: cfg value before transfer from handleClaim is %s", s.cfg.payoutNano) txHash, err := s.Transfer(ctx, address, s.cfg.payoutNano) + log.Infof("DEBUG: cfg value after transfer from handleClaim is %s", s.cfg.payoutNano) s.mutex.Unlock() if err != nil { log.WithError(err).Error("Failed to send transaction")