diff --git a/js/src/api/rpc/parity/parity.js b/js/src/api/rpc/parity/parity.js
index 359ab9756..4be09e0b8 100644
--- a/js/src/api/rpc/parity/parity.js
+++ b/js/src/api/rpc/parity/parity.js
@@ -174,7 +174,7 @@ export default class Parity {
importGethAccounts (accounts) {
return this._transport
- .execute('parity_importGethAccounts', inAddresses)
+ .execute('parity_importGethAccounts', inAddresses(accounts))
.then(outAddresses);
}
diff --git a/js/src/modals/CreateAccount/NewGeth/newGeth.js b/js/src/modals/CreateAccount/NewGeth/newGeth.js
index f8cd1fbe6..a51b4f6ef 100644
--- a/js/src/modals/CreateAccount/NewGeth/newGeth.js
+++ b/js/src/modals/CreateAccount/NewGeth/newGeth.js
@@ -106,7 +106,7 @@ export default class NewGeth extends Component {
api.parity
.listGethAccounts()
.then((_addresses) => {
- const addresses = (addresses || []).filter((address) => !accounts[address]);
+ const addresses = (_addresses || []).filter((address) => !accounts[address]);
return Promise
.all(addresses.map((address) => api.eth.getBalance(address)))
diff --git a/js/src/modals/CreateAccount/createAccount.js b/js/src/modals/CreateAccount/createAccount.js
index e1e6abc71..89ac34399 100644
--- a/js/src/modals/CreateAccount/createAccount.js
+++ b/js/src/modals/CreateAccount/createAccount.js
@@ -139,7 +139,7 @@ export default class CreateAccount extends Component {
case 2:
if (createType === 'fromGeth') {
return (
-
+
);
}
@@ -310,10 +310,14 @@ export default class CreateAccount extends Component {
if (createType === 'fromGeth') {
return api.parity
.importGethAccounts(this.state.gethAddresses)
- .then((result) => {
- console.log('result', result);
+ .then((gethImported) => {
+ console.log('importGethAccounts', gethImported);
- return Promise.all(this.state.gethAddresses.map((address) => {
+ this.setState({
+ gethImported
+ });
+
+ return Promise.all(gethImported.map((address) => {
return api.parity.setAccountName(address, 'Geth Import');
}));
})