Add Prettier for linting and fix Solhint config (#2697)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -38,8 +38,7 @@ contract PaymentSplitter is Context {
|
||||
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
|
||||
* duplicates in `payees`.
|
||||
*/
|
||||
constructor (address[] memory payees, uint256[] memory shares_) payable {
|
||||
// solhint-disable-next-line max-line-length
|
||||
constructor(address[] memory payees, uint256[] memory shares_) payable {
|
||||
require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
|
||||
require(payees.length > 0, "PaymentSplitter: no payees");
|
||||
|
||||
@ -57,7 +56,7 @@ contract PaymentSplitter is Context {
|
||||
* https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
|
||||
* functions].
|
||||
*/
|
||||
receive () external payable virtual {
|
||||
receive() external payable virtual {
|
||||
emit PaymentReceived(_msgSender(), msg.value);
|
||||
}
|
||||
|
||||
@ -104,7 +103,7 @@ contract PaymentSplitter is Context {
|
||||
require(_shares[account] > 0, "PaymentSplitter: account has no shares");
|
||||
|
||||
uint256 totalReceived = address(this).balance + _totalReleased;
|
||||
uint256 payment = totalReceived * _shares[account] / _totalShares - _released[account];
|
||||
uint256 payment = (totalReceived * _shares[account]) / _totalShares - _released[account];
|
||||
|
||||
require(payment != 0, "PaymentSplitter: account is not due payment");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user