Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/include connect v2 #1052

Merged
merged 40 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
164f2d9
Include connect v2
yuli-ferna Sep 3, 2024
dc6e34f
Fix prettier and build
yuli-ferna Sep 4, 2024
29c86a0
Include v2
yuli-ferna Sep 4, 2024
e776f51
USDC bridge with v2
yuli-ferna Sep 5, 2024
b4d77ab
Fix build
yuli-ferna Sep 5, 2024
5a42d87
Merge main
yuli-ferna Sep 5, 2024
0b9511a
Merge feature/portal-re-branding
yuli-ferna Sep 5, 2024
ed538f4
Fix routes
yuli-ferna Sep 5, 2024
d23cc6c
Fix rpcs
yuli-ferna Sep 5, 2024
d91056c
Fix prettier
yuli-ferna Sep 5, 2024
aa53f62
Connect fixes
yuli-ferna Sep 5, 2024
babf3cf
fix validate transfer
yuli-ferna Sep 5, 2024
911a3e3
fix usequeryparam bridge defaults
yuli-ferna Sep 6, 2024
01d46d3
Merge feature/portal-re-branding
yuli-ferna Sep 6, 2024
68eca39
Format
yuli-ferna Sep 6, 2024
f7ffee7
Delete connect v1
yuli-ferna Sep 6, 2024
28aab4a
Fix build
yuli-ferna Sep 7, 2024
af79bc0
modify build command
yuli-ferna Sep 7, 2024
6510cca
Fix lint
yuli-ferna Sep 9, 2024
c73f5c3
Fix test
yuli-ferna Sep 9, 2024
e130ca6
Rm v2 vars
yuli-ferna Sep 9, 2024
b2273da
Fix connect and format
yuli-ferna Sep 9, 2024
0a23ff5
Change toLocalLowerCase to toLowerCase
yuli-ferna Sep 9, 2024
450679a
Fix test
yuli-ferna Sep 9, 2024
4a50f27
Review changes
yuli-ferna Sep 10, 2024
277deac
Include connect v1 and a common lib
yuli-ferna Sep 10, 2024
494d580
Fix build
yuli-ferna Sep 10, 2024
0cb7e95
Fix build
yuli-ferna Sep 10, 2024
54643a7
Enable tbtc route
yuli-ferna Sep 11, 2024
fb99abc
Format
yuli-ferna Sep 11, 2024
02dfc8c
Fix build
yuli-ferna Sep 11, 2024
ed03e8a
Fix build
yuli-ferna Sep 11, 2024
79b4b69
Rm workspaces
yuli-ferna Sep 11, 2024
b502c2d
Fix build
yuli-ferna Sep 11, 2024
41b4024
Delete common lib
yuli-ferna Sep 11, 2024
a417c6b
Update connect v2
yuli-ferna Sep 11, 2024
3509f26
Fix test
yuli-ferna Sep 11, 2024
c7cc21c
Fix test and build
yuli-ferna Sep 11, 2024
b9190ff
Fix wstEth
yuli-ferna Sep 11, 2024
4cbe194
Format
yuli-ferna Sep 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,472 changes: 2,256 additions & 1,216 deletions apps/connect/package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions apps/connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"preview": "cross-env VITE_APP_CLUSTER=mainnet vite preview",
"format": "npm run prettier -- --write ./src",
"ts:check": "tsc --project ./tsconfig.json --noEmit --skipLibCheck",
"test": "cross-env VITE_APP_CLUSTER=testnet jest --coverage",
"test:watch": "cross-env VITE_APP_CLUSTER=testnet jest --coverage --watchAll=true"
"test": "cross-env VITE_APP_CLUSTER=mainnet jest --coverage",
danielisaacgeslin marked this conversation as resolved.
Show resolved Hide resolved
"test:watch": "cross-env VITE_APP_CLUSTER=mainnet jest --coverage --watchAll=true"
},
"dependencies": {
"@certusone/wormhole-sdk": "^0.10.18",
Expand All @@ -30,7 +30,8 @@
"@mui/icons-material": "^5.14.11",
"@mui/material": "^5.12.1",
"@tanstack/react-query": "^5.14.2",
"@wormhole-foundation/wormhole-connect": "^0.3.22-beta.3-development",
"@wormhole-foundation/sdk": "^0.10.3",
"@wormhole-foundation/wormhole-connect": "file:wormhole-foundation-wormhole-connect-0.3.7.tgz",
"aptos": "^1.21.0",
"bech32": "^2.0.0",
"dompurify": "^3.0.6",
Expand Down
19 changes: 3 additions & 16 deletions apps/connect/src/components/atoms/Connect.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentProps, memo, useEffect } from "react";
import WormholeConnect from "@wormhole-foundation/wormhole-connect-v2";
import { memo, useEffect } from "react";
import WormholeConnect from "@wormhole-foundation/wormhole-connect";
import { theme } from "../../theme/connect";
import Banner from "./Banner";
import { useConnectConfig } from "../../hooks/useConnectConfig";
Expand All @@ -24,20 +24,7 @@ export const Connect = memo(() => {

return (
<Container>
{!!config && (
<WormholeConnect
config={
{
useRedesign: true,
rpcs: {
Solana:
"https://solana-mainnet.g.alchemy.com/v2/57SZNfWzjQuYQ3U89jxghxXAbBT_JExa",
},
} as unknown as ComponentProps<typeof WormholeConnect>["config"]
}
theme={theme}
/>
)}
{!!config && <WormholeConnect config={config} theme={theme} />}
<Banner />
</Container>
);
Expand Down
45 changes: 23 additions & 22 deletions apps/connect/src/env/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@ const rpcs = (chains: string[], template: (chain: string) => string) =>
.map((chain: string) => ({ [chain]: template(chain) }))
.reduce((acc, cur) => ({ ...acc, ...cur }), {});
const asRpcHost = (chain: string) =>
`https://and76cjzpa.execute-api.us-east-2.amazonaws.com/${chain}/`;
`https://and76cjzpa.execute-api.us-east-2.amazonaws.com/${chain.toLowerCase()}/`;
export const chains = [
"wormchain",
"osmosis",
"ethereum",
"sui",
"aptos",
"kujira",
"evmos",
"bsc",
"polygon",
"avalanche",
"fantom",
"celo",
"moonbeam",
"base",
"arbitrum",
"optimism",
"scroll",
"xlayer",
"mantle",
"Wormchain",
sebastianscatularo marked this conversation as resolved.
Show resolved Hide resolved
"Osmosis",
"Ethereum",
"Sui",
"Aptos",
"Kujira",
"Evmos",
"Bsc",
"Polygon",
"Avalanche",
"Fantom",
"Celo",
"Moonbeam",
"Base",
"Arbitrum",
"Optimism",
"Scroll",
"Xlayer",
"Mantle",
];

export const MAINNET_RPCS = {
...rpcs(chains, asRpcHost),
solana: "https://wormhole.rpcpool.com/",
Solana: "https://wormhole.rpcpool.com/",
};

export const PUBLIC_URL = envVars.VITE_PUBLIC_URL || "";
Expand All @@ -45,7 +45,8 @@ export const wormholeConnectConfigCommon: Partial<WormholeConnectConfig> = {
explorer: {
href: `https://wormholescan.io/#/txs?address={:address}&network=${CLUSTER}`,
},
manualTargetAddress: true,
useRedesign: true,
//manualTargetAddress: true,
menu: [],
};

Expand Down
Loading
Loading