Skip to content

Commit

Permalink
style: 💄 better name for computeRoyalty args
Browse files Browse the repository at this point in the history
  • Loading branch information
ignazio-bovo committed Aug 10, 2023
1 parent 46486fb commit 0fb6739
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mappings/content/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,8 @@ export async function addRoyaltyPaymentNotification(
}
}

export function computeRoyalty(royalty: number, price: bigint): bigint {
const royaltyDecimal = royalty / 100
export function computeRoyalty(royaltyPct: number, price: bigint): bigint {
const royaltyDecimal = royaltyPct / 100
const royaltyPrice = Math.floor(royaltyDecimal * Number(price))
return BigInt(royaltyPrice)
}

0 comments on commit 0fb6739

Please sign in to comment.