Skip to content

Commit 2a0ab53

Browse files
committed
[DDW-1076] add more logs
1 parent 39e6e41 commit 2a0ab53

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

source/renderer/app/stores/HardwareWalletsStore.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,18 @@ export default class HardwareWalletsStore extends Store {
632632
const { amount: totalAmount, availableAmount, reward } = wallet;
633633

634634
try {
635+
logger.debug('AdaApi::selectCoins::HW Store', {
636+
walletId,
637+
walletBalance: totalAmount,
638+
availableBalance: availableAmount.plus(reward),
639+
rewardsBalance: reward,
640+
payments: {
641+
address,
642+
amount,
643+
assets,
644+
},
645+
metadata,
646+
});
635647
// @ts-ignore ts-migrate(1320) FIXME: Type of 'await' operand must either be a valid pro... Remove this comment to see the full error message
636648
const coinSelection: CoinSelectionsResponse = await this.selectCoinsRequest.execute(
637649
{

source/renderer/app/utils/logging.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ const logToLevel = (level: LoggingLevel) => (
2727
message: string,
2828
data: Record<string, any> | null | undefined
2929
) => {
30+
if (!message.includes('selectCoins')) {
31+
return;
32+
}
33+
3034
const args = [
3135
formatContext({ ...messageContext, level }),
3236
{
@@ -39,7 +43,7 @@ const logToLevel = (level: LoggingLevel) => (
3943
};
4044

4145
export const logger: Logger = {
42-
debug: logToLevel('debug'),
46+
debug: logToLevel('info'),
4347
info: logToLevel('info'),
4448
error: logToLevel('error'),
4549
warn: logToLevel('warn'),

0 commit comments

Comments
 (0)