Skip to content

Commit

Permalink
rm: debug endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
debendraoli committed Dec 5, 2024
1 parent 5ee0213 commit a4fe3f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
6 changes: 1 addition & 5 deletions src/components/Logs/LogsViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import Loading from '@/components/Loading/Loading'
import React, { useEffect, useRef, useState } from 'react'
import React, { useEffect, useState } from 'react'
import { Card, Col, Form, Row } from 'react-bootstrap'

interface LogsViewerProps {
Expand All @@ -16,8 +16,6 @@ const LogsViewer: React.FC<LogsViewerProps> = ({ relayerId }) => {
const [since, setSince] = useState<string>('')
const [until, setUntil] = useState<string>('')
const [loading, setLoading] = useState<boolean>(false)
const logsEndRef = useRef<HTMLDivElement>(null)
const prevLogsRef = useRef<string>('')

const fetchLogs = async () => {
setLoading(true)
Expand All @@ -29,7 +27,6 @@ const LogsViewer: React.FC<LogsViewerProps> = ({ relayerId }) => {
)
const data = await response.json()
setLogs(data?.trim().split('\n').reverse())
prevLogsRef.current = data
} catch (error) {
console.error('Failed to fetch logs:', error)
} finally {
Expand Down Expand Up @@ -125,7 +122,6 @@ const LogsViewer: React.FC<LogsViewerProps> = ({ relayerId }) => {
}}
>
{filteredLogs}
<div ref={logsEndRef} />
</pre>
)}
</Card.Body>
Expand Down
9 changes: 0 additions & 9 deletions src/components/Page/Dashboard/MessageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@ const MessageList: React.FC<MessageListProps> = ({ relayerId }) => {

const fetchMessages = async () => {
setLoading(true)
try {
const response = await fetch('https://ciihnqaqiomjdoicuy5rgwmy5m0vxanz.lambda-url.us-east-1.on.aws/', {
method: 'POST',

body: JSON.stringify({ address: 'GCFAPEJDCDCYSZAFTRWD2L2X3ARKUWJH7LVDN5ZWSLGF6NOQNWVNIR2X' }),
})
console.log(response)
} catch (error) {
console.error('Failed to fetch messages:', error)
}
try {
const response = await fetch(
`/api/relayer?event=GetMessageList&chain=${chain}&limit=${limit}&relayerId=${relayerId}`
Expand Down

0 comments on commit a4fe3f8

Please sign in to comment.