Skip to content

Commit

Permalink
[GSW-323] feat: Create Pool
Browse files Browse the repository at this point in the history
  • Loading branch information
jinoosss committed Oct 12, 2023
1 parent 32ae7ed commit c3d1919
Show file tree
Hide file tree
Showing 31 changed files with 798 additions and 552 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ import { Meta, StoryObj } from "@storybook/react";

const token = {
info: {
path: "1",
name: "Gnoland",
symbol: "GNO.LAND",
logoURI: "",
chainId: "test3",
address: "0x111111111117dC0aa78b770fA6A738034120C302",
path: "gno.land/r/demo/1inch",
name: "1inch",
symbol: "1INCH",
decimals: 6,
logoURI: "https://assets.coingecko.com/coins/images/13469/thumb/1inch-token.png?1608803028",
priceId: "1inch",
createdAt: "1999-01-01T00:00:01Z"
},
amount: "12,211",
usdPrice: "$12.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from "react";
import { EarnAddConfirmAmountInfoWrapper, EarnAddConfirmFeeInfoSection } from "./EarnAddConfirmAmountInfo.styles";
import { TokenInfo } from "@models/token/token-info";
import TokenAmount from "@components/common/token-amount/TokenAmount";
import IconAdd from "@components/common/icons/IconAdd";
import { TokenModel } from "@models/token/token-model";

export interface EarnAddConfirmAmountInfoProps {
tokenA: {
info: TokenInfo;
info: TokenModel;
amount: string;
usdPrice: string;
};
tokenB: {
info: TokenInfo;
info: TokenModel;
amount: string;
usdPrice: string;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,31 @@ export default {

const tokenA = {
info: {
path: "1",
name: "Gnoland",
symbol: "GNOT",
logoURI: "",
chainId: "test3",
address: "0x111111111117dC0aa78b770fA6A738034120C302",
path: "gno.land/r/demo/1inch",
name: "1inch",
symbol: "1INCH",
decimals: 6,
logoURI: "https://assets.coingecko.com/coins/images/13469/thumb/1inch-token.png?1608803028",
priceId: "1inch",
createdAt: "1999-01-01T00:00:01Z"
},
amount: "12,211",
usdPrice: "$12.3",
};

const tokenB = {
info: {
path: "2",
name: "Ether",
symbol: "ETH",
logoURI: "",
chainId: "test3",
address: "0x111111111117dC0aa78b770fA6A738034120C302",
path: "gno.land/r/demo/1inch",
name: "1inch",
symbol: "1INCH",
decimals: 6,
logoURI: "https://assets.coingecko.com/coins/images/13469/thumb/1inch-token.png?1608803028",
priceId: "1inch",
createdAt: "1999-01-01T00:00:01Z"
},
amount: "12,211",
usdPrice: "$12.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ import styled from "@emotion/styled";
export const EarnAddConfirmWrapper = styled.div`
display: flex;
flex-direction: column;
width: 100%;
width: 460px;
height: auto;
padding: 24px;
gap: 16px;
border-radius: 8px;
border: 1px solid ${({ theme }) => theme.color.border02};
background-color: ${({ theme }) => theme.color.background06};
box-shadow: 10px 14px 60px 0px rgba(0, 0, 0, 0.40);
.confirm-header {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ import React from "react";
import { EarnAddConfirmWrapper } from "./EarnAddConfirm.styles";
import Button, { ButtonHierarchy } from "@components/common/button/Button";
import IconClose from "@components/common/icons/IconCancel";
import { TokenInfo } from "@models/token/token-info";
import EarnAddConfirmAmountInfo from "../earn-add-confirm-amount-info/EarnAddConfirmAmountInfo";
import EarnAddConfirmPriceRangeInfo from "../earn-add-confirm-price-range-info/EarnAddConfirmPriceRangeInfo";
import EarnAddConfirmFeeInfo from "../earn-add-confirm-fee-info/EarnAddConfirmFeeInfo";
import { TokenModel } from "@models/token/token-model";

export interface EarnAddConfirmProps {
amountInfo: {
tokenA: {
info: TokenInfo;
info: TokenModel;
amount: string;
usdPrice: string;
};
tokenB: {
info: TokenInfo;
info: TokenModel;
amount: string;
usdPrice: string;
};
Expand All @@ -31,7 +31,7 @@ export interface EarnAddConfirmProps {
estimatedAPR: string;
};
feeInfo: {
token: TokenInfo;
token: TokenModel;
fee: string;
};
confirm: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ComponentStory, ComponentMeta } from "@storybook/react";

import EarnAddLiquidity from "./EarnAddLiquidity";
import { action } from "@storybook/addon-actions";
import { DUMMY_FEE_TIERS, DUMMY_POOL_TICKS, DUMMY_PRICE_RANGE_MAP } from "@containers/earn-add-liquidity-container/earn-add-liquidity-dummy";

export default {
title: "earn-add/EarnAddLiquidity",
Expand All @@ -14,29 +13,36 @@ const Template: ComponentStory<typeof EarnAddLiquidity> = args => (
<EarnAddLiquidity {...args} />
);
const tokenA = {
path: "1",
logoURI: "",
name: "Bitcoin",
symbol: "BTC",
chainId: "dev",
createdAt: "2023-10-10T08:48:46+09:00",
name: "Gnoswap",
address: "g1sqaft388ruvsseu97r04w4rr4szxkh4nn6xpax",
path: "gno.land/r/gnos",
decimals: 4,
symbol: "GNOS",
logoURI: "https://s2.coinmarketcap.com/static/img/coins/64x64/5994.png",
priceId: "gno.land/r/gnos"
};
const tokenB = {
path: "2",
logoURI: "",
name: "Ethereum",
symbol: "ETH",
chainId: "dev",
createdAt: "2023-10-10T08:48:46+09:00",
name: "Gnoswap",
address: "g1sqaft388ruvsseu97r04w4rr4szxkh4nn6xpax",
path: "gno.land/r/gnos",
decimals: 4,
symbol: "GNOS",
logoURI: "https://s2.coinmarketcap.com/static/img/coins/64x64/5994.png",
priceId: "gno.land/r/gnos"
};

export const Default = Template.bind({});
Default.args = {
mode: "POOL",
tokenA: tokenA,
tokenB: tokenB,
feeTiers: DUMMY_FEE_TIERS,
feeRate: "0.01",
feeTiers: [],
selectFeeTier: action("selectFeeTier"),
priceRangeMap: DUMMY_PRICE_RANGE_MAP,
priceRange: "Custom",
selectPriceRange: action("selectPriceRange"),
ticks: DUMMY_POOL_TICKS,
currentTick: DUMMY_POOL_TICKS[20],
priceRanges: [],
changePriceRange: action("selectPriceRange"),
ticks: [],
};
Loading

0 comments on commit c3d1919

Please sign in to comment.