fix asset initilization

This commit is contained in:
Iuri Matias 2020-06-04 19:39:34 -04:00
parent 0dcf257f0c
commit f8271c0c38
1 changed files with 3 additions and 2 deletions

View File

@ -91,10 +91,11 @@ QtObject:
proc generateNewAccount*(self: WalletView, password: string, accountName: string, color: string) {.slot.} =
# TODO move all this to the model to add a real account
let assetList = newAssetList()
# let assetList = newAssetList()
var assetList: seq[Asset] = @[]
let symbol = "ETH"
let asset = Asset(name:"Ethereum", symbol: symbol, value: fmt"0", fiatValue: "$0.00", image: fmt"../../img/token-icons/{toLowerAscii(symbol)}.svg")
assetList.addAssetToList(asset)
# assetList.addAssetToList(asset)
let defaultCurrency = "USD" # TODO get real default
# TODO get a real address that we unlock with the password
let account = Account(name: accountName, address: "0x0r329ru298u392r", iconColor: color, balance: fmt"0.00 {defaultCurrency}", assetList: assetList, realFiatBalance: 0.0)