fix: add nil check for shutdown err (#115)

This commit is contained in:
noot
2022-05-16 21:52:10 -04:00
committed by GitHub
parent 55ae59046c
commit 4931e012db

View File

@@ -345,6 +345,10 @@ func (s *swapState) tryClaim() (ethcommon.Hash, error) {
// It returns Bob's public spend key and his private view key, so that Alice can see
// if the funds are locked.
func (s *swapState) generateAndSetKeys() error {
if s == nil {
return errNilSwapState
}
if s.privkeys != nil {
return nil
}