-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vite build process improvements (#926)
* wip * wip * fixed testing * fix in megreDeep util * run prettier * changed default to testnet * run gen logos script in token-list * run gen script in token-list * token-list specified numpy version * token-list ci fix | attmpt 2 * [automated] update content --------- Co-authored-by: WormholeBot <[email protected]>
- Loading branch information
1 parent
dd1e7ba
commit e59058c
Showing
64 changed files
with
1,224 additions
and
880 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import type { WormholeConnectConfig } from "@wormhole-foundation/wormhole-connect"; | ||
import packageJson from "../../package.json"; | ||
import { envVars } from "./env-vars"; | ||
|
||
const rpcs = (chains: string[], template: (chain: string) => string) => | ||
chains | ||
.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}/`; | ||
export const chains = [ | ||
"wormchain", | ||
"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/", | ||
}; | ||
|
||
export const PUBLIC_URL = envVars.PUBLIC_URL || ""; | ||
|
||
export const versions: Env["versions"] = [ | ||
{ | ||
appName: "Portal Bridge", | ||
version: `v${envVars.VITE_APP_VERSION || "0.0.0"}`, | ||
}, | ||
{ | ||
appName: "Wormhole Connect", | ||
version: `v${packageJson.version}`, | ||
}, | ||
]; | ||
|
||
export const wormholeConnectConfigCommon: Partial<WormholeConnectConfig> = { | ||
walletConnectProjectId: envVars.VITE_APP_WALLET_CONNECT_PROJECT_ID || "", | ||
|
||
env: envVars.VITE_APP_CLUSTER || "testnet", | ||
rpcs: {}, | ||
showHamburgerMenu: false, | ||
explorer: { | ||
href: `https://wormholescan.io/#/txs?address={:address}&network=${envVars.VITE_APP_CLUSTER || "testnet"}`, | ||
}, | ||
menu: [ | ||
{ | ||
label: "Advanced Tools", | ||
href: `${envVars.PUBLIC_URL}/advanced-tools/`, | ||
order: 1, | ||
}, | ||
{ | ||
label: "Privacy Policy", | ||
href: `${envVars.PUBLIC_URL}/#/privacy-policy/`, | ||
}, | ||
], | ||
}; | ||
|
||
export interface Env { | ||
wormholeConnectConfig: WormholeConnectConfig; | ||
navBar: { | ||
label: string; | ||
active?: boolean; | ||
href: string; | ||
isBlank?: boolean; | ||
}[]; | ||
redirects?: { source: string[]; target: string }; | ||
versions: { version: string; appName: string }[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const envVars = import.meta.env; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { ENV } from "./token-bridge"; |
Oops, something went wrong.