Skip to content

Commit

Permalink
[DDW-534] Removes logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaglumac committed Jan 14, 2021
1 parent 5f97b13 commit b9f828f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 48 deletions.
6 changes: 3 additions & 3 deletions source/common/types/hardware-wallets.types.js
Expand Up @@ -109,9 +109,9 @@ export type StakingBlockchainPointer = {|

export type LedgerSignTransactionInputsType = Array<LedgerSignTransactionInputType>;

export type LedgerSignTransactionOutputsType = [] | Array<
LedgerOutputTypeAddress | LedgerOutputTypeChange
>;
export type LedgerSignTransactionOutputsType =
| []
| Array<LedgerOutputTypeAddress | LedgerOutputTypeChange>;

export type TrezorSignTransactionInputType = {
path: string,
Expand Down
2 changes: 1 addition & 1 deletion source/renderer/app/components/settings/SettingsLayout.js
Expand Up @@ -20,7 +20,7 @@ export default class SettingsLayout extends Component<Props> {
);
}

componentDidUpdate(prevProps) {
componentDidUpdate(prevProps: Props) {
const didActivePageChange = this.props.activePage !== prevProps.activePage;
if (
this.scrollableDomElement instanceof HTMLElement &&
Expand Down
44 changes: 0 additions & 44 deletions source/renderer/app/stores/HardwareWalletsStore.js
Expand Up @@ -1253,13 +1253,6 @@ export default class HardwareWalletsStore extends Store {
walletId,
});

// eslint-disable-next-line
console.debug('coinSelection: ', JSON.stringify({
inputs,
outputs,
flatFee,
}));

const unsignedTxInputs = [];
const inputsData = map(inputs, (input) => {
const shelleyTxInput = ShelleyTxInputFromUtxo(input);
Expand All @@ -1270,30 +1263,17 @@ export default class HardwareWalletsStore extends Store {
const unsignedTxOutputs = [];
const outputsData = [];
for (const output of outputs) {
// eslint-disable-next-line
console.debug('>>> ADDRESS: ', output.address);
const {
address_style: addressStyle,
} = await this.stores.addresses._inspectAddress({
addressId: output.address,
});
// eslint-disable-next-line
console.debug('>>> ADDRESS Details: ', addressStyle);

const shelleyTxOutput = ShelleyTxOutput(output, addressStyle);
unsignedTxOutputs.push(shelleyTxOutput);
// eslint-disable-next-line
console.debug('>>> Store to output: ', {
addressStyle,
address: output.address,
})
const ledgerOutput = prepareLedgerOutput(output, addressStyle);
outputsData.push(ledgerOutput);
}

// eslint-disable-next-line
console.debug('>>> outputsData: ', outputsData);

const unsignedTxCerts = [];
const _certificatesData = map(certificates, async (certificate) => {
const accountAddress = await this._getRewardAccountAddress(
Expand All @@ -1317,24 +1297,6 @@ export default class HardwareWalletsStore extends Store {
const metadataHashHex = null;
const { isMainnet } = this.environment;

// eslint-disable-next-line
console.debug('>>> Data to Sign: ', JSON.stringify({
inputs: inputsData,
outputs: outputsData,
fee: fee.toString(),
ttl: ttl.toString(),
networkId: isMainnet
? HW_SHELLEY_CONFIG.NETWORK.MAINNET.networkId
: HW_SHELLEY_CONFIG.NETWORK.TESTNET.networkId,
protocolMagic: isMainnet
? HW_SHELLEY_CONFIG.NETWORK.MAINNET.protocolMagic
: HW_SHELLEY_CONFIG.NETWORK.TESTNET.protocolMagic,
certificates: certificatesData,
withdrawals,
metadataHashHex,
devicePath,
}))

try {
const signedTransaction = await signTransactionLedgerChannel.request({
inputs: inputsData,
Expand Down Expand Up @@ -1363,9 +1325,6 @@ export default class HardwareWalletsStore extends Store {
withdrawals,
});

// eslint-disable-next-line
console.debug('>> UnsignetTX: ', JSON.stringify(unsignedTx));

const signedWitnesses = await this._signWitnesses(
signedTransaction.witnesses
);
Expand All @@ -1377,9 +1336,6 @@ export default class HardwareWalletsStore extends Store {
// Prepare serialized transaction with unsigned data and signed witnesses
const txBody = await prepareBody(unsignedTx, txWitnesses);

// eslint-disable-next-line
console.debug('>> txBody: ', txBody);

runInAction('HardwareWalletsStore:: set Transaction verified', () => {
this.hwDeviceStatus = HwDeviceStatuses.VERIFYING_TRANSACTION_SUCCEEDED;
this.txBody = txBody;
Expand Down

0 comments on commit b9f828f

Please sign in to comment.