Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
evavirseda committed Nov 29, 2023
1 parent 885abae commit 10d6735
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { INft } from '../interfaces'
import { allAccountNfts } from '../stores'
import { getIpfsUri } from '../utils'

export function updateNftInAllAccountNfts(accountIndex: number, nftId: string): void {
export function updateNftInAllAccountNfts(accountIndex: number, nftId: string, partialNft: Partial<INft>): void {
allAccountNfts.update((state) => {
if (!state[accountIndex]) {
state[accountIndex] = []
Expand All @@ -15,6 +16,7 @@ export function updateNftInAllAccountNfts(accountIndex: number, nftId: string):
nft.composedUrl = ipfsUri
}
})
Object.assign(nft, { ...nft, ...partialNft })
}
return state
})
Expand Down

0 comments on commit 10d6735

Please sign in to comment.