Browse Source
691: Clean-up imports and modules r=thomaseizinger a=thomaseizinger
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
debug-collab-settlement
bors[bot]
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with
9 additions and
9 deletions
-
taker-frontend/src/App.tsx
-
taker-frontend/src/HttpError.ts
-
taker-frontend/src/components/ErrorToast.tsx
-
taker-frontend/src/components/History.tsx
-
taker-frontend/src/components/NavBar.tsx
-
taker-frontend/src/components/Timestamp.tsx
-
taker-frontend/src/components/Trade.tsx
-
taker-frontend/src/components/Wallet.tsx
-
taker-frontend/src/types.ts
|
|
@ -20,6 +20,7 @@ import Footer from "./components/Footer"; |
|
|
|
import History from "./components/History"; |
|
|
|
import Nav from "./components/NavBar"; |
|
|
|
import Trade from "./components/Trade"; |
|
|
|
import { Wallet, WalletInfoBar } from "./components/Wallet"; |
|
|
|
import { |
|
|
|
BXBTData, |
|
|
|
Cfd, |
|
|
@ -31,8 +32,7 @@ import { |
|
|
|
Order, |
|
|
|
StateGroupKey, |
|
|
|
WalletInfo, |
|
|
|
} from "./components/Types"; |
|
|
|
import { Wallet, WalletInfoBar } from "./components/Wallet"; |
|
|
|
} from "./types"; |
|
|
|
import useLatestEvent from "./useLatestEvent"; |
|
|
|
import usePostRequest from "./usePostRequest"; |
|
|
|
|
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
// A wrapper to parse RFC 7807
|
|
|
|
// Pass result of `await response.json()` into the constructor.
|
|
|
|
export class HttpError extends Error { |
|
|
|
export default class HttpError extends Error { |
|
|
|
title: string; |
|
|
|
detail?: string; |
|
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
import { HttpError } from "./HttpError"; |
|
|
|
import HttpError from "../HttpError"; |
|
|
|
|
|
|
|
// A generic way of creating an error toast
|
|
|
|
// TODO: Don't use any (`toast: typeof useToast` did not work :( )
|
|
|
|
|
|
@ -28,8 +28,8 @@ import { |
|
|
|
VStack, |
|
|
|
} from "@chakra-ui/react"; |
|
|
|
import * as React from "react"; |
|
|
|
import { Cfd, StateGroupKey, StateKey, Tx, TxLabel } from "../types"; |
|
|
|
import usePostRequest from "../usePostRequest"; |
|
|
|
import { Cfd, StateGroupKey, StateKey, Tx, TxLabel } from "./Types"; |
|
|
|
|
|
|
|
interface HistoryProps { |
|
|
|
cfds: Cfd[]; |
|
|
|
|
|
@ -17,7 +17,7 @@ import * as React from "react"; |
|
|
|
import { useNavigate } from "react-router-dom"; |
|
|
|
import logoBlack from "../images/logo_nav_bar_black.svg"; |
|
|
|
import logoWhite from "../images/logo_nav_bar_white.svg"; |
|
|
|
import { WalletInfo } from "./Types"; |
|
|
|
import { WalletInfo } from "../types"; |
|
|
|
|
|
|
|
interface NavProps { |
|
|
|
walletInfo: WalletInfo | null; |
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
import { Text } from "@chakra-ui/react"; |
|
|
|
import React from "react"; |
|
|
|
import { unixTimestampToDate } from "./Types"; |
|
|
|
import { unixTimestampToDate } from "../types"; |
|
|
|
|
|
|
|
interface Props { |
|
|
|
timestamp: number; |
|
|
|
|
|
@ -45,7 +45,7 @@ import { |
|
|
|
} from "@chakra-ui/react"; |
|
|
|
import { motion } from "framer-motion"; |
|
|
|
import * as React from "react"; |
|
|
|
import { CfdOrderRequestPayload } from "./Types"; |
|
|
|
import { CfdOrderRequestPayload } from "../types"; |
|
|
|
|
|
|
|
const MotionBox = motion<BoxProps>(Box); |
|
|
|
|
|
|
|
|
|
@ -26,9 +26,9 @@ import { |
|
|
|
import * as React from "react"; |
|
|
|
import { useState } from "react"; |
|
|
|
import { useNavigate } from "react-router-dom"; |
|
|
|
import { WalletInfo, WithdrawRequest } from "../types"; |
|
|
|
import usePostRequest from "../usePostRequest"; |
|
|
|
import Timestamp from "./Timestamp"; |
|
|
|
import { WalletInfo, WithdrawRequest } from "./Types"; |
|
|
|
|
|
|
|
interface WalletProps { |
|
|
|
walletInfo: WalletInfo | null; |
|
|
|