Skip to content

Commit

Permalink
Add wallet abstraction
Browse files Browse the repository at this point in the history
  • Loading branch information
KingGorrin committed Nov 21, 2023
1 parent 267950f commit dc95cfd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/utils/account_block_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class AccountBlockUtils {
(syncInfo.targetHeight - syncInfo.currentHeight) < 20))
: true;
if (nodeIsSynced) {
Address address = (await blockSigningKey?.address ??
await zenon!.defaultKeyPair!.address)!;
Address address = (await blockSigningKey?.getAddress() ??
await zenon!.defaultKeyPair!.getAddress());
try {
// Wait until the lock is unused.
//
Expand Down
6 changes: 3 additions & 3 deletions lib/utils/keystore_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ class KeyStoreUtils {
KeyStoreManager keyStoreManager =
KeyStoreManager(walletPath: znnDefaultWalletDirectory);
KeyStore keyStore = KeyStore.fromMnemonic(mnemonic);
File keyStoreFile = await keyStoreManager.saveKeyStore(
KeyStoreDefinition walletInfo = await keyStoreManager.saveKeyStore(
keyStore,
passphrase,
name: keyStoreName,
);
_initKeyStoreConstants(
keyStore,
keyStoreFile.path,
walletInfo.file.path,
);
await _saveKeyStorePath(keyStoreFile.path);
await _saveKeyStorePath(walletInfo.file.path);
}

static Future<void> _saveKeyStorePath(String? keyStorePath) async {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ dependencies:
number_selector: ^1.0.5
znn_sdk_dart:
git:
url: https://github.com/zenon-network/znn_sdk_dart.git
ref: d960c0bdc6dc553eaa75d5ddddb34cab530578b8
url: https://github.com/hypercore-one/znn_sdk_dart.git
ref: feature/wallet
json_rpc_2: ^3.0.2
path: ^1.8.2
ffi: ^2.0.1
Expand Down

0 comments on commit dc95cfd

Please sign in to comment.