Skip to content

Commit

Permalink
Add virtual function to calculate NFT item initial
Browse files Browse the repository at this point in the history
balance.
  • Loading branch information
d0rich committed Nov 12, 2023
1 parent ef0cd44 commit 47cf390
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contracts/contracts/lib/trait_nft_collection.tact
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ trait NftCollection with Deployable, Accounting {
require(false, "Not implemented");
}

virtual fun calculateNftItemInitalBalance(): Int {
return self.calculateFullAmountForSending()
}

// ------------------ Get Function ------------------ //


Expand Down Expand Up @@ -55,7 +59,7 @@ trait NftCollection with Deployable, Accounting {
let nft_init: StateInit = self.getNftItemInit(self.next_item_index);
send(SendParameters{
to: contractAddress(nft_init),
value: self.calculateFullAmountForSending(),
value: self.calculateNftItemInitalBalance(),
bounce: false,
mode: SendIgnoreErrors,
body: Transfer {
Expand Down

0 comments on commit 47cf390

Please sign in to comment.