Skip to content

Commit

Permalink
pull code from branch origin/develop and resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
emilydrakesmith committed Oct 1, 2024
2 parents a1ddbfe + fe30bdc commit 4fe78ae
Show file tree
Hide file tree
Showing 37 changed files with 998 additions and 3,956 deletions.
7 changes: 3 additions & 4 deletions e2e/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,15 @@ export async function initWallet(context: BrowserContext) {
await waiter(2);

console.log('.............................');
console.log(process.env);
console.log(process.env.local);
console.log('Environment variables loaded');
console.log('.............................');

const seedEnv = process.env.TEST_METAMASK_SEED
? process.env.TEST_METAMASK_SEED
: '';
const seed = seedEnv.split(',');

console.log(seed);
console.log('Seed phrase loaded');

async function processWallet(page) {
const elementHandle = await page.$('#onboarding__terms-checkbox');
Expand Down Expand Up @@ -162,7 +161,7 @@ export async function initWallet(context: BrowserContext) {
page.url().includes('chrome-extension') &&
page.url().includes('home.html')
) {
console.log('page found', page.url());
console.log('Page found with URL:', page.url());
await processWallet(page);
}
});
Expand Down
20 changes: 9 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@
"dependencies": {
"@crocswap-libs/sdk": "^1.0.2",
"@d3fc/d3fc-extent": "^4.0.2",
"@emotion/babel-plugin": "^11.12.0",
"@emotion/is-prop-valid": "^1.2.1",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@material-ui/core": "^4.12.4",
"@mui/material": "^5.8.2",
"@types/react-blockies": "^1.4.4",
"@types/react-color": "^3.0.12",
"@vitejs/plugin-react": "^4.3.1",
"@web3modal/ethers": "4.2.1",
"alchemy-sdk": "^3.2.0",
"alchemy-sdk": "^3.4.2",
"alea": "^1.0.1",
"babel-plugin-styled-components": "^2.1.4",
"d3": "^7.4.4",
Expand All @@ -31,8 +26,7 @@
"modern-screenshot": "^4.4.25",
"moment": "^2.30.1",
"numbro": "^2.5.0",
"p5": "^1.9.4",
"p5.j5": "^1.2.0",
"p5": "^1.11.0",
"re-resizable": "^6.6.11",
"react": "^18.3.1",
"react-blockies": "^1.4.1",
Expand All @@ -47,10 +41,8 @@
"react-router-dom": "^6.3.0",
"react-transition-group": "^4.4.2",
"react-use-websocket": "^4.8.1",
"simplex-noise": "^4.0.1",
"simplex-noise": "^4.0.3",
"styled-components": "6.0.3",
"vite": "^5.3.5",
"vite-plugin-babel-macros": "^1.0.6",
"web-vitals": "^2.1.0"
},
"resolutions": {
Expand Down Expand Up @@ -84,13 +76,17 @@
],
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@emotion/is-prop-valid": "^1.3.1",
"@testing-library/react": "^13.2.0",
"@testing-library/user-event": "^14.5.2",
"@types/adm-zip": "^0.5.4",
"@types/d3": "^7.1.0",
"@types/p5": "^1.7.6",
"@types/react-blockies": "^1.4.4",
"@types/react-color": "^3.0.12",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^7.1.0",
"@vitejs/plugin-react": "^4.3.2",
"adm-zip": "^0.5.10",
"eslint": "^7.32.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -104,6 +100,8 @@
"prettier": "^3.3.1",
"superagent": "^10.0.0",
"typescript": "^4.4.2",
"vite": "^5.4.8",
"vite-plugin-babel-macros": "^1.0.6",
"vite-plugin-checker": "^0.6.4",
"vitest": "^1.6.0"
}
Expand Down
24 changes: 0 additions & 24 deletions public/ambient-token-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,30 +554,6 @@
"decimals": 18,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png",
"symbol": "DAI"
},
{
"name": "Native Ether",
"address": "0x0000000000000000000000000000000000000000",
"chainId": 11155111,
"decimals": 18,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",
"symbol": "ETH"
},
{
"name": "USDC",
"address": "0x60bBA138A74C5e7326885De5090700626950d509",
"chainId": 11155111,
"decimals": 6,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
"symbol": "USDC"
},
{
"name": "Wrapped BTC",
"address": "0xCA97CC9c1a1dfA54A252DaAFE9b5Cd1E16C81328",
"chainId": 11155111,
"decimals": 8,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/logo.png",
"symbol": "WBTC"
}
]
}
24 changes: 0 additions & 24 deletions src/ambient-utils/constants/ambient-token-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,30 +554,6 @@
"decimals": 18,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png",
"symbol": "DAI"
},
{
"name": "Native Ether",
"address": "0x0000000000000000000000000000000000000000",
"chainId": 11155111,
"decimals": 18,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",
"symbol": "ETH"
},
{
"name": "USDC",
"address": "0x60bBA138A74C5e7326885De5090700626950d509",
"chainId": 11155111,
"decimals": 6,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
"symbol": "USDC"
},
{
"name": "Wrapped BTC",
"address": "0xCA97CC9c1a1dfA54A252DaAFE9b5Cd1E16C81328",
"chainId": 11155111,
"decimals": 8,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/logo.png",
"symbol": "WBTC"
}
]
}
2 changes: 1 addition & 1 deletion src/components/Chat/FullChat/FullChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function FullChat(props: FullChatPropsIF) {
const { favePools } = useContext(UserPreferenceContext);
const reconstructedReadableRoom =
params && !params.includes('global')
? params.replace('&', ' / ').toUpperCase()
? params.replace(/&/g, ' / ').toUpperCase()
: params && params.includes('global')
? 'Global'
: 'Global';
Expand Down
6 changes: 5 additions & 1 deletion src/components/Global/FooterNav/FooterNav.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@
width: 98%;
margin: 0 auto;
border-top: 1px solid var(--dark3);
gap: 4px;
}

