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