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:
Matthew Fosse
2023-11-17 20:35:46 +02:00
committed by GitHub
parent 8237b89d56
commit f4e71c72ef
37 changed files with 321 additions and 149 deletions
+4 -1
View File
@@ -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