Skip to content

Commit

Permalink
fix: type and add todos
Browse files Browse the repository at this point in the history
  • Loading branch information
evilpeach committed Jan 20, 2023
1 parent 6bc63b2 commit 776093a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/lib/components/modal/CodeSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { MdCode } from "react-icons/md";
import { CopyButton } from "../CopyButton";
import { CustomTab } from "lib/components/CustomTab";
import { useEndpoint } from "lib/hooks";
import type { ContractAddr, HumanAddr } from "lib/types";
import type { ContractAddr, HumanAddr, Option } from "lib/types";

import "ace-builds/src-noconflict/ace";
import "ace-builds/src-noconflict/mode-sh";
Expand All @@ -36,10 +36,11 @@ interface CodeSnippetProps {
type: "query" | "execute";
}

const getFullRpcUrl = (
rpcUrl: string | undefined,
chainId: string | undefined
) => {
/**
*
* @todo: This is a temporary solution to get the full RPC URL for Osmosis.
*/
const getFullRpcUrl = (rpcUrl: Option<string>, chainId: Option<string>) => {
const baseUrl = rpcUrl?.slice(0, rpcUrl.length - 1);
switch (chainId) {
case "osmosis-1":
Expand Down

0 comments on commit 776093a

Please sign in to comment.