fix: format

This commit is contained in:
bartosz-lipinski 2021-03-09 15:56:11 -06:00
parent ba935b8917
commit b4a46cfe85
6 changed files with 29 additions and 81 deletions

View File

@ -62,7 +62,7 @@
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject",
"deploy": "gh-pages -d build",
"deploy": "gh-pages -d ../../build/bridge --repp https://github.com/solana-labs/oyster-bridge",
"deploy:ar": "arweave deploy-dir build --key-file ",
"format:fix": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|md)\"",
"ethers": "typechain --target ethers-v4 --outDir src/contracts 'contracts/*.json'"

View File

@ -1,22 +0,0 @@
import Identicon from 'identicon.js';
import React from 'react';
export const EthereumUser = (props: {}) => {
return null;
// const { accounts } = useEthereum();
// return (
// <div className="wallet-wrapper">
// <span>
// </span>
// <div className="wallet-key">
// {shortenAddress(`${accounts[0]}`)}
// <Identicon
// address={accounts[0]}
// style={{ marginLeft: '0.5rem', display: 'flex' }}
// />
// </div>
// </div>
// );
};

View File

@ -30,9 +30,13 @@ export function EthereumInput(props: {
const renderReserveAccounts = tokens.filter(t => (t.tags?.indexOf('longList') || -1) < 0).map((token) => {
const mint = token.address;
return (
<Option key={mint} value={mint} name={token.symbol} title={token.name}>
<TokenDisplay asset={props.asset} token={token} chain={ASSET_CHAIN.Ethereum}/>
<span className={"token-name"}>{token.name}</span>
<Option key={mint} className="multichain-option" value={mint} name={token.symbol} title={token.name}>
<div className="multichain-option-content">
<TokenDisplay asset={props.asset} token={token} chain={ASSET_CHAIN.Ethereum}/>
<div className="multichain-option-name">
<span className={"token-name"}>{token.symbol}</span>
</div>
</div>
</Option>
);
});
@ -99,7 +103,7 @@ export function EthereumInput(props: {
</div>
)}
</div>
<div className="ccy-input-header" style={{ padding: '0px 10px 5px 7px' }}>
<div className="ccy-input-header" style={{ padding: '0px 10px 5px 7px', height: 80 }}>
<NumericInput
value={
parseFloat(lastAmount || '0.00') === props.amount
@ -114,7 +118,7 @@ export function EthereumInput(props: {
setLastAmount(val);
}}
style={{
fontSize: 20,
fontSize: 24,
boxShadow: 'none',
borderColor: 'transparent',
outline: 'transparent',

View File

@ -1,17 +1,35 @@
.multichain-option {
display: flex;
align-items: center;
}
.multichain-option-content {
display: flex;
align-items: center;
}
.multichain-option-name {
display: flex;
flex-direction: row;
}
.ccy-input {
margin-top: 10px;
margin-bottom: 10px;
.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector {
height: 52px;
height: 70px;
}
.ant-select-selector,
.ant-select-selector:focus,
.ant-select-selector:active {
border-color: transparent !important;
box-shadow: none !important;
align-items: center;
}
.ant-select-selection-item {
display: flex;
height: 60px;
.token-name {
display: none;
}

View File

@ -1,40 +0,0 @@
import React, { useCallback } from 'react';
import { Button, Card } from 'antd';
import { LAMPORTS_PER_SOL } from '@solana/web3.js';
import { LABELS } from '../../constants';
import { contexts, utils, ConnectButton } from '@oyster/common';
import { useHistory, useLocation } from "react-router-dom";
import { SolanaInput, EthereumInput } from "./../Input";
import './style.less';
const { useConnection } = contexts.Connection;
const { useWallet } = contexts.Wallet;
const { notify } = utils;
export const Wrap = () => {
const connection = useConnection();
const { wallet } = useWallet();
return (
<>
<div className="exchange-card">
<SolanaInput
title="From Solana"
onInputChange={() => {}}
/>
<Button type="primary" className="swap-button">
</Button>
{/* <EthereumInput
title="To Ethereum"
onInputChange={() => {}}
/> */}
</div>
<ConnectButton type="primary">
Wrap
</ConnectButton>
</>
);
};

View File

@ -1,12 +0,0 @@
.input-card {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 10px;
}
.swap-button {
border-radius: 2em;
width: 32px;
padding-left: 8px;
}