mirror of https://github.com/certusone/oyster.git
fix: format
This commit is contained in:
parent
ba935b8917
commit
b4a46cfe85
|
@ -62,7 +62,7 @@
|
||||||
"build": "craco build",
|
"build": "craco build",
|
||||||
"test": "craco test",
|
"test": "craco test",
|
||||||
"eject": "react-scripts eject",
|
"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 ",
|
"deploy:ar": "arweave deploy-dir build --key-file ",
|
||||||
"format:fix": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|md)\"",
|
"format:fix": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|md)\"",
|
||||||
"ethers": "typechain --target ethers-v4 --outDir src/contracts 'contracts/*.json'"
|
"ethers": "typechain --target ethers-v4 --outDir src/contracts 'contracts/*.json'"
|
||||||
|
|
|
@ -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>
|
|
||||||
// );
|
|
||||||
};
|
|
|
@ -30,9 +30,13 @@ export function EthereumInput(props: {
|
||||||
const renderReserveAccounts = tokens.filter(t => (t.tags?.indexOf('longList') || -1) < 0).map((token) => {
|
const renderReserveAccounts = tokens.filter(t => (t.tags?.indexOf('longList') || -1) < 0).map((token) => {
|
||||||
const mint = token.address;
|
const mint = token.address;
|
||||||
return (
|
return (
|
||||||
<Option key={mint} value={mint} name={token.symbol} title={token.name}>
|
<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}/>
|
<TokenDisplay asset={props.asset} token={token} chain={ASSET_CHAIN.Ethereum}/>
|
||||||
<span className={"token-name"}>{token.name}</span>
|
<div className="multichain-option-name">
|
||||||
|
<span className={"token-name"}>{token.symbol}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</Option>
|
</Option>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -99,7 +103,7 @@ export function EthereumInput(props: {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</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
|
<NumericInput
|
||||||
value={
|
value={
|
||||||
parseFloat(lastAmount || '0.00') === props.amount
|
parseFloat(lastAmount || '0.00') === props.amount
|
||||||
|
@ -114,7 +118,7 @@ export function EthereumInput(props: {
|
||||||
setLastAmount(val);
|
setLastAmount(val);
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
fontSize: 20,
|
fontSize: 24,
|
||||||
boxShadow: 'none',
|
boxShadow: 'none',
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
outline: 'transparent',
|
outline: 'transparent',
|
||||||
|
|
|
@ -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 {
|
.ccy-input {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector {
|
.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector {
|
||||||
height: 52px;
|
height: 70px;
|
||||||
}
|
}
|
||||||
.ant-select-selector,
|
.ant-select-selector,
|
||||||
.ant-select-selector:focus,
|
.ant-select-selector:focus,
|
||||||
.ant-select-selector:active {
|
.ant-select-selector:active {
|
||||||
border-color: transparent !important;
|
border-color: transparent !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.ant-select-selection-item {
|
.ant-select-selection-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
height: 60px;
|
||||||
|
|
||||||
.token-name {
|
.token-name {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
|
@ -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;
|
|
||||||
}
|
|
Loading…
Reference in New Issue