Commit e7bd259b authored by Eriksson Monteiro's avatar Eriksson Monteiro

update millix node

parent d1615617
...@@ -47,20 +47,22 @@ class _PMW9LXqUv7vXLpbA extends Endpoint { ...@@ -47,20 +47,22 @@ class _PMW9LXqUv7vXLpbA extends Endpoint {
eventBus.once('wallet_authentication_error', authenticationErrorHandler); eventBus.once('wallet_authentication_error', authenticationErrorHandler);
authenticationSuccessHandler = () => { authenticationSuccessHandler = () => {
const walletID = wallet.getDefaultActiveWallet(); const walletID = wallet.getDefaultActiveWallet();
const keyIdentifier = wallet.defaultKeyIdentifier; database.getRepository('keychain').getWalletDefaultKeyIdentifier(walletID)
database.getRepository('address').getAddressBaseAttribute(keyIdentifier, 'key_public') .then(keyIdentifier => {
.then(publicKey => { database.getRepository('address').getAddressBaseAttribute(keyIdentifier, 'key_public')
const addressVersion = database.getRepository('address').getDefaultAddressVersion().version; .then(publicKey => {
res.send({ const addressVersion = database.getRepository('address').getDefaultAddressVersion().version;
api_status: 'success', res.send({
wallet : { api_status: 'success',
id : walletID, wallet : {
address : `${keyIdentifier}${addressVersion}${keyIdentifier}`, id : walletID,
address_key_identifier: keyIdentifier, address : `${keyIdentifier}${addressVersion}${keyIdentifier}`,
address_public_key : publicKey address_key_identifier: keyIdentifier,
} address_public_key : publicKey
}); }
});
});
}); });
eventBus.removeListener('wallet_authentication_error', authenticationErrorHandler); eventBus.removeListener('wallet_authentication_error', authenticationErrorHandler);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment