Skip to content

Commit

Permalink
Fix the types
Browse files Browse the repository at this point in the history
  • Loading branch information
motechFR committed Dec 5, 2024
1 parent 15cf87b commit 688a33d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ export async function registerBuilderStarterPackNFT({
id: builderId
},
select: {
githubUser: true,
githubUsers: true,
avatar: true,
path: true,
displayName: true,
builderStatus: true
}
});

if (!builder.githubUser) {
if (!builder.githubUsers.length) {
throw new InvalidInputError('Scout profile does not have a github user');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function dividePointsBetweenBuilderAndScouts({
select: {
scoutId: true,
tokensPurchased: true,
builderNFT: {
builderNft: {
select: {
nftType: true
}
Expand All @@ -62,7 +62,7 @@ export async function dividePointsBetweenBuilderAndScouts({
const { totalNftsPurchased, nftsByScout } = nftPurchaseEvents.reduce(
(acc, purchaseEvent) => {
// Normal NFTs are 10x more valuable than Starter Pack NFTs
const multiplier = nftTypeMultipliers[purchaseEvent.builderNFT.nftType];
const multiplier = nftTypeMultipliers[purchaseEvent.builderNft.nftType];
const totalPurchased = purchaseEvent.tokensPurchased * multiplier;

acc.totalNftsPurchased += totalPurchased;
Expand Down

0 comments on commit 688a33d

Please sign in to comment.