Merge branch 'master' into patch-4
This commit is contained in:
commit
fc305b931e
1 changed files with 14 additions and 3 deletions
|
|
@ -512,8 +512,12 @@ export class WalletService {
|
||||||
for (const accountID in batchResponse.frontiers) {
|
for (const accountID in batchResponse.frontiers) {
|
||||||
if (batchResponse.frontiers.hasOwnProperty(accountID)) {
|
if (batchResponse.frontiers.hasOwnProperty(accountID)) {
|
||||||
const frontier = batchResponse.frontiers[accountID];
|
const frontier = batchResponse.frontiers[accountID];
|
||||||
if (frontier !== batchAccounts[accountID].publicKey) {
|
const frontierIsValidHash = this.util.nano.isValidHash(frontier);
|
||||||
usedIndices.push(batchAccounts[accountID].index);
|
|
||||||
|
if (frontierIsValidHash === true) {
|
||||||
|
if (frontier !== batchAccounts[accountID].publicKey) {
|
||||||
|
usedIndices.push(batchAccounts[accountID].index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -754,7 +758,14 @@ export class WalletService {
|
||||||
|
|
||||||
walletAccount.balanceFiat = this.util.nano.rawToMnano(walletAccount.balance).times(fiatPrice).toNumber();
|
walletAccount.balanceFiat = this.util.nano.rawToMnano(walletAccount.balance).times(fiatPrice).toNumber();
|
||||||
|
|
||||||
walletAccount.frontier = frontiers.frontiers?.[accountID] || null;
|
const walletAccountFrontier = frontiers.frontiers?.[accountID];
|
||||||
|
const walletAccountFrontierIsValidHash = this.util.nano.isValidHash(walletAccountFrontier);
|
||||||
|
|
||||||
|
walletAccount.frontier = (
|
||||||
|
(walletAccountFrontierIsValidHash === true)
|
||||||
|
? walletAccountFrontier
|
||||||
|
: null
|
||||||
|
);
|
||||||
|
|
||||||
walletBalance = walletBalance.plus(walletAccount.balance);
|
walletBalance = walletBalance.plus(walletAccount.balance);
|
||||||
walletPendingInclUnconfirmed = walletPendingInclUnconfirmed.plus(accountBalancePendingInclUnconfirmed);
|
walletPendingInclUnconfirmed = walletPendingInclUnconfirmed.plus(accountBalancePendingInclUnconfirmed);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue