Skip to content

Commit

Permalink
Merge branch 'xyk-pool-transactions' of https://github.com/covalenthq…
Browse files Browse the repository at this point in the history
…/goldrush-kit into xyk-pool-detail
  • Loading branch information
nguyenlejoe committed Jan 12, 2024
2 parents 18125e8 + bb30a3f commit f4f86ca
Show file tree
Hide file tree
Showing 6 changed files with 415 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { type Meta, type StoryObj } from "@storybook/react";
import { XYKPoolTransactionsListView } from "./XYKPoolTransactionsListView";

type Story = StoryObj<typeof XYKPoolTransactionsListView>;

const meta: Meta<typeof XYKPoolTransactionsListView> = {
title: "Organisms/XYK/Pool",
component: XYKPoolTransactionsListView,
};

export default meta;

export const XYKPoolTransactionsList: Story = {
args: {
chain_name: "eth-mainnet",
dex_name: "uniswap_v2",
pool_address: "0x21b8065d10f73ee2e260e5b47d3344d3ced7596e",
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { timestampParser } from "@/utils/functions";
import { Badge } from "@/components/ui/badge";
import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
import { type XYKTransfersListViewProps } from "@/utils/types/organisms.types";
import { type XYKPoolTransactionsListViewProps } from "@/utils/types/organisms.types";
import { useCovalent } from "@/utils/store/Covalent";
import { handleTokenTransactions } from "@/utils/functions/pretty-exchange-amount";
import { handleExchangeType } from "@/utils/functions/exchange-type";
Expand Down Expand Up @@ -214,11 +214,9 @@ const columns: ColumnDef<ExchangeTransaction>[] = [
},
];

export const XYKTransfersListView: React.FC<XYKTransfersListViewProps> = ({
chain_name,
dex_name,
pool_address,
}) => {
export const XYKPoolTransactionsListView: React.FC<
XYKPoolTransactionsListViewProps
> = ({ chain_name, dex_name, pool_address }) => {
const { covalentClient } = useCovalent();

const [sorting, setSorting] = useState<SortingState>([
Expand All @@ -243,7 +241,6 @@ export const XYKTransfersListView: React.FC<XYKTransfersListViewProps> = ({
dex_name,
pool_address.trim()
);
console.log(response);
setResult(new Some(response.data.items));

setError({ error: false, error_message: "" });
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { type Meta, type StoryObj } from "@storybook/react";
import { XYKTokenTransactionsListView } from "./XYKTokenTransactionsListView";

type Story = StoryObj<typeof XYKTokenTransactionsListView>;

const meta: Meta<typeof XYKTokenTransactionsListView> = {
title: "Organisms/XYK/Token",
component: XYKTokenTransactionsListView,
};

export default meta;

export const XYKTokenTransactionsList: Story = {
args: {
chain_name: "eth-mainnet",
dex_name: "uniswap_v2",
token_address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
},
};
Loading

0 comments on commit f4f86ca

Please sign in to comment.