mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
Remove Next Address button and logic for electrum wallets. Add disclaimer for electrum wallets on address screen. Change way for generation of current receive and change addresses.
This commit is contained in:
@@ -53,18 +53,6 @@ class CWBitcoin extends Bitcoin {
|
||||
final bitcoinWallet = wallet as ElectrumWallet;
|
||||
await bitcoinWallet.walletAddresses.generateNewAddress();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> nextAddress(Object wallet) {
|
||||
final bitcoinWallet = wallet as ElectrumWallet;
|
||||
bitcoinWallet.walletAddresses.nextReceiveAddress();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> randomAddress(Object wallet) {
|
||||
final bitcoinWallet = wallet as ElectrumWallet;
|
||||
bitcoinWallet.walletAddresses.randomizeAddress();
|
||||
}
|
||||
|
||||
@override
|
||||
Object createBitcoinTransactionCredentials(List<Output> outputs, TransactionPriority priority)
|
||||
|
||||
@@ -125,14 +125,15 @@ class AddressPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
)
|
||||
: PrimaryButton(
|
||||
onPressed: () => addressListViewModel.nextAddress(),
|
||||
text: 'Next address',
|
||||
color: Theme.of(context).buttonColor,
|
||||
textColor: Theme.of(context)
|
||||
.accentTextTheme
|
||||
.display3
|
||||
.backgroundColor);
|
||||
: Text(
|
||||
S.of(context).electrum_address_disclaimer,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
color: Theme.of(context)
|
||||
.accentTextTheme
|
||||
.display2
|
||||
.backgroundColor));
|
||||
})
|
||||
],
|
||||
),
|
||||
|
||||
@@ -212,26 +212,4 @@ abstract class WalletAddressListViewModelBase with Store {
|
||||
|
||||
_baseItems.add(WalletAddressListHeader());
|
||||
}
|
||||
|
||||
@action
|
||||
void nextAddress() {
|
||||
final wallet = _wallet;
|
||||
|
||||
if (wallet.type == WalletType.bitcoin
|
||||
|| wallet.type == WalletType.litecoin) {
|
||||
bitcoin.nextAddress(wallet);
|
||||
wallet.save();
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
void generateRandomAddress() {
|
||||
final wallet = _wallet;
|
||||
|
||||
if (wallet.type == WalletType.bitcoin
|
||||
|| wallet.type == WalletType.litecoin) {
|
||||
bitcoin.randomAddress(wallet);
|
||||
wallet.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user