refactor: Add view with new eth backend
This commit is contained in:
parent
f4e3a1effc
commit
8fab06494a
|
@ -3,6 +3,8 @@ import views/[mailservers_list, ens_manager, contacts, devices, mailservers, mne
|
|||
import chronicles
|
||||
import qrcode/qrcode
|
||||
|
||||
# TODO: Remove direct access to statusgo backend!
|
||||
import status/statusgo_backend/eth as eth
|
||||
import status/statusgo_backend/accounts as status_accounts
|
||||
import status/profile as status_profile
|
||||
import status/contacts as status_contacts
|
||||
|
@ -126,7 +128,7 @@ QtObject:
|
|||
|
||||
proc changePassword(self: ProfileView, password: string, newPassword: string): bool {.slot.} =
|
||||
let
|
||||
defaultAccount = status_accounts.getDefaultAccount()
|
||||
defaultAccount = eth.getDefaultAccount()
|
||||
isPasswordOk = status_accounts.verifyAccountPassword(defaultAccount, password, KEYSTOREDIR)
|
||||
if not isPasswordOk:
|
||||
return false
|
||||
|
|
|
@ -4,7 +4,8 @@ import NimQml, json, sequtils, chronicles, strutils, strformat, json, math
|
|||
import
|
||||
status/[status, wallet, utils],
|
||||
status/types/[gas_prediction],
|
||||
status/statusgo_backend/wallet as status_wallet
|
||||
# TODO: Remove direct access to backend
|
||||
status/statusgo_backend/eth as eth
|
||||
import ../../../../app_service/[main]
|
||||
import ../../../../app_service/tasks/[qt, threadpool]
|
||||
|
||||
|
@ -18,7 +19,7 @@ type
|
|||
const getGasPredictionsTask: Task = proc(argEncoded: string) {.gcsafe, nimcall.} =
|
||||
let
|
||||
arg = decode[GasPredictionsTaskArg](argEncoded)
|
||||
response = status_wallet.getGasPrice().parseJson
|
||||
response = eth.getGasPrice().parseJson
|
||||
var output = "0"
|
||||
if response.hasKey("result"):
|
||||
output = $fromHex(Stuint[256], response["result"].getStr)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ef60eb770ce7c9b43504445bd26122e43ce1b7cf
|
||||
Subproject commit 05fa7fd4c5bea47d209aa3489ffae5b781b29887
|
Loading…
Reference in New Issue