Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions chains/evm/message/sprinter.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ type SprinterCreditMessageHandler struct {
chainID uint64

liquidators map[common.Address]common.Address
token common.Address

coordinator Coordinator
host host.Host
Expand Down Expand Up @@ -70,7 +69,8 @@ func (h *SprinterCreditMessageHandler) HandleMessage(m *message.Message) (*propo
return nil, err
}

liquidator, ok := h.liquidators[common.HexToAddress(data.TokenOut)]
token := common.HexToAddress(data.TokenOut)
liquidator, ok := h.liquidators[token]
if !ok {
err := fmt.Errorf("no liquidator for token %s", data.TokenOut)
data.ErrChn <- err
Expand All @@ -80,7 +80,7 @@ func (h *SprinterCreditMessageHandler) HandleMessage(m *message.Message) (*propo
unlockHash, err := signature.BorrowUnlockHash(
calldata,
data.BorrowAmount,
h.token,
token,
new(big.Int).SetUint64(h.chainID),
liquidator,
data.Deadline,
Expand Down
Loading