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

Update WC package with sui cctp beta support #1214

Merged
merged 10 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions apps/connect-v1/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/connect-v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@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.6-development",
"@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
Binary file not shown.
2,862 changes: 2,706 additions & 156 deletions apps/connect/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@mui/material": "^5.12.1",
"@tanstack/react-query": "^5.14.2",
"@wormhole-foundation/sdk": "^1.0.0",
"@wormhole-foundation/wormhole-connect": "^1.1.7",
"@wormhole-foundation/wormhole-connect": "^1.1.8-beta.2-development",
"aptos": "^1.21.0",
"bech32": "^2.0.0",
"dompurify": "^3.0.6",
Expand Down
1 change: 1 addition & 0 deletions apps/connect/src/env/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const chains = [
"Scroll",
"Xlayer",
"Mantle",
"Worldchain",
];

export const MAINNET_RPCS = {
Expand Down
2 changes: 1 addition & 1 deletion apps/connect/src/env/token-bridge.mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const ENV: Env = {
rpcs: MAINNET_RPCS,
routes: [
...DEFAULT_ROUTES,
MayanRouteWH,
MayanRouteWH as any, // FIXME: Remove this any and fix wh connect type issues
MayanRouteMCTP,
MayanRouteSWIFT,
...nttRoutes({
Expand Down
7 changes: 5 additions & 2 deletions apps/connect/src/providers/sanctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export const getTrmChainName = (chain: Chain) => {

if (trmChainNames[id]) return trmChainNames[id];
if (isCosmWasmChain(toChainNameFormat(chain))) return "cosmos";
if (isEVMChain(toChainNameFormat(chain))) return "ethereum";
// TO DO: Add support for other evm chains with the new sdk
if (isEVMChain(toChainNameFormat(chain)) || chain === "Worldchain")
return "ethereum";

return "";
};
Expand Down Expand Up @@ -97,7 +99,8 @@ export const isSanctionedAddress = async (
address: transferDetails.toWalletAddress,
}),
...(transferDetails.toChain !== "Ethereum" &&
isEVMChain(toChainNameFormat(transferDetails.toChain))
(isEVMChain(toChainNameFormat(transferDetails.toChain)) ||
transferDetails.toChain === "Worldchain")
? [
isSanctioned({
chain: "ethereum",
Expand Down
2 changes: 2 additions & 0 deletions apps/connect/src/utils/getSortedChains.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe("getSortedChains", () => {
"Scroll",
"Xlayer" as any,
"Mantle",
"Worldchain",
"Solana",
"Injective",
"Klaytn",
Expand Down Expand Up @@ -60,6 +61,7 @@ describe("getSortedChains", () => {
"Kujira",
"Evmos",
"Xlayer",
"Worldchain",
]);
});

Expand Down
3 changes: 2 additions & 1 deletion apps/connect/src/utils/isValidAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export const isValidAddress = async (
address: string,
chain: Chain
): Promise<boolean> => {
if (isEVMChain(toChainNameFormat(chain)))
// TO DO: Add support for other evm chains with the new sdk
if (isEVMChain(toChainNameFormat(chain)) || chain === "Worldchain")
return isValidEthereumAddress(address);
if (chain === "Solana") return isValidSolanaAddress(address);
if (chain === "Aptos") return isValidAptosAddress(address);
Expand Down
Loading