Skip to content

Commit

Permalink
Test the volume after checking it's empty
Browse files Browse the repository at this point in the history
  • Loading branch information
user committed Dec 4, 2023
1 parent 073c51f commit 138ef8b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/microservice-ethereum-worker-server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,11 @@ func isDecoratedTransferZeroVolume(transfer typesWorker.EthereumDecoratedTransfe
return true
}

return decorator.Volume.Cmp(&ZeroInt.Int) == 0
volume := decorator.Volume

if volume == nil {
return true
}

return volume.Cmp(&ZeroInt.Int) == 0
}

0 comments on commit 138ef8b

Please sign in to comment.