Link up websocket handler to routes after refactor and various improvements

This commit is contained in:
Adrian Gallagher
2017-09-11 09:07:41 +10:00
parent 0682dcec88
commit 6e9bda83a1
9 changed files with 148 additions and 169 deletions

12
main.go
View File

@@ -299,9 +299,15 @@ func SeedExchangeAccountInfo(data []exchange.AccountInfo) {
currencyName)
port.RemoveExchangeAddress(exchangeName, currencyName)
} else {
log.Printf("Portfolio: Updating %s %s entry with balance %f.\n",
exchangeName, currencyName, total)
port.UpdateExchangeAddressBalance(exchangeName, currencyName, total)
balance, ok := port.GetAddressBalance(exchangeName, currencyName, portfolio.PortfolioAddressExchange)
if !ok {
continue
}
if balance != total {
log.Printf("Portfolio: Updating %s %s entry with balance %f.\n",
exchangeName, currencyName, total)
port.UpdateExchangeAddressBalance(exchangeName, currencyName, total)
}
}
}
}