Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Kien Ngo committed Nov 29, 2023
1 parent 53b568d commit 629e292
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/sdk/src/evm/common/override-fee-recipient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@ import { constants } from "ethers";
/**
* In the past we default `platform_fee_recipient` and `primary_sale_recipient` to AddressZero.
* However due to a recent change in our smart contract extensions (PrimarySale & PlatformFee), AddressZero is no longer an accepted value for those fields.
* So now we're set the default value to the signer address.
* @reference https://github.com/thirdweb-dev/contracts/pull/530
* @param signerAddress The address of the contract deployer
* @param fee_recipient The address that will receive the platform fees and/or sale fees
* So now we set the default value to the signer address.
* https://github.com/thirdweb-dev/contracts/pull/530
*
* @param signerAddress - The address of the contract deployer
* @param fee_recipient - The address that will receive the platform fees and/or sale fees
* @returns `signerAddress` if the `fee_recipient` is AddressZero, otherwise returns `fee_recipient`
* @internal
*/
export function overrideFeeRecipient(
signerAddress: string,
fee_recipient: string,
): string {
if (fee_recipient === constants.AddressZero) return signerAddress;
if (fee_recipient === constants.AddressZero) {
return signerAddress;
}
return fee_recipient;
}

0 comments on commit 629e292

Please sign in to comment.