Skip to content

Commit bc6dc88

Browse files
authored
fix: log unlock hash data (#95)
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> ## Related Issue Or Context <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Otherwise, describe context and motivation for change herre --> Closes: #<issue> ## How Has This Been Tested? Testing details. <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have ensured that all acceptance criteria (or expected behavior) from issue are met - [ ] I have updated the documentation locally and in docs. - [ ] I have added tests to cover my changes. - [ ] I have ensured that all the checks are passing and green, I've signed the CLA bot
1 parent 5cddb59 commit bc6dc88

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

chains/evm/signature/hash.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"github.com/ethereum/go-ethereum/common/math"
99
"github.com/ethereum/go-ethereum/crypto"
1010
"github.com/ethereum/go-ethereum/signer/core/apitypes"
11+
"github.com/rs/zerolog/log"
1112
)
1213

1314
const (
@@ -78,7 +79,9 @@ func BorrowUnlockHash(
7879
}
7980

8081
rawData := []byte(fmt.Sprintf("\x19\x01%s%s", string(domainSeparator), string(messageHash)))
81-
return crypto.Keccak256(rawData), nil
82+
unlockHash := crypto.Keccak256(rawData)
83+
log.Debug().Msgf("Created unlock hash %s with data: %+v", common.Bytes2Hex(unlockHash), msg)
84+
return unlockHash, nil
8285
}
8386

8487
// BorrowManyUnlockHash calculates the hash that has to be signed and submitted on-chain to the liquidity

protocol/lighter/api.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ func (a *LighterAPI) GetTx(hash string) (*LighterTx, error) {
8282
return nil, fmt.Errorf("failed to read response body: %w", err)
8383
}
8484

85-
fmt.Println(string(body))
86-
8785
s := new(LighterTx)
8886
if err := json.Unmarshal(body, s); err != nil {
8987
return nil, fmt.Errorf("failed to unmarshal JSON: %w", err)

0 commit comments

Comments
 (0)