mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-12 07:14:37 +00:00
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 chronicles
|
||||||
import qrcode/qrcode
|
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/statusgo_backend/accounts as status_accounts
|
||||||
import status/profile as status_profile
|
import status/profile as status_profile
|
||||||
import status/contacts as status_contacts
|
import status/contacts as status_contacts
|
||||||
@ -126,7 +128,7 @@ QtObject:
|
|||||||
|
|
||||||
proc changePassword(self: ProfileView, password: string, newPassword: string): bool {.slot.} =
|
proc changePassword(self: ProfileView, password: string, newPassword: string): bool {.slot.} =
|
||||||
let
|
let
|
||||||
defaultAccount = status_accounts.getDefaultAccount()
|
defaultAccount = eth.getDefaultAccount()
|
||||||
isPasswordOk = status_accounts.verifyAccountPassword(defaultAccount, password, KEYSTOREDIR)
|
isPasswordOk = status_accounts.verifyAccountPassword(defaultAccount, password, KEYSTOREDIR)
|
||||||
if not isPasswordOk:
|
if not isPasswordOk:
|
||||||
return false
|
return false
|
||||||
|
@ -4,7 +4,8 @@ import NimQml, json, sequtils, chronicles, strutils, strformat, json, math
|
|||||||
import
|
import
|
||||||
status/[status, wallet, utils],
|
status/[status, wallet, utils],
|
||||||
status/types/[gas_prediction],
|
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/[main]
|
||||||
import ../../../../app_service/tasks/[qt, threadpool]
|
import ../../../../app_service/tasks/[qt, threadpool]
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ type
|
|||||||
const getGasPredictionsTask: Task = proc(argEncoded: string) {.gcsafe, nimcall.} =
|
const getGasPredictionsTask: Task = proc(argEncoded: string) {.gcsafe, nimcall.} =
|
||||||
let
|
let
|
||||||
arg = decode[GasPredictionsTaskArg](argEncoded)
|
arg = decode[GasPredictionsTaskArg](argEncoded)
|
||||||
response = status_wallet.getGasPrice().parseJson
|
response = eth.getGasPrice().parseJson
|
||||||
var output = "0"
|
var output = "0"
|
||||||
if response.hasKey("result"):
|
if response.hasKey("result"):
|
||||||
output = $fromHex(Stuint[256], response["result"].getStr)
|
output = $fromHex(Stuint[256], response["result"].getStr)
|
||||||
|
2
vendor/status-lib
vendored
2
vendor/status-lib
vendored
@ -1 +1 @@
|
|||||||
Subproject commit ef60eb770ce7c9b43504445bd26122e43ce1b7cf
|
Subproject commit 05fa7fd4c5bea47d209aa3489ffae5b781b29887
|
Loading…
x
Reference in New Issue
Block a user