Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
review-fix: Remove unnecessary function
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Schoen committed Apr 8, 2019
1 parent de3396f commit c4cf7d5
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@ class AccountImportOptions extends Component {

if (!address || !chainIdString) {
this.setState({ error: 'Invalid QR code.' });

return;
}

const signerChainIdInt = parseInt(chainIdString);

if (!this.isCurrentChainIdTheImportChainIdOfTheAddress(signerChainIdInt)) {
if (!BigNumber(signerChainIdInt).eq(currentChainIdBN)) {
console.error(
`Parity Signer account chainId ${chainIdString} (${
PARITY_SIGNER_NETWORKS[signerChainIdInt].parityName
Expand All @@ -158,6 +159,7 @@ class AccountImportOptions extends Component {
PARITY_SIGNER_NETWORKS[currentChainIdBN.valueOf()].commonName
} network.`
});

return;
}

Expand All @@ -176,12 +178,6 @@ class AccountImportOptions extends Component {
});
};

isCurrentChainIdTheImportChainIdOfTheAddress = signerChainIdInt => {
const { chainId: currentChainIdBN } = this.props;

return BigNumber(signerChainIdInt).eq(currentChainIdBN);
};

hasExistingAddressForImport = (addressForImport, signerChainIdInt) => {
const { accountsInfo } = this.props;
const isExistingAddress = Object.keys(accountsInfo).some(
Expand Down

0 comments on commit c4cf7d5

Please sign in to comment.