mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-28 08:51:04 +00:00
Added loader to sign and verify
This commit is contained in:
parent
d8762ec76f
commit
f738d0be9c
@ -11,6 +11,7 @@ import Component from './index';
|
|||||||
type OwnProps = {}
|
type OwnProps = {}
|
||||||
|
|
||||||
export type StateProps = {
|
export type StateProps = {
|
||||||
|
wallet: $ElementType<State, 'wallet'>,
|
||||||
selectedAccount: $ElementType<State, 'selectedAccount'>,
|
selectedAccount: $ElementType<State, 'selectedAccount'>,
|
||||||
signature: string,
|
signature: string,
|
||||||
isSignProgress: boolean,
|
isSignProgress: boolean,
|
||||||
@ -24,6 +25,7 @@ export type DispatchProps = {
|
|||||||
export type Props = StateProps & DispatchProps;
|
export type Props = StateProps & DispatchProps;
|
||||||
|
|
||||||
const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: State): StateProps => ({
|
const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: State): StateProps => ({
|
||||||
|
wallet: state.wallet,
|
||||||
selectedAccount: state.selectedAccount,
|
selectedAccount: state.selectedAccount,
|
||||||
signature: state.signVerifyReducer.signature,
|
signature: state.signVerifyReducer.signature,
|
||||||
isSignProgress: state.signVerifyReducer.isSignProgress,
|
isSignProgress: state.signVerifyReducer.isSignProgress,
|
||||||
|
@ -98,8 +98,15 @@ class SignVerify extends Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (!this.props.selectedAccount.account) return null;
|
const device = this.props.wallet.selectedDevice;
|
||||||
|
const {
|
||||||
|
account,
|
||||||
|
discovery,
|
||||||
|
shouldRender,
|
||||||
|
notification,
|
||||||
|
} = this.props.selectedAccount;
|
||||||
|
const { type, title, message } = notification;
|
||||||
|
if (!device || !account || !discovery || !shouldRender) return <Content type={type} title={title} message={message} isLoading />;
|
||||||
const {
|
const {
|
||||||
signVerifyActions,
|
signVerifyActions,
|
||||||
signature,
|
signature,
|
||||||
|
Loading…
Reference in New Issue
Block a user