Skip to content

Commit

Permalink
fix: update latest blockHeight logic to use internal func
Browse files Browse the repository at this point in the history
  • Loading branch information
roshaans committed May 31, 2023
1 parent d2c4a6c commit 180e9b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/Editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ResetChangesModal } from "../Modals/resetChanges";
import { FileSwitcher } from "./FileSwitcher";
import EditorButtons from "./EditorButtons";
import { PublishModal } from "../Modals/PublishModal";
import {getLatestBlockHeight} from "../../utils/getLatestBlockHeight";
const BLOCKHEIGHT_LIMIT = 3600;

const contractRegex = RegExp(
Expand Down Expand Up @@ -63,8 +64,7 @@ const Editor = ({
const [isExecutingIndexerFunction, setIsExecutingIndexerFunction] = useState(false)

const requestLatestBlockHeight = async () => {
const response = await request("get-latest-block-height")
const { blockHeight } = response
const blockHeight = getLatestBlockHeight()
return blockHeight
}

Expand Down

0 comments on commit 180e9b5

Please sign in to comment.