Skip to content

Commit

Permalink
Merge pull request #2436 from fluidity-money/develop-fix-comparison-t…
Browse files Browse the repository at this point in the history
…o-volume

Test the volume after checking it's empty
  • Loading branch information
af-afk authored Dec 4, 2023
2 parents 659ff0e + 138ef8b commit 0f94a83
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 0f94a83

Please sign in to comment.