Skip to content

Commit

Permalink
chore: solve lint warnings (#1619)
Browse files Browse the repository at this point in the history
# Motivation

There was few lint warning that could be solved.
  • Loading branch information
peterpeterparker authored Dec 6, 2022
1 parent 3b1ebca commit 8ad1047
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { disburse } from "$lib/services/sns-neurons.services";
import { snsOnlyProjectStore } from "$lib/derived/selected-project.derived";
import type { SnsNeuron } from "@dfinity/sns";
import { assertNonNullish, fromDefinedNullable } from "@dfinity/utils";
import { fromDefinedNullable } from "@dfinity/utils";
import {
getSnsNeuronIdAsHexString,
getSnsNeuronStake,
Expand Down
20 changes: 10 additions & 10 deletions frontend/src/lib/services/sns-neurons.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,11 @@ export const loadSnsNervousSystemFunctions = async (
* - The new followee is the same neuron.
* - The call throws an error.
*
* @param {Object}
* @param {Principal} rootCanisterId
* @param {SnsNeuron} neuron
* @param {SnsNeuronId} followee
* @param {bigint} functionId
* @param {Object} params
* @param {Principal} params.rootCanisterId
* @param {SnsNeuron} params.neuron
* @param {SnsNeuronId} params.followee
* @param {bigint} params.functionId
* @returns
*/
export const addFollowee = async ({
Expand Down Expand Up @@ -575,11 +575,11 @@ export const addFollowee = async ({
* - The followee is not in the list of followees.
* - The call throws an error.
*
* @param {Object}
* @param {Principal} rootCanisterId
* @param {SnsNeuron} neuron
* @param {SnsNeuronId} followee
* @param {bigint} functionId
* @param {Object} params
* @param {Principal} params.rootCanisterId
* @param {SnsNeuron} params.neuron
* @param {SnsNeuronId} params.followee
* @param {bigint} params.functionId
* @returns
*/
export const removeFollowee = async ({
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/utils/anonymize.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ const anonymizeSnsAccount = async (
}
const { owner, subaccount } = account;
return {
owner: await anonymiseAvailability(owner),
owner: anonymiseAvailability(owner),
subaccount: subaccount.map(subaccountToHexString),
};
};
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/lib/utils/neuron.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export const getStateInfo = (neuronState: NeuronState): StateInfo | undefined =>
*
* Reference: https://internetcomputer.org/docs/current/tokenomics/sns/rewards#recap-on-nns-voting-rewards
*
* @param {Object}
* @param {NeuronInfo} neuron
* @param {number} newDissolveDelayInSeconds It will calculate the voting power with the new dissolve delay if provided
* @param {Object} params
* @param {NeuronInfo} params.neuron
* @param {number} params.newDissolveDelayInSeconds It will calculate the voting power with the new dissolve delay if provided
* @returns {bigint}
*/
export const neuronVotingPower = ({
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/lib/utils/sns-neuron.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ export const followeesByNeuronId = ({
* The backend logic: https://gitlab.com/dfinity-lab/public/ic/-/blob/07ce9cef07535bab14d88f3f4602e1717be6387a/rs/sns/governance/src/neuron.rs#L158
*
* @param {SnsNeuron} neuron
* @param {NervousSystemParameters} snsParameters
* @param {number} newDissolveDelayInSeconds
* @param {NervousSystemParameters} neuron.snsParameters
* @param {number} neuron.newDissolveDelayInSeconds
*/
export const snsNeuronVotingPower = ({
neuron,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export const keyOfOptional = <T>({
/**
* Returns whether an asset is PNG or not.
*
* @param {string} src
* @param {string} asset
* @returns boolean
*/
export const isPngAsset = (
Expand Down

0 comments on commit 8ad1047

Please sign in to comment.