feat: receive wallet events and bump nim-status
This commit is contained in:
parent
4f409f76c8
commit
374da83cff
|
@ -26,6 +26,7 @@ proc delete*(self: WalletController) =
|
|||
delete self.view
|
||||
|
||||
proc init*(self: WalletController) =
|
||||
status_wallet.startWallet()
|
||||
self.status.wallet.initAccounts()
|
||||
var accounts = self.status.wallet.accounts
|
||||
for account in accounts:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import json, os, nimcrypto, uuids, json_serialization, chronicles, strutils
|
||||
|
||||
import nim_status, core
|
||||
from nim_status import multiAccountGenerateAndDeriveAddresses, generateAlias, identicon, saveAccountAndLogin, login, openAccounts
|
||||
import core
|
||||
import utils as utils
|
||||
import types as types
|
||||
import accounts/constants
|
||||
|
@ -42,10 +43,10 @@ proc generateAddresses*(n = 5): seq[GeneratedAccount] =
|
|||
result = Json.decode(generatedAccounts, seq[GeneratedAccount])
|
||||
|
||||
proc generateAlias*(publicKey: string): string =
|
||||
result = $nim_status.generateAlias(publicKey.cstring)
|
||||
result = $nim_status.generateAlias(publicKey)
|
||||
|
||||
proc generateIdenticon*(publicKey: string): string =
|
||||
result = $nim_status.identicon(publicKey.cstring)
|
||||
result = $nim_status.identicon(publicKey)
|
||||
|
||||
proc ensureDir(dirname: string) =
|
||||
if not existsDir(dirname):
|
||||
|
|
|
@ -19,9 +19,6 @@ proc keys*(obj: JsonNode): seq[string] =
|
|||
for k, _ in obj:
|
||||
result.add k
|
||||
|
||||
proc toGoString*(str: string): GoString =
|
||||
result = GoString(str: str, length: cint(str.len))
|
||||
|
||||
proc generateSigningPhrase*(count: int): string =
|
||||
let now = getTime()
|
||||
var rng = initRand(now.toUnix * 1000000000 + now.nanosecond)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import json, options
|
||||
import stint, chronicles, json_serialization
|
||||
import nim_status, core, types, utils
|
||||
import json, options, httpclient, json, json_serialization, strformat, stint, strutils, sequtils, chronicles, parseutils, tables
|
||||
import core, types, utils
|
||||
from nim_status import validateMnemonic, startWallet
|
||||
import ../wallet/account
|
||||
import ./contracts as contractMethods
|
||||
import eth/common/eth_types
|
||||
|
@ -88,3 +88,8 @@ proc hex2Eth*(input: string): string =
|
|||
|
||||
proc validateMnemonic*(mnemonic: string): string =
|
||||
result = $nim_status.validateMnemonic(mnemonic)
|
||||
|
||||
proc startWallet*() =
|
||||
discard nim_status.startWallet()
|
||||
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit b3e3a8920b79a5a75c6680730c7f75e6201afde7
|
||||
Subproject commit 46c93dd7346c8e6f8778dbc92ab5cee2e4930e60
|
Loading…
Reference in New Issue