-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5155 from LedgerHQ/support/custom-add-types
refactor: add missing types for the wallet-api CustomLogger
- Loading branch information
Showing
2 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@ledgerhq/live-common": patch | ||
--- | ||
|
||
refactor: add missing types for the wallet-api CustomLogger |
11 changes: 6 additions & 5 deletions
11
libs/ledger-live-common/src/wallet-api/CustomLogger/client.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
import { CustomModule } from "@ledgerhq/wallet-api-client"; | ||
import { LoggerParams, LoggerResponse } from "./types"; | ||
|
||
export class CustomLogger extends CustomModule { | ||
debug(message: string) { | ||
return this.request("custom.logger.debug", { message }); | ||
return this.request<LoggerParams, LoggerResponse>("custom.logger.debug", { message }); | ||
} | ||
|
||
error(message: string) { | ||
return this.request("custom.logger.error", { message }); | ||
return this.request<LoggerParams, LoggerResponse>("custom.logger.error", { message }); | ||
} | ||
|
||
info(message: string) { | ||
return this.request("custom.logger.info", { message }); | ||
return this.request<LoggerParams, LoggerResponse>("custom.logger.info", { message }); | ||
} | ||
|
||
log(message: string) { | ||
return this.request("custom.logger.log", { message }); | ||
return this.request<LoggerParams, LoggerResponse>("custom.logger.log", { message }); | ||
} | ||
|
||
warn(message: string) { | ||
return this.request("custom.logger.warn", { message }); | ||
return this.request<LoggerParams, LoggerResponse>("custom.logger.warn", { message }); | ||
} | ||
} |
954b230
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
web-tools – ./apps/web-tools
ledger-live-tools.vercel.app
ledger-live.vercel.app
live.ledger.tools
web-tools-ledgerhq.vercel.app
web-tools-git-develop-ledgerhq.vercel.app