Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline Polling on WalletDecrypt Mount #684

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions common/components/WalletDecrypt/WalletDecrypt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
resetWallet,
TResetWallet
} from 'actions/wallet';
import { pollOfflineStatus, TPollOfflineStatus } from 'actions/config';
import { reset, TReset } from 'actions/transaction';
import translate from 'translations';
import {
Expand Down Expand Up @@ -44,6 +45,7 @@ import './WalletDecrypt.scss';
type UnlockParams = {} | PrivateKeyValue;

interface Props {
pollOfflineStatus: TPollOfflineStatus;
resetTransactionState: TReset;
unlockKeystore: TUnlockKeystore;
unlockMnemonic: TUnlockMnemonic;
Expand Down Expand Up @@ -177,11 +179,16 @@ export class WalletDecrypt extends Component<Props, State> {
isReadOnly: true
}
};

public state: State = {
selectedWalletKey: null,
value: null
};

public componentDidMount() {
this.props.pollOfflineStatus();
}

public componentWillReceiveProps(nextProps) {
// Reset state when unlock is hidden / revealed
if (nextProps.hidden !== this.props.hidden) {
Expand Down Expand Up @@ -389,5 +396,6 @@ export default connect(mapStateToProps, {
unlockWeb3,
setWallet,
resetWallet,
pollOfflineStatus,
resetTransactionState: reset
})(WalletDecrypt);