mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-23 06:21:06 +00:00
pass network.shortcut to Content component
This commit is contained in:
parent
512574ece2
commit
800a5be990
@ -97,9 +97,10 @@ const AccountReceive = (props: Props) => {
|
|||||||
discovery,
|
discovery,
|
||||||
shouldRender,
|
shouldRender,
|
||||||
loader,
|
loader,
|
||||||
|
network,
|
||||||
} = props.selectedAccount;
|
} = props.selectedAccount;
|
||||||
const { type, title, message } = loader;
|
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 {
|
const {
|
||||||
addressVerified,
|
addressVerified,
|
||||||
|
@ -97,9 +97,10 @@ const AccountReceive = (props: Props) => {
|
|||||||
discovery,
|
discovery,
|
||||||
shouldRender,
|
shouldRender,
|
||||||
loader,
|
loader,
|
||||||
|
network,
|
||||||
} = props.selectedAccount;
|
} = props.selectedAccount;
|
||||||
const { type, title, message } = loader;
|
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 {
|
const {
|
||||||
addressVerified,
|
addressVerified,
|
||||||
|
@ -214,7 +214,7 @@ const AccountSend = (props: Props) => {
|
|||||||
onSend,
|
onSend,
|
||||||
} = props.sendFormActions;
|
} = props.sendFormActions;
|
||||||
const { type, title, message } = loader;
|
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;
|
const isCurrentCurrencyToken = networkSymbol !== currency;
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ const AccountSend = (props: Props) => {
|
|||||||
onSend,
|
onSend,
|
||||||
} = props.sendFormActions;
|
} = props.sendFormActions;
|
||||||
const { type, title, message } = loader;
|
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 isSendButtonDisabled: boolean = Object.keys(errors).length > 0 || total === '0' || amount.length === 0 || address.length === 0 || sending;
|
||||||
let sendButtonText: string = ` ${total} ${network.symbol}`;
|
let sendButtonText: string = ` ${total} ${network.symbol}`;
|
||||||
|
@ -57,10 +57,10 @@ class SignVerify extends Component <Props> {
|
|||||||
render() {
|
render() {
|
||||||
const device = this.props.wallet.selectedDevice;
|
const device = this.props.wallet.selectedDevice;
|
||||||
const {
|
const {
|
||||||
account, discovery, shouldRender, notification,
|
account, discovery, shouldRender, notification, network,
|
||||||
} = this.props.selectedAccount;
|
} = this.props.selectedAccount;
|
||||||
const { type, title, message } = notification;
|
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 {
|
const {
|
||||||
signVerifyActions,
|
signVerifyActions,
|
||||||
signVerify: {
|
signVerify: {
|
||||||
|
@ -82,7 +82,7 @@ const AccountSummary = (props: Props) => {
|
|||||||
|
|
||||||
const { type, title, message } = loader;
|
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 explorerLink: string = `${network.explorer.address}${account.address}`;
|
||||||
const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, network.symbol);
|
const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, network.symbol);
|
||||||
|
@ -72,7 +72,7 @@ const AccountSummary = (props: Props) => {
|
|||||||
|
|
||||||
const { type, title, message } = loader;
|
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 explorerLink: string = `${network.explorer.address}${account.address}`;
|
||||||
const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, network.symbol);
|
const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, network.symbol);
|
||||||
|
Loading…
Reference in New Issue
Block a user