Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Fixes LIVE-2166: nftsFromOperations was mutating account.operations
Browse files Browse the repository at this point in the history
  • Loading branch information
gre authored and lambertkevin committed Apr 29, 2022
1 parent 7b392bb commit 0fa0c6c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/nft/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { API, apiForCurrency } from "../api/Ethereum";

export const nftsFromOperations = (ops: Operation[]): ProtoNFT[] => {
const nftsMap = ops
.slice(0)
// make sure we have the operation in chronological order (older first)
.sort((a, b) => a.date.getTime() - b.date.getTime())
// if ops are Operations get the prop nftOperations, else ops are considered nftOperations already
Expand Down

0 comments on commit 0fa0c6c

Please sign in to comment.