1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-22 22:10:58 +00:00

pass network.shortcut to Content component

This commit is contained in:
slowbackspace 2018-12-16 23:52:02 +01:00
parent 512574ece2
commit 800a5be990
7 changed files with 10 additions and 8 deletions

View File

@ -97,9 +97,10 @@ const AccountReceive = (props: Props) => {
discovery,
shouldRender,
loader,
network,
} = props.selectedAccount;
const { type, title, message } = loader;
if (!device || !account || !discovery || !shouldRender) return <Content type={type} title={title} message={message} isLoading />;
if (!device || !account || !discovery || !shouldRender) return <Content type={type} title={title} message={message} networkShortcut={(network || {}).shortcut} isLoading />;
const {
addressVerified,

View File

@ -97,9 +97,10 @@ const AccountReceive = (props: Props) => {
discovery,
shouldRender,
loader,
network,
} = props.selectedAccount;
const { type, title, message } = loader;
if (!device || !account || !discovery || !shouldRender) return <Content type={type} title={title} message={message} isLoading />;
if (!device || !account || !discovery || !shouldRender) return <Content type={type} title={title} message={message} networkShortcut={(network || {}).shortcut} isLoading />;
const {
addressVerified,

View File

@ -214,7 +214,7 @@ const AccountSend = (props: Props) => {
onSend,
} = props.sendFormActions;
const { type, title, message } = loader;
if (!device || !account || !discovery || !network || !shouldRender) return <Content type={type} title={title} message={message} isLoading />;
if (!device || !account || !discovery || !network || !shouldRender) return <Content type={type} title={title} message={message} networkShortcut={(network || {}).shortcut} isLoading />;
const isCurrentCurrencyToken = networkSymbol !== currency;

View File

@ -143,7 +143,7 @@ const AccountSend = (props: Props) => {
onSend,
} = props.sendFormActions;
const { type, title, message } = loader;
if (!device || !account || !discovery || !network || !shouldRender) return <Content type={type} title={title} message={message} isLoading />;
if (!device || !account || !discovery || !network || !shouldRender) return <Content type={type} title={title} message={message} networkShortcut={(network || {}).shortcut} isLoading />;
let isSendButtonDisabled: boolean = Object.keys(errors).length > 0 || total === '0' || amount.length === 0 || address.length === 0 || sending;
let sendButtonText: string = ` ${total} ${network.symbol}`;

View File

@ -57,10 +57,10 @@ class SignVerify extends Component <Props> {
render() {
const device = this.props.wallet.selectedDevice;
const {
account, discovery, shouldRender, notification,
account, discovery, shouldRender, notification, network,
} = this.props.selectedAccount;
const { type, title, message } = notification;
if (!device || !account || !discovery || !shouldRender) return <Content type={type} title={title} message={message} isLoading />;
if (!device || !account || !discovery || !shouldRender) return <Content type={type} title={title} message={message} networkShortcut={(network || {}).shortcut} isLoading />;
const {
signVerifyActions,
signVerify: {

View File

@ -82,7 +82,7 @@ const AccountSummary = (props: Props) => {
const { type, title, message } = loader;
if (!device || !account || !network || !shouldRender) return <Content type={type} title={title} message={message} isLoading />;
if (!device || !account || !network || !shouldRender) return <Content type={type} title={title} message={message} networkShortcut={(network || {}).shortcut} isLoading />;
const explorerLink: string = `${network.explorer.address}${account.address}`;
const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, network.symbol);

View File

@ -72,7 +72,7 @@ const AccountSummary = (props: Props) => {
const { type, title, message } = loader;
if (!device || !account || !network || !shouldRender) return <Content type={type} title={title} message={message} isLoading />;
if (!device || !account || !network || !shouldRender) return <Content type={type} title={title} message={message} networkShortcut={(network || {}).shortcut} isLoading />;
const explorerLink: string = `${network.explorer.address}${account.address}`;
const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, network.symbol);