Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joroshiba committed Jul 31, 2024
1 parent 4096e1d commit bde66d1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions internal/chain/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ func (b *TxBuild) Transfer(ctx context.Context, to string, value *big.Int) (byte
nonce, err := b.sequencerClient.GetNonce(ctx, b.fromAddress)
if err != nil {
panic(err)
}
log.Infof("DEBUG: value passed into transfer is %s", value)

}

amount, err := convertToUint128(value)
if err != nil {
Expand Down Expand Up @@ -120,7 +118,5 @@ func convertToUint128(num *big.Int) (*primproto.Uint128, error) {
Hi: hi,
}

log.Infof("DEBUG: value after conversion is %s", num)

return uint128, nil
}
4 changes: 0 additions & 4 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ 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 {
Expand Down Expand Up @@ -104,9 +102,7 @@ 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")
Expand Down

0 comments on commit bde66d1

Please sign in to comment.