Skip to content

Commit 10d6735

Browse files
committed
fix types
1 parent 885abae commit 10d6735

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/shared/lib/core/nfts/actions/updateNftInAllAccountNfts.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import { INft } from '../interfaces'
12
import { allAccountNfts } from '../stores'
23
import { getIpfsUri } from '../utils'
34

4-
export function updateNftInAllAccountNfts(accountIndex: number, nftId: string): void {
5+
export function updateNftInAllAccountNfts(accountIndex: number, nftId: string, partialNft: Partial<INft>): void {
56
allAccountNfts.update((state) => {
67
if (!state[accountIndex]) {
78
state[accountIndex] = []
@@ -15,6 +16,7 @@ export function updateNftInAllAccountNfts(accountIndex: number, nftId: string):
1516
nft.composedUrl = ipfsUri
1617
}
1718
})
19+
Object.assign(nft, { ...nft, ...partialNft })
1820
}
1921
return state
2022
})

0 commit comments

Comments
 (0)