Skip to content

Commit

Permalink
feat: cleanup for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Space-Bean committed Sep 14, 2024
1 parent 7b21d24 commit f3dafe2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 29 deletions.
8 changes: 4 additions & 4 deletions projects/cli/src/commands/setbalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const setbalance = async (sdk, chain, { account, symbol, amount }) => {
"urBEAN",
"urBEANwstETH",
"BEANWETH",
"BEANWSTETH",
"BEANWEETH",
"BEANwstETH",
"BEANweETH",
"BEANWBTC",
"BEANUSDC",
"BEANUSDT"
Expand All @@ -42,8 +42,8 @@ export const setbalance = async (sdk, chain, { account, symbol, amount }) => {
if (symbol === "urBEAN") t = sdk.tokens.UNRIPE_BEAN;
if (symbol === "urBEANwstETH") t = sdk.tokens.UNRIPE_BEAN_WSTETH;
if (symbol === "BEANWETH") t = sdk.tokens.BEAN_ETH_WELL_LP;
if (symbol === "BEANWEETH") t = sdk.tokens.BEAN_WEETH_WELL_LP;
if (symbol === "BEANWSTETH") t = sdk.tokens.BEAN_WSTETH_WELL_LP;
if (symbol === "BEANweETH") t = sdk.tokens.BEAN_WEETH_WELL_LP;
if (symbol === "BEANwstETH") t = sdk.tokens.BEAN_WSTETH_WELL_LP;
if (symbol === "BEANWBTC") t = sdk.tokens.BEAN_WBTC_WELL_LP;
if (symbol === "BEANUSDC") t = sdk.tokens.BEAN_USDC_WELL_LP;
if (symbol === "BEANUSDT") t = sdk.tokens.BEAN_USDT_WELL_LP;
Expand Down
20 changes: 10 additions & 10 deletions projects/sdk/src/utils/TestUtils/BlockchainUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ export class BlockchainUtils {
this.setUSDTBalance(account, this.sdk.tokens.USDT.amount(amount)),
this.setWETHBalance(account, this.sdk.tokens.WETH.amount(amount)),
this.setDAIBalance(account, this.sdk.tokens.DAI.amount(amount)),
this.setWSTETHBalance(account, this.sdk.tokens.WSTETH.amount(amount)),
this.setWEETHBalance(account, this.sdk.tokens.WEETH.amount(amount)),
this.setwstETHBalance(account, this.sdk.tokens.WSTETH.amount(amount)),
this.setweETHBalance(account, this.sdk.tokens.WEETH.amount(amount)),
this.setWBTCBalance(account, this.sdk.tokens.WBTC.amount(amount)),
this.seturBEANBalance(account, this.sdk.tokens.UNRIPE_BEAN.amount(amount)),
this.seturBEANWSTETHBalance(account, this.sdk.tokens.UNRIPE_BEAN_WSTETH.amount(amount)),
this.seturBEANwstETHBalance(account, this.sdk.tokens.UNRIPE_BEAN_WSTETH.amount(amount)),
this.setBEANWETHBalance(account, this.sdk.tokens.BEAN_ETH_WELL_LP.amount(amount)),
this.setBEANWSTETHBalance(account, this.sdk.tokens.BEAN_WSTETH_WELL_LP.amount(amount)),
this.setBEANWEETHBalance(account, this.sdk.tokens.BEAN_WEETH_WELL_LP.amount(amount)),
this.setBEANwstETHBalance(account, this.sdk.tokens.BEAN_WSTETH_WELL_LP.amount(amount)),
this.setBEANweETHBalance(account, this.sdk.tokens.BEAN_WEETH_WELL_LP.amount(amount)),
this.setBEANWBTCBalance(account, this.sdk.tokens.BEAN_WBTC_WELL_LP.amount(amount)),
this.setBEANUSDCBalance(account, this.sdk.tokens.BEAN_USDC_WELL_LP.amount(amount)),
this.setBEANUSDTBalance(account, this.sdk.tokens.BEAN_USDT_WELL_LP.amount(amount))
Expand All @@ -153,10 +153,10 @@ export class BlockchainUtils {
async setWETHBalance(account: string, balance: TokenValue) {
this.setBalance(this.sdk.tokens.WETH, account, balance);
}
async setWSTETHBalance(account: string, balance: TokenValue) {
async setwstETHBalance(account: string, balance: TokenValue) {
this.setBalance(this.sdk.tokens.WSTETH, account, balance);
}
async setWEETHBalance(account: string, balance: TokenValue) {
async setweETHBalance(account: string, balance: TokenValue) {
this.setBalance(this.sdk.tokens.WEETH, account, balance);
}
async setWBTCBalance(account: string, balance: TokenValue) {
Expand All @@ -174,16 +174,16 @@ export class BlockchainUtils {
async seturBEANBalance(account: string, balance: TokenValue) {
this.setBalance(this.sdk.tokens.UNRIPE_BEAN, account, balance);
}
async seturBEANWSTETHBalance(account: string, balance: TokenValue) {
async seturBEANwstETHBalance(account: string, balance: TokenValue) {
this.setBalance(this.sdk.tokens.UNRIPE_BEAN_WSTETH, account, balance);
}
async setBEANWETHBalance(account: string, balance: TokenValue) {
this.setBalance(this.sdk.tokens.BEAN_ETH_WELL_LP, account, balance);
}
async setBEANWSTETHBalance(account: string, balance: TokenValue) {
async setBEANwstETHBalance(account: string, balance: TokenValue) {
this.setBalance(this.sdk.tokens.BEAN_WSTETH_WELL_LP, account, balance);
}
async setBEANWEETHBalance(account: string, balance: TokenValue) {
async setBEANweETHBalance(account: string, balance: TokenValue) {
this.setBalance(this.sdk.tokens.BEAN_WEETH_WELL_LP, account, balance);
}
async setBEANWBTCBalance(account: string, balance: TokenValue) {
Expand Down
5 changes: 0 additions & 5 deletions projects/ui/src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ interface ImportMetaEnv {
* If set, don't add CSP meta tag
*/
readonly DISABLE_CSP?: any;

/**
* Whether we are before the BS3 deploy
*/
readonly VITE_BS3_DEPLOYED?: boolean;
}

interface ImportMeta {
Expand Down
11 changes: 1 addition & 10 deletions projects/ui/src/util/wagmi/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,14 @@ if (!WALLET_CONNECT_PROJECT_ID) {
const SHOW_DEV = import.meta.env.VITE_SHOW_DEV_CHAINS;

const prodChains: readonly [Chain, ...Chain[]] = [mainnet, arbitrum] as const;
const preBS3DevChains: readonly [Chain, ...Chain[]] = [
mainnet,
localForkMainnet,
localForkArbitrum,
] as const;

const postBS3DevChains: readonly [Chain, ...Chain[]] = [
const devChains: readonly [Chain, ...Chain[]] = [
mainnet,
localForkMainnet,
localForkArbitrum,
arbitrum,
] as const;

const devChains = import.meta.env.VITE_BS3_DEPLOYED
? postBS3DevChains
: preBS3DevChains;

const chains: readonly [Chain, ...Chain[]] = !SHOW_DEV ? prodChains : devChains;

const transports: Record<number, Transport> = !SHOW_DEV
Expand Down

0 comments on commit f3dafe2

Please sign in to comment.