use let instead of var
This commit is contained in:
parent
19eb7eb520
commit
bd8d743385
|
@ -37,8 +37,8 @@ proc getTokenBalance*(tokenAddress: string, account: string): string =
|
|||
let payload = %* [{
|
||||
"to": tokenAddress, "from": account, "data": fmt"0x70a08231000000000000000000000000{postfixedAccount}"
|
||||
}, "latest"]
|
||||
var response = status.callPrivateRPC("eth_call", payload)
|
||||
var balance = response.parseJson["result"].getStr
|
||||
let response = status.callPrivateRPC("eth_call", payload)
|
||||
let balance = response.parseJson["result"].getStr
|
||||
result = $hex2Eth(balance)
|
||||
|
||||
proc addOrRemoveToken*(enable: bool, address: string, name: string, symbol: string, decimals: int, color: string): JsonNode =
|
||||
|
|
|
@ -19,7 +19,7 @@ proc getPrice(crypto: string, fiat: string): string =
|
|||
try:
|
||||
if balanceManager.pricePairs.hasKey(fiat):
|
||||
return balanceManager.pricePairs[fiat]
|
||||
var url: string = fmt"https://min-api.cryptocompare.com/data/price?fsym={crypto}&tsyms={fiat}"
|
||||
let url: string = fmt"https://min-api.cryptocompare.com/data/price?fsym={crypto}&tsyms={fiat}"
|
||||
let client = newHttpClient()
|
||||
client.headers = newHttpHeaders({ "Content-Type": "application/json" })
|
||||
|
||||
|
|
Loading…
Reference in New Issue