Skip to content

Commit

Permalink
fix: format lsp8votes
Browse files Browse the repository at this point in the history
  • Loading branch information
skimaharvey committed Dec 12, 2024
1 parent 4e39856 commit cd8887b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions packages/lsp8-contracts/contracts/extensions/LSP8Votes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import {
_TYPEID_LSP8_VOTESDELEGATOR,
_TYPEID_LSP8_VOTESDELEGATEE
} from "./LSP8VotesConstants.sol";
import {LSP1Utils} from "@lukso/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Utils.sol";
import {
LSP1Utils
} from "@lukso/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Utils.sol";

/**
* @dev Extension of LSP8 to support voting and delegation as implemented by {Votes}, where each individual NFT counts
Expand Down Expand Up @@ -47,11 +49,14 @@ abstract contract LSP8Votes is LSP8IdentifiableDigitalAsset, Votes {
return balanceOf(account);
}

/**
/**
* @dev Override of the {Votes-_delegate} function to add LSP1 notifications.
* Notifies both the delegator and delegatee through LSP1.
*/
function _delegate(address delegator, address delegatee) internal virtual override {
function _delegate(
address delegator,
address delegatee
) internal virtual override {
address currentDelegate = delegates(delegator);
uint256 delegatorBalance = balanceOf(delegator);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import {
_TYPEID_LSP8_VOTESDELEGATOR,
_TYPEID_LSP8_VOTESDELEGATEE
} from "./LSP8VotesConstants.sol";
import {LSP1Utils} from "@lukso/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Utils.sol";
import {
LSP1Utils
} from "@lukso/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Utils.sol";
/**
* @dev Extension of LSP8 to support voting and delegation as implemented by {Votes}, where each individual NFT counts
* as 1 vote unit.
Expand Down Expand Up @@ -68,11 +70,14 @@ abstract contract LSP8VotesInitAbstract is
return balanceOf(account);
}

/**
/**
* @dev Override of the {Votes-_delegate} function to add LSP1 notifications.
* Notifies both the delegator and delegatee through LSP1.
*/
function _delegate(address delegator, address delegatee) internal virtual override {
function _delegate(
address delegator,
address delegatee
) internal virtual override {
address currentDelegate = delegates(delegator);
uint256 delegatorBalance = balanceOf(delegator);

Expand Down

0 comments on commit cd8887b

Please sign in to comment.