mirror of
https://github.com/trezor/trezor-wallet
synced 2025-02-20 03:52:01 +00:00
update old components
This commit is contained in:
parent
25083b5f19
commit
2804275ca9
@ -12,13 +12,15 @@ import type { State } from 'flowtype';
|
|||||||
import Header from 'components/Header';
|
import Header from 'components/Header';
|
||||||
import Footer from 'components/Footer';
|
import Footer from 'components/Footer';
|
||||||
import ModalContainer from 'components/modals';
|
import ModalContainer from 'components/modals';
|
||||||
import Notifications from 'components/Notification';
|
import ContextNotifications from 'components/notifications/Context';
|
||||||
|
|
||||||
import Log from 'components/Log';
|
import Log from 'components/Log';
|
||||||
|
|
||||||
import LeftNavigation from './components/LeftNavigation/Container';
|
import LeftNavigation from './components/LeftNavigation/Container';
|
||||||
import TopNavigationAccount from './components/TopNavigationAccount';
|
import TopNavigationAccount from './components/TopNavigationAccount';
|
||||||
import TopNavigationDeviceSettings from './components/TopNavigationDeviceSettings';
|
import TopNavigationDeviceSettings from './components/TopNavigationDeviceSettings';
|
||||||
|
|
||||||
|
|
||||||
type WalletContainerProps = {
|
type WalletContainerProps = {
|
||||||
wallet: $ElementType<State, 'wallet'>,
|
wallet: $ElementType<State, 'wallet'>,
|
||||||
children?: React.Node
|
children?: React.Node
|
||||||
@ -89,7 +91,7 @@ const Wallet = (props: WalletContainerProps) => (
|
|||||||
<Route path="/device/:device/network/:network/account/:account" component={TopNavigationAccount} />
|
<Route path="/device/:device/network/:network/account/:account" component={TopNavigationAccount} />
|
||||||
<Route path="/device/:device/device-settings" component={TopNavigationDeviceSettings} />
|
<Route path="/device/:device/device-settings" component={TopNavigationDeviceSettings} />
|
||||||
</Navigation>
|
</Navigation>
|
||||||
<Notifications />
|
<ContextNotifications />
|
||||||
<Log />
|
<Log />
|
||||||
<Body>
|
<Body>
|
||||||
{ props.children }
|
{ props.children }
|
||||||
|
@ -154,12 +154,14 @@ const AccountReceive = (props: Props) => {
|
|||||||
const isAddressHidden = !isAddressVerifying && !addressVerified && !addressUnverified;
|
const isAddressHidden = !isAddressVerifying && !addressVerified && !addressUnverified;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SelectedAccount {...props}>
|
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<StyledH2>Receive Ethereum or tokens</StyledH2>
|
<StyledH2>Receive Ethereum or tokens</StyledH2>
|
||||||
<AddressWrapper
|
<AddressWrapper
|
||||||
isShowingQrCode={addressVerified || addressUnverified}
|
isShowingQrCode={addressVerified || addressUnverified}
|
||||||
>
|
>
|
||||||
|
{isAddressVerifying && (
|
||||||
|
<AddressInfoText>Confirm address on TREZOR</AddressInfoText>
|
||||||
|
)}
|
||||||
{((addressVerified || addressUnverified) && !isAddressVerifying) && (
|
{((addressVerified || addressUnverified) && !isAddressVerifying) && (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
placement="bottomRight"
|
placement="bottomRight"
|
||||||
@ -196,20 +198,8 @@ const AccountReceive = (props: Props) => {
|
|||||||
>{address}
|
>{address}
|
||||||
</ValueWrapper>
|
</ValueWrapper>
|
||||||
{isAddressVerifying && (
|
{isAddressVerifying && (
|
||||||
<React.Fragment>
|
|
||||||
<ArrowUp />
|
|
||||||
<AddressInfoText>
|
|
||||||
<Icon
|
|
||||||
icon={ICONS.T1}
|
|
||||||
color={colors.WHITE}
|
|
||||||
/>
|
|
||||||
Check address on your Trezor
|
|
||||||
</AddressInfoText>
|
|
||||||
</React.Fragment>
|
|
||||||
)}
|
|
||||||
{/* {isAddressVerifying && (
|
|
||||||
<AddressInfoText>{account.network} account #{account.index + 1}</AddressInfoText>
|
<AddressInfoText>{account.network} account #{account.index + 1}</AddressInfoText>
|
||||||
)} */}
|
)}
|
||||||
{(addressVerified || addressUnverified) && (
|
{(addressVerified || addressUnverified) && (
|
||||||
<QRCode
|
<QRCode
|
||||||
bgColor="#FFFFFF"
|
bgColor="#FFFFFF"
|
||||||
@ -233,7 +223,6 @@ const AccountReceive = (props: Props) => {
|
|||||||
)}
|
)}
|
||||||
</AddressWrapper>
|
</AddressWrapper>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
</SelectedAccount>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ import { FONT_SIZE, FONT_WEIGHT, TRANSITION } from 'config/variables';
|
|||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import P from 'components/Paragraph';
|
import P from 'components/Paragraph';
|
||||||
import { H2 } from 'components/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import SelectedAccount from 'views/Wallet/components/SelectedAccount';
|
|
||||||
import type { Token } from 'flowtype';
|
import type { Token } from 'flowtype';
|
||||||
import AdvancedForm from './components/AdvancedForm';
|
import AdvancedForm from './components/AdvancedForm';
|
||||||
import PendingTransactions from './components/PendingTransactions';
|
import PendingTransactions from './components/PendingTransactions';
|
||||||
@ -252,7 +251,6 @@ const AccountSend = (props: Props) => {
|
|||||||
const isAdvancedSettingsHidden = !advanced;
|
const isAdvancedSettingsHidden = !advanced;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SelectedAccount {...props}>
|
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<StyledH2>Send Ethereum or tokens</StyledH2>
|
<StyledH2>Send Ethereum or tokens</StyledH2>
|
||||||
<InputRow>
|
<InputRow>
|
||||||
@ -402,7 +400,6 @@ const AccountSend = (props: Props) => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
</SelectedAccount>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ import Tooltip from 'components/Tooltip';
|
|||||||
|
|
||||||
import CoinLogo from 'components/images/CoinLogo';
|
import CoinLogo from 'components/images/CoinLogo';
|
||||||
import * as stateUtils from 'reducers/utils';
|
import * as stateUtils from 'reducers/utils';
|
||||||
import SelectedAccount from 'views/Wallet/components/SelectedAccount';
|
|
||||||
import Link from 'components/Link';
|
import Link from 'components/Link';
|
||||||
import AccountBalance from './components/AccountBalance';
|
import AccountBalance from './components/AccountBalance';
|
||||||
import AddedToken from './components/AddedToken';
|
import AddedToken from './components/AddedToken';
|
||||||
@ -65,17 +64,18 @@ const AccountSummary = (props: Props) => {
|
|||||||
network,
|
network,
|
||||||
tokens,
|
tokens,
|
||||||
pending,
|
pending,
|
||||||
|
visible,
|
||||||
} = props.selectedAccount;
|
} = props.selectedAccount;
|
||||||
|
|
||||||
// flow
|
// flow
|
||||||
if (!device || !account || !network) return <SelectedAccount {...props} />;
|
if (!device || !account || !network || !visible) return null;
|
||||||
|
|
||||||
const explorerLink: string = `${network.explorer.address}${account.address}`;
|
const explorerLink: string = `${network.explorer.address}${account.address}`;
|
||||||
const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, network.symbol);
|
const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, network.symbol);
|
||||||
const balance: string = new BigNumber(account.balance).minus(pendingAmount).toString(10);
|
const balance: string = new BigNumber(account.balance).minus(pendingAmount).toString(10);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SelectedAccount {...props}>
|
<section>
|
||||||
<AccountHeading>
|
<AccountHeading>
|
||||||
<AccountName>
|
<AccountName>
|
||||||
<StyledCoinLogo coinNetwork={account.network} />
|
<StyledCoinLogo coinNetwork={account.network} />
|
||||||
@ -155,7 +155,7 @@ const AccountSummary = (props: Props) => {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</AddedTokensWrapper>
|
</AddedTokensWrapper>
|
||||||
</SelectedAccount>
|
</section>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user