check if asset is configured for account
This commit is contained in:
parent
ca82c9d5b2
commit
b43d6c7b01
|
@ -117,3 +117,6 @@ QtObject:
|
|||
read = defaultCurrency
|
||||
write = setDefaultCurrency
|
||||
notify = defaultCurrencyChanged
|
||||
|
||||
proc hasAsset*(self: WalletView, account: string, symbol: string): bool {.slot.} =
|
||||
self.status.wallet.hasAsset(account, symbol)
|
||||
|
|
|
@ -49,3 +49,6 @@ proc getFiatValue*(self: WalletModel, eth_balance: string, symbol: string, fiat_
|
|||
var fiat_balance = parseFloat(eth_balance) * parseFloat(fiat_eth_price)
|
||||
echo(fmt"balance in usd: {fiat_balance}")
|
||||
fiat_balance
|
||||
|
||||
proc hasAsset*(self: WalletModel, account: string, symbol: string): bool =
|
||||
(symbol == "DAI") or (symbol == "OMG")
|
||||
|
|
Loading…
Reference in New Issue