refactor libstatus utils references
This commit is contained in:
parent
6e99b769be
commit
482aac8e98
|
@ -3,7 +3,7 @@ import ../../status/[status, mailservers]
|
|||
import ../../status/libstatus/chat as libstatus_chat
|
||||
import ../../status/libstatus/accounts/constants
|
||||
import ../../status/libstatus/chat as core_chat
|
||||
import ../../status/libstatus/utils as status_utils
|
||||
import ../../status/utils as status_utils
|
||||
import ../../status/chat as status_chat
|
||||
import ../../status/messages as status_messages
|
||||
import ../../status/contacts as status_contacts
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import NimQml, Tables, std/wrapnils
|
||||
import ../../../status/[chat/chat, status, ens, accounts, settings]
|
||||
from ../../../status/types import Setting
|
||||
import ../../../status/libstatus/utils as status_utils
|
||||
import ../../../status/utils as status_utils
|
||||
|
||||
import chat_members
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import NimQml, tables, json, chronicles
|
||||
import ../../../status/[status, chat/message, chat/chat, settings]
|
||||
import message_list, chat_item
|
||||
import ../../../status/libstatus/utils as status_utils
|
||||
import ../../../status/utils as status_utils
|
||||
import ../../../status/types
|
||||
|
||||
logScope:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import NimQml, Tables, sequtils, sugar
|
||||
import ../../../status/chat/stickers, ./sticker_list
|
||||
import ../../../status/types, ../../../status/libstatus/utils
|
||||
import ../../../status/types, ../../../status/utils
|
||||
|
||||
type
|
||||
StickerPackRoles {.pure.} = enum
|
||||
|
|
|
@ -5,7 +5,7 @@ import # vendor libs
|
|||
chronicles, NimQml
|
||||
|
||||
import # status-desktop libs
|
||||
../../../status/[status, stickers, wallet, types], ../../../status/libstatus/utils,
|
||||
../../../status/[status, stickers, wallet, types, utils],
|
||||
../../../status/libstatus/stickers as status_stickers, sticker_pack_list, sticker_list, chat_item, ../../../status/tasks/[qt, task_runner_impl]
|
||||
|
||||
logScope:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import NimQml, chronicles, sequtils, sugar, strutils, json
|
||||
import ../../../status/libstatus/utils as status_utils
|
||||
import ../../../status/utils as status_utils
|
||||
import ../../../status/status
|
||||
import ../../../status/chat/chat
|
||||
import contact_list
|
||||
|
|
|
@ -7,7 +7,7 @@ from ../../../status/types import Setting, PendingTransactionType, RpcException
|
|||
import ../../../status/ens as status_ens
|
||||
import ../../../status/libstatus/wallet as status_wallet
|
||||
import ../../../status/libstatus/settings as status_settings
|
||||
import ../../../status/libstatus/utils as libstatus_utils
|
||||
import ../../../status/utils as status_utils
|
||||
import ../../../status/[status, settings, wallet]
|
||||
import ../../../status/wallet
|
||||
import sets
|
||||
|
@ -204,7 +204,7 @@ QtObject:
|
|||
|
||||
|
||||
proc getPrice(self: EnsManager): string {.slot.} =
|
||||
result = libstatus_utils.wei2Eth(getPrice())
|
||||
result = status_utils.wei2Eth(getPrice())
|
||||
|
||||
proc getUsernameRegistrar(self: EnsManager): string {.slot.} =
|
||||
result = statusRegistrarAddress()
|
||||
|
|
|
@ -6,7 +6,7 @@ import ../../status/libstatus/accounts/constants as accountConstants
|
|||
import ../../status/libstatus/tokens
|
||||
import ../../status/types
|
||||
import ../../status/libstatus/settings
|
||||
import ../../status/libstatus/utils as status_utils
|
||||
import ../../status/utils as status_utils
|
||||
import ../../status/ens as status_ens
|
||||
import ../utils/image_utils
|
||||
import web3/[ethtypes, conversions]
|
||||
|
|
|
@ -11,7 +11,7 @@ import # status-desktop libs
|
|||
../../status/libstatus/accounts/constants,
|
||||
../../status/libstatus/wallet as status_wallet,
|
||||
../../status/libstatus/tokens, ../../status/types,
|
||||
../../status/libstatus/utils as status_utils,
|
||||
../../status/utils as status_utils,
|
||||
../../status/libstatus/eth/contracts, ../../status/ens as status_ens,
|
||||
views/[asset_list, account_list, account_item, token_list, transaction_list, collectibles_list],
|
||||
../../status/tasks/[qt, task_runner_impl], ../../status/signals/types as signal_types
|
||||
|
|
|
@ -5,7 +5,8 @@ import # vendor libs
|
|||
NimQml
|
||||
|
||||
import # status-desktop libs
|
||||
../../../status/libstatus/[tokens, settings, utils, eth/contracts],
|
||||
../../../status/[utils],
|
||||
../../../status/libstatus/[tokens, settings, eth/contracts],
|
||||
../../../status/tasks/[qt, task_runner_impl], ../../../status/status
|
||||
from web3/conversions import `$`
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import libstatus/accounts as status_accounts
|
|||
import libstatus/settings as status_settings
|
||||
import libstatus/accounts/constants
|
||||
import types
|
||||
import libstatus/utils
|
||||
import utils
|
||||
import ../eventemitter
|
||||
|
||||
type
|
||||
|
|
|
@ -4,7 +4,7 @@ import libstatus/mailservers as status_mailservers
|
|||
import libstatus/chatCommands as status_chat_commands
|
||||
import libstatus/accounts/constants as constants
|
||||
import types
|
||||
import libstatus/utils as status_utils
|
||||
import utils as status_utils
|
||||
import libstatus/contacts as status_contacts
|
||||
import stickers
|
||||
import ../eventemitter
|
||||
|
|
|
@ -2,7 +2,7 @@ import json, sequtils, sugar, chronicles
|
|||
import libstatus/contacts as status_contacts
|
||||
import libstatus/accounts as status_accounts
|
||||
import libstatus/chat as status_chat
|
||||
import libstatus/utils as status_utils
|
||||
import utils as status_utils
|
||||
import chat/chat
|
||||
#import chat/utils
|
||||
import profile/profile
|
||||
|
|
|
@ -7,7 +7,7 @@ import tables
|
|||
import strformat
|
||||
import libstatus/core
|
||||
import types
|
||||
import libstatus/utils
|
||||
import utils
|
||||
import libstatus/wallet
|
||||
import stew/byteutils
|
||||
import unicode
|
||||
|
|
|
@ -2,7 +2,7 @@ import json, os, nimcrypto, uuids, json_serialization, chronicles, strutils
|
|||
|
||||
from status_go import multiAccountGenerateAndDeriveAddresses, generateAlias, identicon, saveAccountAndLogin, login, openAccounts
|
||||
import core
|
||||
import utils as utils
|
||||
import ../utils as utils
|
||||
import ../types as types
|
||||
import accounts/constants
|
||||
import ../signals/types as signal_types
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import json, times, strutils, sequtils, chronicles, json_serialization, algorithm, strformat, sugar
|
||||
import core, utils
|
||||
import core, ../utils
|
||||
import ../chat/[chat, message]
|
||||
import ../signals/messages
|
||||
import ../types
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import json, chronicles
|
||||
import core, utils
|
||||
import core, ../utils
|
||||
|
||||
proc acceptRequestAddressForTransaction*(messageId: string, address: string): string =
|
||||
result = callPrivateRPC("acceptRequestAddressForTransaction".prefix, %* [messageId, address])
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import json, strmisc, atomics
|
||||
import core, utils, ../types, settings
|
||||
import core, ../utils, ../types, settings
|
||||
from ../profile/profile import Profile
|
||||
|
||||
var
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import json, nimcrypto, chronicles
|
||||
import status_go, utils
|
||||
import status_go, ../utils
|
||||
|
||||
logScope:
|
||||
topics = "rpc"
|
||||
|
|
|
@ -5,7 +5,7 @@ import
|
|||
web3/ethtypes, stew/byteutils, nimcrypto, json_serialization, chronicles
|
||||
|
||||
import
|
||||
../../types, ../settings, ../coder, transactions, methods, ../utils
|
||||
../../types, ../settings, ../coder, transactions, methods, ../../utils
|
||||
|
||||
export
|
||||
GetPackData, PackData, BuyToken, ApproveAndCall, Transfer, BalanceOf, Register, SetPubkey,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import json, core, utils, system
|
||||
import json, core, ../utils, system
|
||||
|
||||
var installations: JsonNode = %*{}
|
||||
var dirty: bool = true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import json, times
|
||||
import core, utils
|
||||
import core, ../utils
|
||||
|
||||
proc ping*(mailservers: seq[string], timeoutMs: int): string =
|
||||
var addresses: seq[string] = @[]
|
||||
|
|
|
@ -6,7 +6,7 @@ import
|
|||
|
||||
import
|
||||
./core, ../types, ../signals/types as statusgo_types, ./accounts/constants,
|
||||
./utils
|
||||
../utils
|
||||
|
||||
var
|
||||
settings {.threadvar.}: JsonNode
|
||||
|
|
|
@ -7,7 +7,7 @@ import
|
|||
import
|
||||
./settings, ./core, ./wallet, ./eth/contracts
|
||||
from ../types import Setting, Network, RpcResponse, RpcException
|
||||
from utils import parseAddress
|
||||
from ../utils import parseAddress
|
||||
|
||||
logScope:
|
||||
topics = "wallet"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import json, json, options, json_serialization, stint, chronicles
|
||||
import core, ../types, utils, strutils, strformat
|
||||
import utils
|
||||
import core, ../types, ../utils, strutils, strformat
|
||||
from status_go import validateMnemonic#, startWallet
|
||||
import ../wallet/account
|
||||
import web3/ethtypes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import json, random, strutils, sequtils, sugar, chronicles, tables
|
||||
import json_serialization
|
||||
import ../libstatus/utils
|
||||
import ../utils
|
||||
import ../libstatus/accounts as status_accounts
|
||||
import ../libstatus/accounts/constants as constants
|
||||
import ../libstatus/settings as status_settings
|
||||
|
@ -11,7 +11,7 @@ import ../chat/[chat, message]
|
|||
import ../profile/[profile, devices]
|
||||
import types
|
||||
import web3/conversions
|
||||
from ../libstatus/utils import parseAddress, wei2Eth
|
||||
from ../utils import parseAddress, wei2Eth
|
||||
|
||||
proc toMessage*(jsonMsg: JsonNode, pk: string): Message
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import # local deps
|
|||
types, libstatus/eth/contracts as status_contracts,
|
||||
libstatus/stickers as status_stickers, transactions,
|
||||
libstatus/wallet, ../eventemitter
|
||||
from libstatus/utils as libstatus_utils import eth2Wei, gwei2Wei, toUInt64, parseAddress
|
||||
from utils as libstatus_utils import eth2Wei, gwei2Wei, toUInt64, parseAddress
|
||||
|
||||
|
||||
logScope:
|
||||
|
|
|
@ -6,7 +6,7 @@ import
|
|||
|
||||
import
|
||||
types
|
||||
from libstatus/utils as status_utils import toUInt64, gwei2Wei, parseAddress
|
||||
from utils as status_utils import toUInt64, gwei2Wei, parseAddress
|
||||
|
||||
proc buildTransaction*(source: Address, value: Uint256, gas = "", gasPrice = "", data = ""): EthSend =
|
||||
result = EthSend(
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
import # std libs
|
||||
json, random, strutils, strformat, tables, times, unicode
|
||||
from sugar import `=>`, `->`
|
||||
|
||||
import # vendor libs
|
||||
stint, chronicles
|
||||
import json, random, strutils, strformat, tables, chronicles, unicode
|
||||
import stint
|
||||
from times import getTime, toUnix, nanosecond
|
||||
import libstatus/accounts/signing_phrases
|
||||
from web3 import Address, fromHex
|
||||
|
||||
import # status-desktop libs
|
||||
accounts/signing_phrases
|
||||
|
||||
proc getTimelineChatId*(pubKey: string = ""): string =
|
||||
if pubKey == "":
|
||||
return "@timeline70bd746ddcc12beb96b2c9d572d0784ab137ffc774f5383e50585a932080b57cca0484b259e61cecbaa33a4c98a300a"
|
|
@ -11,7 +11,7 @@ import libstatus/accounts/constants as constants
|
|||
import libstatus/eth/[eth, contracts]
|
||||
from libstatus/core import getBlockByNumber
|
||||
from types import PendingTransactionType, GeneratedAccount, DerivedAccount, Transaction, Setting, GasPricePrediction, `%`, StatusGoException, Network, RpcResponse, RpcException
|
||||
from libstatus/utils as libstatus_utils import eth2Wei, gwei2Wei, first, toUInt64, parseAddress
|
||||
from utils as libstatus_utils import eth2Wei, gwei2Wei, first, toUInt64, parseAddress
|
||||
import wallet/[balance_manager, account, collectibles]
|
||||
import transactions
|
||||
import ../eventemitter
|
||||
|
|
|
@ -8,7 +8,7 @@ import # vendor libs
|
|||
import # status-desktop libs
|
||||
../libstatus/core as status, ../libstatus/eth/contracts as contracts,
|
||||
../libstatus/stickers as status_stickers, ../types,
|
||||
web3/[conversions, ethtypes], ../libstatus/utils, account
|
||||
web3/[conversions, ethtypes], ../utils, account
|
||||
|
||||
const CRYPTOKITTY* = "cryptokitty"
|
||||
const KUDO* = "kudo"
|
||||
|
|
Loading…
Reference in New Issue