forked from zenon-network/syrius
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
267950f
commit 23d9b01
Showing
51 changed files
with
1,083 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:zenon_syrius_wallet_flutter/blocs/blocs.dart'; | ||
import 'package:zenon_syrius_wallet_flutter/utils/wallet_file.dart'; | ||
import 'package:zenon_syrius_wallet_flutter/utils/wallet_utils.dart'; | ||
|
||
class DecryptWalletFileBloc extends BaseBloc<WalletFile?> { | ||
Future<void> decryptWalletFile(String type, String path, String password) async { | ||
try { | ||
addEvent(null); | ||
final walletFile = await WalletUtils.decryptWalletFile(type, path, password); | ||
addEvent(walletFile); | ||
} catch (e, stackTrace) { | ||
addError(e, stackTrace); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import 'dart:async'; | ||
import 'dart:convert'; | ||
|
||
import 'package:zenon_syrius_wallet_flutter/blocs/blocs.dart'; | ||
import 'package:zenon_syrius_wallet_flutter/utils/global.dart'; | ||
import 'package:zenon_syrius_wallet_flutter/utils/wallet_utils.dart'; | ||
import 'package:zenon_syrius_wallet_flutter/utils/init_utils.dart'; | ||
import 'package:zenon_syrius_wallet_flutter/utils/wallet_file.dart'; | ||
import 'package:znn_sdk_dart/znn_sdk_dart.dart'; | ||
|
||
class KeyStoreFileBloc extends BaseBloc<KeyStoreWalletFile?> { | ||
Future<void> getKeyStorePath( | ||
String mnemonic, | ||
String password, | ||
) async { | ||
try { | ||
await WalletUtils.createKeyStoreWalletFile(mnemonic, password); | ||
await InitUtils.initWalletAfterDecryption( | ||
Crypto.digest(utf8.encode(password))); | ||
addEvent(kWalletFile as KeyStoreWalletFile); | ||
} catch (e, stackTrace) { | ||
addError(e, stackTrace); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'dart:async'; | ||
import 'dart:convert'; | ||
|
||
import 'package:zenon_syrius_wallet_flutter/blocs/blocs.dart'; | ||
import 'package:zenon_syrius_wallet_flutter/utils/global.dart'; | ||
import 'package:zenon_syrius_wallet_flutter/utils/wallet_utils.dart'; | ||
import 'package:zenon_syrius_wallet_flutter/utils/init_utils.dart'; | ||
import 'package:zenon_syrius_wallet_flutter/utils/wallet_file.dart'; | ||
import 'package:znn_sdk_dart/znn_sdk_dart.dart'; | ||
|
||
class LedgerWalletFileBloc extends BaseBloc<LedgerWalletFile?> { | ||
Future<void> getLedgerWalletPath( | ||
String walletId, | ||
String password, | ||
) async { | ||
try { | ||
await WalletUtils.createLedgerWalletFile( | ||
walletId, password); | ||
await InitUtils.initWalletAfterDecryption( | ||
Crypto.digest(utf8.encode(password))); | ||
addEvent(kWalletFile as LedgerWalletFile); | ||
} catch (e, stackTrace) { | ||
addError(e, stackTrace); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,4 +49,7 @@ enum NotificationType { | |
|
||
@HiveField(14) | ||
delete, | ||
|
||
@HiveField(15) | ||
confirm, | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.