Include cDAI balance in balanceDiff (#613)
This commit is contained in:
parent
d36dcadd34
commit
52e1c88b58
@ -66,7 +66,13 @@ async function main(bridgeMode, eventsInfo) {
|
||||
const mintedCoinsBN = new BN(mintedCoins)
|
||||
const burntCoinsBN = new BN(burntCoins)
|
||||
const totalSupplyBN = mintedCoinsBN.minus(burntCoinsBN)
|
||||
const foreignErc20BalanceBN = new BN(foreignErc20Balance).plus(lateForeignConfirmationsTotalValue)
|
||||
let foreignErc20BalanceBN = new BN(foreignErc20Balance).plus(lateForeignConfirmationsTotalValue)
|
||||
try {
|
||||
const invested = await foreignBridge.methods.investedAmount(erc20Address).call({}, foreignDelayedBlockNumber)
|
||||
foreignErc20BalanceBN = foreignErc20BalanceBN.plus(invested)
|
||||
} catch (_) {
|
||||
logger.debug('compounding related methods are not present in the foreign bridge')
|
||||
}
|
||||
|
||||
const diff = foreignErc20BalanceBN.minus(totalSupplyBN).toFixed()
|
||||
logger.debug('Done')
|
||||
|
Loading…
Reference in New Issue
Block a user