mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-31 08:44:57 +00:00
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…
x
Reference in New Issue
Block a user