Skip to content

Commit

Permalink
Refactor use lodash clone deep in GetAddressCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
andreafspeziale authored and ceres3idoo committed Feb 25, 2019
1 parent 9d95d08 commit 20a8bee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/GetAddressCommand.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const _ = require('lodash')

const ABaseCommand = require('./ABaseCommand')
const CommandArg = require('../models/CommandArg')

Expand Down Expand Up @@ -93,7 +95,7 @@ class GetAddressCommand extends ABaseCommand {
* @param {String} params.draft The draft. If set to true it shows the TransactionObjectDraft.
*/
async doExecuteAsync({ personalWalletAddress, privateKeyPath, draft }) {
let personalWalletAddressRetrived = personalWalletAddress
let personalWalletAddressRetrived = _.cloneDeep(personalWalletAddress)

if (privateKeyPath) {
const privateKey = await this.extractPrivateKey(privateKeyPath)
Expand Down

0 comments on commit 20a8bee

Please sign in to comment.