diff --git a/vald/evm/evm.go b/vald/evm/evm.go index 65b3b8bf7d..f5816f8111 100644 --- a/vald/evm/evm.go +++ b/vald/evm/evm.go @@ -140,7 +140,7 @@ func (mgr Mgr) GetTxReceiptsIfFinalized(chain nexus.ChainName, txIDs []common.Ha } return slices.Map(receipts, func(receipt rpc.TxReceiptResult) results.Result[geth.Receipt] { - return results.Pipe(results.Result[geth.Receipt](receipt), func(receipt geth.Receipt) results.Result[geth.Receipt] { + return results.Pipe(receipt.AsResult(), func(receipt geth.Receipt) results.Result[geth.Receipt] { isFinalized, err := mgr.isFinalized(chain, receipt, confHeight) if err != nil { diff --git a/vald/evm/rpc/client.go b/vald/evm/rpc/client.go index acdd014508..6c47b492c9 100644 --- a/vald/evm/rpc/client.go +++ b/vald/evm/rpc/client.go @@ -18,6 +18,10 @@ import ( // results.TxReceiptResult with *types.Receipt. type TxReceiptResult results.Result[types.Receipt] +func (r TxReceiptResult) AsResult() results.Result[types.Receipt] { + return results.Result[types.Receipt](r) +} + // Client provides calls to EVM JSON-RPC endpoints type Client interface { // TransactionReceipts returns transaction receipts for the given transaction hashes