Commit e7bd259b authored by Eriksson Monteiro's avatar Eriksson Monteiro

update millix node

parent d1615617
......@@ -47,20 +47,22 @@ class _PMW9LXqUv7vXLpbA extends Endpoint {
eventBus.once('wallet_authentication_error', authenticationErrorHandler);
authenticationSuccessHandler = () => {
const walletID = wallet.getDefaultActiveWallet();
const keyIdentifier = wallet.defaultKeyIdentifier;
database.getRepository('address').getAddressBaseAttribute(keyIdentifier, 'key_public')
.then(publicKey => {
const addressVersion = database.getRepository('address').getDefaultAddressVersion().version;
res.send({
api_status: 'success',
wallet : {
id : walletID,
address : `${keyIdentifier}${addressVersion}${keyIdentifier}`,
address_key_identifier: keyIdentifier,
address_public_key : publicKey
}
});
const walletID = wallet.getDefaultActiveWallet();
database.getRepository('keychain').getWalletDefaultKeyIdentifier(walletID)
.then(keyIdentifier => {
database.getRepository('address').getAddressBaseAttribute(keyIdentifier, 'key_public')
.then(publicKey => {
const addressVersion = database.getRepository('address').getDefaultAddressVersion().version;
res.send({
api_status: 'success',
wallet : {
id : walletID,
address : `${keyIdentifier}${addressVersion}${keyIdentifier}`,
address_key_identifier: keyIdentifier,
address_public_key : publicKey
}
});
});
});
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