From 065307e7357265ae1f321247213ae28b917ee89d Mon Sep 17 00:00:00 2001 From: Spacebean Date: Thu, 19 Sep 2024 15:10:23 -0600 Subject: [PATCH] feat: add .env args + well LP token logos --- projects/ui/.env.development | 1 + projects/ui/.env.production | 1 + projects/ui/src/components/App/SdkProvider.tsx | 13 +++++++++---- projects/ui/src/constants/tokens.ts | 12 ++++++++---- projects/ui/src/env.d.ts | 5 +++++ .../ui/src/img/tokens/bean-usdc-well-lp-logo.svg | 11 +++++++++++ .../ui/src/img/tokens/bean-usdt-well-lp-logo.svg | 11 +++++++++++ .../ui/src/img/tokens/bean-wbtc-well-lp-logo.svg | 16 ++++++++++++++++ .../src/img/tokens/bean-weeth-well-lp-logo.svg | 11 +++++++++++ .../lib/PipelineConvert/usePipelineConvert.ts | 1 + 10 files changed, 74 insertions(+), 8 deletions(-) create mode 100644 projects/ui/src/img/tokens/bean-usdc-well-lp-logo.svg create mode 100644 projects/ui/src/img/tokens/bean-usdt-well-lp-logo.svg create mode 100644 projects/ui/src/img/tokens/bean-wbtc-well-lp-logo.svg create mode 100644 projects/ui/src/img/tokens/bean-weeth-well-lp-logo.svg create mode 100644 projects/ui/src/lib/PipelineConvert/usePipelineConvert.ts diff --git a/projects/ui/.env.development b/projects/ui/.env.development index 4cdd4e38f5..19b2429dbd 100644 --- a/projects/ui/.env.development +++ b/projects/ui/.env.development @@ -8,3 +8,4 @@ VITE_ALCHEMY_API_KEY="ds4ljBC_Pq-PaIQ3aHo04t27y2n8qpry" VITE_THEGRAPH_API_KEY="4c0b9364a121c1f2aa96fe61cb73d705" VITE_WALLETCONNECT_PROJECT_ID=2159ea7542f2b547554f8c85eca0cec1 VITE_SNAPSHOT_API_KEY="83b2ba4f5e943503dad56d4afea4a5205ace935d702cb8c0a1151c995b474f59" +VITE_ZERO_X_API_KEY="" \ No newline at end of file diff --git a/projects/ui/.env.production b/projects/ui/.env.production index 346595d3ee..77403a8249 100644 --- a/projects/ui/.env.production +++ b/projects/ui/.env.production @@ -6,3 +6,4 @@ VITE_ALCHEMY_API_KEY="iByabvqm_66b_Bkl9M-wJJGdCTuy19R3" VITE_THEGRAPH_API_KEY="4c0b9364a121c1f2aa96fe61cb73d705" VITE_SNAPSHOT_API_KEY="83b2ba4f5e943503dad56d4afea4a5205ace935d702cb8c0a1151c995b474f59" +VITE_ZERO_X_API_KEY="" \ No newline at end of file diff --git a/projects/ui/src/components/App/SdkProvider.tsx b/projects/ui/src/components/App/SdkProvider.tsx index 7b409111b9..a63c46d2d2 100644 --- a/projects/ui/src/components/App/SdkProvider.tsx +++ b/projects/ui/src/components/App/SdkProvider.tsx @@ -17,6 +17,10 @@ import rinsableSproutLogo from '~/img/beanstalk/rinsable-sprout-icon.svg'; import beanEthLpLogo from '~/img/tokens/bean-eth-lp-logo.svg'; import beanEthWellLpLogo from '~/img/tokens/bean-eth-well-lp-logo.svg'; import beathWstethWellLPLogo from '~/img/tokens/bean-wsteth-logo.svg'; +import beanUsdcWellLpLogo from '~/img/tokens/bean-usdc-well-lp-logo.svg'; +import beanWbtcWellLpLogo from '~/img/tokens/bean-wbtc-well-lp-logo.svg'; +import beanUsdtWellLpLogo from '~/img/tokens/bean-usdt-well-lp-logo.svg'; +import beanWeethWellLpLogo from '~/img/tokens/bean-weeth-well-lp-logo.svg'; // ERC-20 Token Images import crv3Logo from '~/img/tokens/crv3-logo.png'; @@ -64,10 +68,10 @@ const setTokenMetadatas = (sdk: BeanstalkSDK) => { logo: beathWstethWellLPLogo, }); sdk.tokens.UNRIPE_BEAN_WSTETH.setMetadata({ logo: unripeBeanWstethLogoUrl }); - sdk.tokens.BEAN_WEETH_WELL_LP.setMetadata({ logo: beathWstethWellLPLogo }); // TODO: fix me - sdk.tokens.BEAN_WBTC_WELL_LP.setMetadata({ logo: beathWstethWellLPLogo }); // TODO: fix me - sdk.tokens.BEAN_USDC_WELL_LP.setMetadata({ logo: beathWstethWellLPLogo }); // TODO: fix me - sdk.tokens.BEAN_USDT_WELL_LP.setMetadata({ logo: beathWstethWellLPLogo }); // TODO: fix me + sdk.tokens.BEAN_WEETH_WELL_LP.setMetadata({ logo: beanWeethWellLpLogo }); + sdk.tokens.BEAN_WBTC_WELL_LP.setMetadata({ logo: beanWbtcWellLpLogo }); + sdk.tokens.BEAN_USDC_WELL_LP.setMetadata({ logo: beanUsdcWellLpLogo }); + sdk.tokens.BEAN_USDT_WELL_LP.setMetadata({ logo: beanUsdtWellLpLogo }); // ERC-20 tokens sdk.tokens.BEAN.setMetadata({ logo: beanCircleLogo }); @@ -113,6 +117,7 @@ const useBeanstalkSdkContext = () => { signer: signer ?? undefined, source: datasource, DEBUG: IS_DEVELOPMENT_ENV, + zeroXApiKey: import.meta.env.VITE_ZERO_X_API_KEY, ...(subgraphUrl ? { subgraphUrl } : {}), }); diff --git a/projects/ui/src/constants/tokens.ts b/projects/ui/src/constants/tokens.ts index 2a635650cb..7b21aec4e4 100644 --- a/projects/ui/src/constants/tokens.ts +++ b/projects/ui/src/constants/tokens.ts @@ -17,6 +17,10 @@ import rinsableSproutLogo from '~/img/beanstalk/rinsable-sprout-icon.svg'; import beanEthLpLogoUrl from '~/img/tokens/bean-eth-lp-logo.svg'; import beanEthWellLpLogoUrl from '~/img/tokens/bean-eth-well-lp-logo.svg'; import beanLusdLogoUrl from '~/img/tokens/bean-lusd-logo.svg'; +import beanUsdcWellLpLogo from '~/img/tokens/bean-usdc-well-lp-logo.svg'; +import beanWbtcWellLpLogo from '~/img/tokens/bean-wbtc-well-lp-logo.svg'; +import beanUsdtWellLpLogo from '~/img/tokens/bean-usdt-well-lp-logo.svg'; +import beanWeethWellLpLogo from '~/img/tokens/bean-weeth-well-lp-logo.svg'; // ERC-20 Token Images import wstethLogo from '~/img/tokens/wsteth-logo.svg'; @@ -301,7 +305,7 @@ export const BEAN_WEETH_WELL_LP = makeChainToken( name: 'BEAN:weETH LP', symbol: 'BEANweETH', isLP: true, - logo: beanWstethLogo, // TODO: replace with bean:weeth logo + logo: beanWeethWellLpLogo, isUnripe: false, displayDecimals: 2, }, @@ -316,7 +320,7 @@ export const BEAN_WBTC_WELL_LP = makeChainToken( symbol: 'BEANWBTC', isLP: true, isUnripe: false, - logo: beanWstethLogo, // TODO: replace with bean:weeth logo + logo: beanWbtcWellLpLogo, displayDecimals: 2, }, { ...defaultRewards } @@ -330,7 +334,7 @@ export const BEAN_USDC_WELL_LP = makeChainToken( symbol: 'BEANUSDC', isLP: true, isUnripe: false, - logo: beanWstethLogo, // TODO: replace with bean:weeth logo + logo: beanUsdcWellLpLogo, displayDecimals: 2, }, { ...defaultRewards } @@ -344,7 +348,7 @@ export const BEAN_USDT_WELL_LP = makeChainToken( symbol: 'BEANUSDT', isLP: true, isUnripe: false, - logo: beanWstethLogo, // TODO: replace with bean:weeth logo + logo: beanUsdtWellLpLogo, displayDecimals: 2, }, { ...defaultRewards } diff --git a/projects/ui/src/env.d.ts b/projects/ui/src/env.d.ts index 9e5d4b6096..da3005c7ec 100644 --- a/projects/ui/src/env.d.ts +++ b/projects/ui/src/env.d.ts @@ -21,6 +21,11 @@ interface ImportMetaEnv { * If set, don't add CSP meta tag */ readonly DISABLE_CSP?: any; + + /** + * API key for used for ZeroX Swap API + */ + readonly VITE_ZERO_X_API_KEY: string; } interface ImportMeta { diff --git a/projects/ui/src/img/tokens/bean-usdc-well-lp-logo.svg b/projects/ui/src/img/tokens/bean-usdc-well-lp-logo.svg new file mode 100644 index 0000000000..92b880af5f --- /dev/null +++ b/projects/ui/src/img/tokens/bean-usdc-well-lp-logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/projects/ui/src/img/tokens/bean-usdt-well-lp-logo.svg b/projects/ui/src/img/tokens/bean-usdt-well-lp-logo.svg new file mode 100644 index 0000000000..9d462dc852 --- /dev/null +++ b/projects/ui/src/img/tokens/bean-usdt-well-lp-logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/projects/ui/src/img/tokens/bean-wbtc-well-lp-logo.svg b/projects/ui/src/img/tokens/bean-wbtc-well-lp-logo.svg new file mode 100644 index 0000000000..af60ce358a --- /dev/null +++ b/projects/ui/src/img/tokens/bean-wbtc-well-lp-logo.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/projects/ui/src/img/tokens/bean-weeth-well-lp-logo.svg b/projects/ui/src/img/tokens/bean-weeth-well-lp-logo.svg new file mode 100644 index 0000000000..d92b3a6901 --- /dev/null +++ b/projects/ui/src/img/tokens/bean-weeth-well-lp-logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/projects/ui/src/lib/PipelineConvert/usePipelineConvert.ts b/projects/ui/src/lib/PipelineConvert/usePipelineConvert.ts new file mode 100644 index 0000000000..badea22832 --- /dev/null +++ b/projects/ui/src/lib/PipelineConvert/usePipelineConvert.ts @@ -0,0 +1 @@ +export function usePipelineConvert() {}