Skip to content

Commit

Permalink
Merge pull request #1374 from warbler-labs/revert-lark-banner
Browse files Browse the repository at this point in the history
Revert "Merge pull request #1294 from warbler-labs/lark-banner"
  • Loading branch information
landakram authored Jan 20, 2023
2 parents 326c509 + 1e2c5a4 commit 5e29cb7
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 354 deletions.
13 changes: 0 additions & 13 deletions packages/client2/lib/graphql/client-only-schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -131,25 +131,12 @@ type CurvePool {
usdcPerLpToken: BigDecimal!
}

type BackerSecondaryMarketStat {
id: ID!
tokenCount: Int!
onSaleCount: Int!
}

type BackerSecondaryMarket {
id: ID!
collectionStats: BackerSecondaryMarketStat!
poolStats(poolAddress: String!): BackerSecondaryMarketStat!
}

extend type Query {
viewer: Viewer!
isWalletModalOpen: Boolean!
isVerificationModalOpen: Boolean!
gfiPrice(fiat: SupportedFiat!): GfiPrice!
currentBlock: BlockInfo!
backerSecondaryMarket: BackerSecondaryMarket!
curvePool: CurvePool!
}

Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions packages/client2/lib/graphql/local-resolvers/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Resolvers } from "@apollo/client";

import { backerSecondaryMarketResolvers } from "./backer-secondary-market";
import { creditLineResolvers } from "./credit-line";
import { curvePoolResolvers } from "./curve-pool";
import {
Expand All @@ -18,7 +17,6 @@ import { viewerResolvers } from "./viewer";
export const resolvers: Resolvers = {
Query: rootQueryResolvers,
Viewer: viewerResolvers,
BackerSecondaryMarket: backerSecondaryMarketResolvers,
CreditLine: creditLineResolvers,
IndirectGfiGrant: indirectGfiGrantResolvers,
DirectGfiGrant: directGfiGrantResolvers,
Expand Down
24 changes: 1 addition & 23 deletions packages/client2/lib/graphql/local-resolvers/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@ import { Resolvers } from "@apollo/client";

import { getProvider } from "@/lib/wallet";

import {
BackerSecondaryMarket,
BlockInfo,
GfiPrice,
SupportedFiat,
Viewer,
} from "../generated";
import { fetchBackerSecondaryMarketStat } from "./backer-secondary-market";
import { BlockInfo, GfiPrice, SupportedFiat, Viewer } from "../generated";

async function fetchWithTimeout(url: string, timeout = 3000) {
const controller = new AbortController();
Expand Down Expand Up @@ -105,19 +98,4 @@ export const rootQueryResolvers: Resolvers[string] = {
__typename: "CurvePool",
};
},
async backerSecondaryMarket(): Promise<
Omit<BackerSecondaryMarket, "poolStats">
> {
const { tokenCount, onSaleCount } = await fetchBackerSecondaryMarketStat();
return {
__typename: "BackerSecondaryMarket",
id: "bsm",
collectionStats: {
__typename: "BackerSecondaryMarketStat",
id: "collection",
tokenCount,
onSaleCount,
},
};
},
};
24 changes: 4 additions & 20 deletions packages/client2/pages/pools/[address]/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ import {
import { DOCUMENT_FIELDS } from "./documents-list";
import FundingBar from "./funding-bar";
import RepaymentProgressPanel from "./repayment-progress-panel";
import SecondaryMarketPanel from "./secondary-market-panel";
import {
StatusSection,
TRANCHED_POOL_STAT_GRID_FIELDS,
Expand Down Expand Up @@ -320,14 +319,6 @@ export default function PoolPage({ dealDetails }: PoolPageProps) {
"This offering is only available to non-U.S. persons. This offering has not been registered under the U.S. Securities Act of 1933 (“Securities Act”), as amended, and may not be offered or sold in the United States or to a U.S. person (as defined in Regulation S promulgated under the Securities Act) absent registration or an applicable exemption from the registration requirements.";
}

const hasBacked = !!(
user &&
tranchedPool &&
(user.tranchedPoolTokens.length > 0 ||
user.zaps.length > 0 ||
user.vaultedPoolTokens.length > 0)
);

return (
<>
<SEO title={dealDetails.name} />
Expand Down Expand Up @@ -430,7 +421,10 @@ export default function PoolPage({ dealDetails }: PoolPageProps) {
/>
) : null}

{data.user && hasBacked ? (
{data?.user &&
(data?.user.tranchedPoolTokens.length > 0 ||
data?.user.zaps.length > 0 ||
data?.user.vaultedPoolTokens.length > 0) ? (
<WithdrawalPanel
tranchedPoolAddress={tranchedPool.id}
poolTokens={data.user.tranchedPoolTokens}
Expand Down Expand Up @@ -460,16 +454,6 @@ export default function PoolPage({ dealDetails }: PoolPageProps) {
{poolStatus === PoolStatus.ComingSoon ? (
<ComingSoonPanel fundableAt={tranchedPool?.fundableAt} />
) : null}

{tranchedPool && poolStatus ? (
<SecondaryMarketPanel
hasBacked={hasBacked}
noUid={noUid}
uidIsUs={uidIsUs}
poolStatus={poolStatus}
poolAddress={tranchedPool.id}
/>
) : null}
</div>
) : null}
</div>
Expand Down
6 changes: 0 additions & 6 deletions packages/client2/pages/pools/[address]/lark-logo.svg

This file was deleted.

Loading

0 comments on commit 5e29cb7

Please sign in to comment.