Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove other coins #1

Merged
merged 6 commits into from
Mar 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WIP: Remove all coins except BTC and XMR
  • Loading branch information
Likho committed Mar 17, 2023
commit fe104e5af704a1e5af766081b7b6fe57b6e6301b
53 changes: 0 additions & 53 deletions lib/pages/send_view/send_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -402,14 +402,6 @@ class _SendViewState extends ConsumerState<SendView> {
: null,
},
);
} else if ((coin == Coin.firo || coin == Coin.firoTestNet) &&
ref.read(publicPrivateBalanceStateProvider.state).state !=
"Private") {
txDataFuture = (manager.wallet as FiroWallet).prepareSendPublic(
address: _address!,
satoshiAmount: amount,
args: {"feeRate": ref.read(feeRateTypeStateProvider)},
);
} else {
txDataFuture = manager.prepareSend(
address: _address!,
Expand Down Expand Up @@ -602,37 +594,6 @@ class _SendViewState extends ConsumerState<SendView> {
),
);

if (coin == Coin.firo || coin == Coin.firoTestNet) {
ref.listen(publicPrivateBalanceStateProvider, (previous, next) {
if (_amountToSend == null) {
setState(() {
_calculateFeesFuture = calculateFees(0);
});
} else {
setState(() {
_calculateFeesFuture = calculateFees(
Format.decimalAmountToSatoshis(_amountToSend!, coin));
});
}
});
}

// add listener for epic cash to strip http:// and https:// prefixes if the address also ocntains an @ symbol (indicating an epicbox address)
if (coin == Coin.epicCash) {
sendToController.addListener(() {
_address = sendToController.text;

if (_address != null && _address!.isNotEmpty) {
_address = _address!.trim();
if (_address!.contains("\n")) {
_address = _address!.substring(0, _address!.indexOf("\n"));
}

sendToController.text = formatAddress(_address!);
}
});
}

return Background(
child: Scaffold(
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
Expand Down Expand Up @@ -709,20 +670,6 @@ class _SendViewState extends ConsumerState<SendView> {
// const SizedBox(
// height: 2,
// ),
if (coin == Coin.firo ||
coin == Coin.firoTestNet)
Text(
"${ref.watch(publicPrivateBalanceStateProvider.state).state} balance",
style: STextStyles.label(context)
.copyWith(fontSize: 10),
),
if (coin != Coin.firo &&
coin != Coin.firoTestNet)
Text(
"Available balance",
style: STextStyles.label(context)
.copyWith(fontSize: 10),
),
],
),
const Spacer(),
Expand Down