mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-23 06:38:35 +02:00
Nano rep fixes (#1145)
* add preference keys for default nano/banano rep * updates to change rep page, add success message * forgot to save this file * nano_client cleanup * first pass * refactor to use sharedprefs in nano_client * review fixes
This commit is contained in:
@@ -166,7 +166,10 @@ class CWNano extends Nano {
|
||||
|
||||
@override
|
||||
Future<void> changeRep(Object wallet, String address) async {
|
||||
return (wallet as NanoWallet).changeRep(address);
|
||||
if ((wallet as NanoWallet).transactionHistory.transactions.isEmpty) {
|
||||
throw Exception("Can't change representative without an existing transaction history");
|
||||
}
|
||||
return wallet.changeRep(address);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user