This commit is contained in:
sneurlax 2023-01-16 18:10:21 -06:00
parent e6a19d981d
commit 4543725b1a

View file

@ -332,9 +332,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
} }
Future<void> previewQuote(SimplexQuote quote) async { Future<void> previewQuote(SimplexQuote quote) async {
// if (ref.read(simplexProvider).estimate.isEmpty) {
// if (ref.read(simplexProvider).quote.purchaseId == "someID") { // if (ref.read(simplexProvider).quote.purchaseId == "someID") {
// print('okokok');
// // TODO make a better way of detecting a default SimplexQuote // // TODO make a better way of detecting a default SimplexQuote
bool shouldPop = false; bool shouldPop = false;
unawaited( unawaited(
@ -386,8 +384,6 @@ class _BuyFormState extends ConsumerState<BuyForm> {
final response = await SimplexAPI.instance.getQuote(quote); final response = await SimplexAPI.instance.getQuote(quote);
if (response.value != null) { if (response.value != null) {
print('eeehehehh');
print(response.value);
ref.read(simplexProvider).updateQuote(response.value!); ref.read(simplexProvider).updateQuote(response.value!);
} else { } else {
Logging.instance.log( Logging.instance.log(
@ -1034,7 +1030,6 @@ class _BuyFormState extends ConsumerState<BuyForm> {
onExit: (_) => setState(() => _hovering1 = false), onExit: (_) => setState(() => _hovering1 = false),
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
previewQuote();
previewQuote(quote); previewQuote(quote);
}, },
child: PrimaryButton( child: PrimaryButton(
@ -1042,7 +1037,6 @@ class _BuyFormState extends ConsumerState<BuyForm> {
enabled: _receiveAddressController.text.isNotEmpty && enabled: _receiveAddressController.text.isNotEmpty &&
_buyAmountController.text.isNotEmpty, _buyAmountController.text.isNotEmpty,
onPressed: () { onPressed: () {
previewQuote();
previewQuote(quote); previewQuote(quote);
}, },
label: "Preview quote", label: "Preview quote",