From e8e0cf61e9bdaaf9061645b846ad3e0b2813a5e1 Mon Sep 17 00:00:00 2001 From: John Letey Date: Wed, 13 Nov 2024 13:11:42 -0500 Subject: [PATCH] chore: appease linters --- README.md | 2 +- noble/message_state.go | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d4a1f7d..f30fbf1 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,6 @@ abigen --abi ethereum/abi/MessageTransmitter.json --pkg contracts- --type Messag ### Useful links [Relayer Flow Charts](./docs/flows.md) -[USDC faucet](https://usdcfaucet.com/) +[USDC faucet](https://faucet.circle.com) [Circle Docs/Contract Addresses](https://developers.circle.com/stablecoins/docs/evm-smart-contracts) diff --git a/noble/message_state.go b/noble/message_state.go index 0549b1c..55f959d 100644 --- a/noble/message_state.go +++ b/noble/message_state.go @@ -27,12 +27,10 @@ func txToMessageState(tx *ctypes.ResultTx) ([]*types.MessageState, error) { var parsed bool var parseErrs error for _, attr := range event.Attributes { - decodedKey := attr.Key - if string(decodedKey) == "message" { - decodedValue := attr.Value - encoded := decodedValue[1 : len(decodedValue)-1] + if attr.Key == "message" { + encoded := attr.Value[1 : len(attr.Value)-1] // Because we are using cometBFT v0.38, we need to decode the value twice. - rawMessageSentBytes, err := base64.StdEncoding.DecodeString(string(encoded)) + rawMessageSentBytes, err := base64.StdEncoding.DecodeString(encoded) if err != nil { parseErrs = errors.Join(parseErrs, fmt.Errorf("failed to decode message: %w", err)) continue