-
Notifications
You must be signed in to change notification settings - Fork 296
feat(sdk-coin-flrp): added keypair and utils #6809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
* @param network required to stringify addresses | ||
* @return mapper function | ||
*/ | ||
deprecatedMapOutputToEntry(network: FlareNetwork): (DeprecatedOutput) => Entry { |
Check warning
Code scanning / CodeQL
Ineffective parameter type Warning
imported type DeprecatedOutput
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 1 day ago
To fix the problem, change the function signature at line 272 to give the parameter of the returned arrow function both a name and a type. In this context, the returned function represents a mapping (output: DeprecatedOutput) => Entry
, so the fix is to change the type from (DeprecatedOutput) => Entry
to (output: DeprecatedOutput) => Entry
. Only the function's type signature on line 272 needs to be changed; the implementation already uses the correct parameter name and type for output
. No new imports or definitions are required.
-
Copy modified line R272
@@ -269,7 +269,7 @@ | ||
* @param network required to stringify addresses | ||
* @return mapper function | ||
*/ | ||
deprecatedMapOutputToEntry(network: FlareNetwork): (DeprecatedOutput) => Entry { | ||
deprecatedMapOutputToEntry(network: FlareNetwork): (output: DeprecatedOutput) => Entry { | ||
return (output: DeprecatedOutput) => { | ||
if (this.deprecatedIsTransferableOutput(output)) { | ||
// Simplified implementation for FlareJS |
* @param network required to stringify addresses | ||
* @return mapper function | ||
*/ | ||
mapOutputToEntry(network: FlareNetwork): (Output) => Entry { |
Check warning
Code scanning / CodeQL
Ineffective parameter type Warning
imported type Output
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 1 day ago
The best way to fix the problem is to give the callback parameter in the returned function type both a name and a type. On line 305, change the function signature
mapOutputToEntry(network: FlareNetwork): (Output) => Entry {
to
mapOutputToEntry(network: FlareNetwork): (output: Output) => Entry {
so that the callback parameter is named output
(which matches the function body) and typed as Output
. No additional methods or imports are required, and this is a local change entirely on the signature line.
-
Copy modified line R305
@@ -302,7 +302,7 @@ | ||
* @param network required to stringify addresses | ||
* @return mapper function | ||
*/ | ||
mapOutputToEntry(network: FlareNetwork): (Output) => Entry { | ||
mapOutputToEntry(network: FlareNetwork): (output: Output) => Entry { | ||
return (output: Output) => { | ||
if (this.isTransferableOutput(output)) { | ||
const transferableOutput = output as TransferableOutput; |
14a4c68
to
e5359b8
Compare
Ticket: WIN-6319