Fix stateful ledger dialog edge state

This commit is contained in:
fragosti
2018-06-26 12:16:10 -07:00
parent 64ed2464cf
commit 3866154b50
2 changed files with 2 additions and 2 deletions

View File

@@ -191,7 +191,6 @@ export class Blockchain {
// tslint:disable-next-line:no-floating-promises
this._onPageLoadInitFireAndForgetAsync();
}
// TODO: Investigate if we need this.
public async networkIdUpdatedFireAndForgetAsync(newNetworkId: number): Promise<void> {
const isConnected = !_.isUndefined(newNetworkId);
if (!isConnected) {
@@ -246,7 +245,7 @@ export class Blockchain {
this._dispatcher.updateBlockchainIsLoaded(false);
// We don't want to be out of sync with the network metamask declares.
const networkId = await Blockchain._getInjectedWeb3ProviderNetworkIdIfExistsAsync();
await this._resetOrInitializeAsync(this.networkId, shouldPollUserAddress, userLedgerProvider);
await this._resetOrInitializeAsync(networkId, shouldPollUserAddress, userLedgerProvider);
}
public async setProxyAllowanceAsync(token: Token, amountInBaseUnits: BigNumber): Promise<void> {
utils.assert(this.isValidAddress(token.address), BlockchainCallErrs.TokenAddressIsInvalid);

View File

@@ -282,6 +282,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
if (didSucceed) {
this.setState({
stepIndex: LedgerSteps.SELECT_ADDRESS,
connectionErrMsg: '',
});
} else {
this.props.dispatcher.updateBlockchainIsLoaded(true);