.navItem {
flex: 1;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer !important;
transition: all 0.2s ease-out;

}

.link {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
Expand All @@ -36,6 +39,7 @@
gap: 4px;
font-size: var(--body-size);
line-height: var(--body-lh);

}

.icon {
Expand Down
23 changes: 13 additions & 10 deletions src/components/Global/IconWithTooltip/IconWithTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,20 @@ interface IconWithTooltipPropsIF {

function IconWithTooltip(props: IconWithTooltipPropsIF) {
const { children, title, placement, style, enterDelay } = props;

return (
<DefaultTooltip
interactive
arrow
title={title}
enterDelay={enterDelay ? parseFloat(enterDelay) : 400}
leaveDelay={200}
placement={placement ? placement : 'bottom'}
>
<div style={style}>{children}</div>
</DefaultTooltip>
<>
<DefaultTooltip
interactive
arrow
title={title}
enterDelay={enterDelay ? parseFloat(enterDelay) : 400}
leaveDelay={200}
placement={placement ? placement : 'bottom'}
>
<div style={style}>{children}</div>
</DefaultTooltip>
</>
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.mainContainer{
width: 100%;
background: var(--dark2);
box-shadow: 100px 100px 100px 50px rgba(0, 0, 0, 0.25);

align-items: center;
flex-direction: column;

position: fixed;
bottom: 56px;


z-index: 10000000;

font-size: 12px;
border-top: 1px solid var(--text3);

}
.closeButton{

outline: none;
border: none;
background: transparent;
width: 100%;
display: flex;
justify-content: flex-end;
align-items: flex-end;

}
.mainContent{
padding: 1rem 8px;
}
61 changes: 17 additions & 44 deletions src/components/Global/SnackbarComponent/SnackbarComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,48 +1,14 @@
// START: Import React and Dongles
import { forwardRef, memo, SyntheticEvent, useContext, useEffect } from 'react';
import { forwardRef, memo, SyntheticEvent, useContext, useEffect, useRef } from 'react';
import { Snackbar } from '@material-ui/core';
import { Alert, AlertProps } from '@mui/material';
import { motion } from 'framer-motion';
import { AppStateContext } from '../../../contexts/AppStateContext';
import useMediaQuery from '../../../utils/hooks/useMediaQuery';
import { IoMdClose } from 'react-icons/io';
import styled from 'styled-components';
import styles from './SnackbarComponent.module.css'
import useOnClickOutside from '../../../utils/hooks/useOnClickOutside';

const Wrapper = styled.div<{ isSnackbarOpen: boolean }>`
width: 100%;
background: rgba(23, 29, 39, 0.25);
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
display: ${({ isSnackbarOpen }) => (isSnackbarOpen ? 'flex' : 'none')};
box-shadow: 100px 100px 100px 50px rgba(0, 0, 0, 0.25);
justify-content: center;
position: fixed;
bottom: 16px;
left: 50%;
transform: translateX(-50%);
z-index: 10000000;
`;

const MobileSnackbarWrapper = styled.div<{ isSnackbarOpen: boolean }>`
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
gap: 8px;
padding: 16px;
background-color: #171d27;
color: white;
width: 300px;
font-size: 12px;
line-height: 16px;
backdrop-filter: blur(10px);
text-align: center;
word-break: break-word;
`;

const SnackbarAlert = forwardRef<HTMLDivElement, AlertProps>(
function SnackbarAlert(props, ref) {
Expand Down Expand Up @@ -95,15 +61,22 @@ function SnackbarComponent() {
};
}, [isSnackbarOpen, handleClose]);

const mobileRef = useRef<HTMLDivElement>(null);

useOnClickOutside(mobileRef, handleClose);

if (isSmallScreen)
return (
<Wrapper isSnackbarOpen={isSnackbarOpen}>
<MobileSnackbarWrapper isSnackbarOpen={isSnackbarOpen}>
{content}

<IoMdClose size={25} onClick={handleClose} />
</MobileSnackbarWrapper>
</Wrapper>
<div className={styles.mainContainer} ref={mobileRef}
style={{display: isSnackbarOpen ? 'flex' : 'none'}}>

<button className={styles.closeButton} onClick={handleClose}>

<IoMdClose size={25} />
</button>
<div className={styles.mainContent}>{content}</div>

</div>
);

return (
Expand Down
Loading

0 comments on commit 4fe78ae

Please sign in to comment.