Skip to content

Commit

Permalink
Merge branch 'main' into follow-up-notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
daiagi committed Apr 12, 2023
2 parents b92bb03 + f359914 commit 662e79b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions composables/collectionActivity/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ export const mintInteraction = () => {
return urlPrefix.value === 'ksm' ? Interaction.MINT : Interaction.MINTNFT
}

const flipperInitialValue = {
const flipperInitialState = () => ({
flips: [],
bestFlip: 0,
latestflipTimestamp: 0,
owned: 0,
totalBought: 0,
totalsold: 0,
}
})

const newOwnerEntry = (lastActivityTimestamp, nft) => ({
nftCount: 1,
Expand Down Expand Up @@ -188,7 +188,7 @@ export const getFlippers = (interactions: InteractionWithNFT[]): Flippers => {

// Check if the previous owner is already a flipper, if not initialize them
if (flippers[PreviousNFTState.owner] === undefined) {
flippers[PreviousNFTState.owner] = flipperInitialValue
flippers[PreviousNFTState.owner] = flipperInitialState()
}

// Add the new FlipEvent to the previous owner's flips array
Expand Down

0 comments on commit 662e79b

Please sign in to comment.