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

Select network fee error #53

Closed
ag-0214 opened this issue Jun 14, 2022 · 5 comments
Closed

Select network fee error #53

ag-0214 opened this issue Jun 14, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@ag-0214
Copy link

ag-0214 commented Jun 14, 2022

I am trying to use your wallet, I have 100000 Sats in my wallet now when I try to send 50000 sats to another wallet, when it gets to the stage of selecting network fee it gives the following error. If I click back the where I to the screen I entered amount it will display message instance of SMError . For smaller amounts like 50 sats it doesnt give an error but there ont be any fee to select so cant proceed

[log] 'package:flutter/src/material/slider.dart': Failed assertion: line 147 pos 15: 'value >= min && value <= max': is not true.
#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2 new Slider (package:flutter/src/material/slider.dart:147:15)
#3 _SelectFeeState.build (package:sats/ui/component/Send/SelectFee.dart:118:13)
#4 StatefulElement.build (package:flutter/src/widgets/framework.dart:4919:27)
#5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4806:15)
#6 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4977:11)
#7 Element.rebuild (package:flutter/src/widgets/framework.dart:4529:5)
#8 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2659:19)
#9 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:891:21)
#10 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5)
#11 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)
#12 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9)
#13 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:997:5)
#14 _rootRun (dart:async/zone.dart:1426:13)
#15 _CustomZone.run (dart:async/zone.dart:1328:19)
#16 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
#17 _invoke (dart:ui/hooks.dart:151:10)
#18 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#19 _drawFrame (dart:ui/hooks.dart:115:31)
regards
AG

@i5hi
Copy link
Contributor

i5hi commented Jun 15, 2022

This happens often on Testnet because the network fee is always 1.0 sat/byte.

It's breaking because the fee slider values require a min , max, and value and they don't meet the conditions.

Those values get set in the slider.dart file based on the feeCubit values.

@i5hi i5hi self-assigned this Jun 15, 2022
@i5hi i5hi added the bug Something isn't working label Jun 15, 2022
@i5hi
Copy link
Contributor

i5hi commented Jun 15, 2022

You can temporarily fix this by hard coding the min (absolute fee) value to 1.

This will temporarily create another bug where if you use low levels on the slider the fee will be too low and it will break on the next step giving a min relay fee error.

@i5hi
Copy link
Contributor

i5hi commented Jun 15, 2022

Also, generally the way we do fees requires some more attention.

Its very naive right now.

1 conf network estimate for fast
value/2 for medium
1 sat/byte for slow

in this error
[log] 'package:flutter/src/material/slider.dart': Failed assertion: line 147 pos 15: 'value >= min && value <= max': is not true.

We use medium fee for as the starting value for the slider which ends up being 0.5 while min and max are both 1.

@i5hi
Copy link
Contributor

i5hi commented Jun 15, 2022

This will be fixed in the next release by the 28th.

@i5hi
Copy link
Contributor

i5hi commented Jun 20, 2022

Updated in dev branch. Will merge by the end of the week.

@i5hi i5hi closed this as completed Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants