The way balance is updated on uncover is it checks the block that is being processed for all the accounts in it and gets balance for these accounts...
private extractAccounts(block: IChainBlock): string[] {
const accounts: string[] = [];
accounts.push(block.validator);
for (const extrinsic of block.extrinsics) {
if (extrinsic.isSigned && extrinsic.accountId) {
accounts.push(extrinsic.accountId);
}
for (const param of extrinsic.params) {
if (param.type === 'AccountId') {
accounts.push(param.value as string);
}
if (param.type === 'Erc20DepositEvent') {
const claim = param.value as unknown as Erc20DepositEvent;
accounts.push(claim.beneficiary.toString());
}
}
}
for (const event of block.events) {
for (const param of event.params) {
if (param.type === 'AccountId') {
accounts.push(param.value as string);
}
}
}
return uniq(accounts);
}
One of the reason for incorrect balance or balance not being updated could be when nft is sold to an account when time expires, it updates the balance of nft holder if reserve is met.. but the system doesn't know about it or if there is Royalty that receiver receives should also be considered
The way balance is updated on uncover is it checks the block that is being processed for all the accounts in it and gets balance for these accounts...
One of the reason for incorrect balance or balance not being updated could be when nft is sold to an account when time expires, it updates the balance of nft holder if reserve is met.. but the system doesn't know about it or if there is Royalty that receiver receives should also be considered
[{"name":"collection_id","type":"CollectionId","value":55},{"name":"quantity","type":"TokenCount","value":1000},{"name":"owner","type":"Option<AccountId>","value":"5F4bqAuskqbRULcnD72songmAj9Rk2iWuE6QDeWTfiU3caR9"},{"name":"attributes","type":"Vec<NFTAttributeValue>","value":[]},{"name":"metadata_path","type":"Option<Bytes>","value":"0x697066733a2f2f516d5038795970444666346738694b5366414e4e5577536e396f6662716859563448314e5a54635657334365516a"},{"name":"royalties_schedule","type":"Option<RoyaltiesSchedule>","value":{"entitlements":[["5F4bqAuskqbRULcnD72songmAj9Rk2iWuE6QDeWTfiU3caR9",100000]]}}]
Also we need to check for Option type at if (param.type === 'AccountId') {
Need to check of these relevant areas and update the code to show user the right balance for their assets.