Skip to content
Permalink
Browse files

[DDW-893] Dialogs - init

  • Loading branch information...
daniloprates committed Sep 11, 2019
1 parent 1e81111 commit fd8b7fa62b7fae85d71003a207c042d1f73f1a0b
@@ -25,7 +25,8 @@ import styles from './WalletRecoveryPhraseStep1Dialog.scss';
// });

type Props = {
onContinue: Date,
onContinue: Function,
onClose: Function,
};

@observer
@@ -35,15 +36,15 @@ export default class WalletRecoveryPhraseStep1 extends Component<Props> {
// };
render() {
// const { intl } = this.context;
const { onContinue } = this.props;
const { onContinue, onClose } = this.props;
const isSubmitting = false;

const actions = [
{
className: isSubmitting ? styles.isSubmitting : null,
label: 'Continue',
primary: true,
onClick: this.submit,
onClick: onContinue,
},
];

@@ -53,7 +54,7 @@ export default class WalletRecoveryPhraseStep1 extends Component<Props> {
title="Wallet recovery phrase verification"
actions={actions}
closeOnOverlayClick
onClose={onContinue}
onClose={onClose}
closeButton={<DialogCloseButton />}
>
<p>
@@ -25,25 +25,43 @@ import styles from './WalletRecoveryPhraseStep1Dialog.scss';
// });

type Props = {
onContinue: Date,
onVerify: Function,
onClose: Function,
};

type State = {
isVeryfying: boolean,
};

@observer
export default class WalletRecoveryPhraseStep1 extends Component<Props> {
export default class WalletRecoveryPhraseStep1 extends Component<Props, State> {
// static contextTypes = {
// intl: intlShape.isRequired,
// };

state = {
isVeryfying: false,
};

handleVerify = () => {
this.setState({
isVeryfying: true,
});
this.props.onVerify();
};

render() {
// const { intl } = this.context;
const { onContinue } = this.props;
const isSubmitting = false;
const { onClose } = this.props;
const { isVeryfying } = this.state;

const actions = [
{
className: isSubmitting ? styles.isSubmitting : null,
label: 'Continue',
className: isVeryfying ? styles.isVeryfying : null,
label: 'Verify',
primary: true,
onClick: this.submit,
disabled: isVeryfying,
},
];

@@ -53,7 +71,7 @@ export default class WalletRecoveryPhraseStep1 extends Component<Props> {
title="Wallet recovery phrase verification"
actions={actions}
closeOnOverlayClick
onClose={onContinue}
onClose={onClose}
closeButton={<DialogCloseButton />}
>
<p>
@@ -8,6 +8,12 @@ export default class WalletRecoveryPhraseStep1Container extends Component {
handleContinue = () => {};

render() {
return <WalletRecoveryPhraseStep1Dialog onContinue={this.handleContinue} />;
// daedalus.actions.dialogs.closeActiveDialog
return (
<WalletRecoveryPhraseStep1Dialog
onContinue={this.handleContinue}
onClose={() => {}}
/>
);
}
}
@@ -29,6 +29,7 @@ export const generateWallet = (name: string, amount: string) =>
new Wallet({
id: generateHash(),
amount: new BigNumber(amount).dividedBy(LOVELACES_PER_ADA),
createdAt: new Date(),
name,
assurance: 'normal',
hasPassword: false,

0 comments on commit fd8b7fa

Please sign in to comment.
You can’t perform that action at this time.