@@ -26,7 +26,7 @@ class _AvatarPageState extends State<AvatarPage>
2626 AnimationController _controller;
2727 Animation <Color > bgColorAnimation;
2828 Animation <Offset > offsetTween;
29- double accountBalance = 0 ;
29+ bool hasEnoughFunds ;
3030 NatriconSetting _curNatriconSetting = NatriconSetting (NatriconOptions .ON );
3131 @override
3232 void initState () {
@@ -46,6 +46,8 @@ class _AvatarPageState extends State<AvatarPage>
4646
4747 @override
4848 Widget build (BuildContext context) {
49+ hasEnoughFunds = StateContainer .of (context).wallet.accountBalance >
50+ BigInt .parse ("1234570000000000000000000000" );
4951 bgColorAnimation = ColorTween (
5052 begin: Colors .transparent,
5153 end: StateContainer .of (context).curTheme.overlay70,
@@ -172,14 +174,14 @@ class _AvatarPageState extends State<AvatarPage>
172174 .size
173175 .height *
174176 0.035 ,
175- top: accountBalance > - 1 ? 24 : 16 ),
177+ top: hasEnoughFunds ? 24 : 16 ),
176178 child: Column (
177179 mainAxisSize: MainAxisSize .min,
178180 mainAxisAlignment:
179181 MainAxisAlignment .end,
180182 children: < Widget > [
181- // If balance if below 0.13 Nano, don't display this button
182- accountBalance > - 1
183+ // If balance if below 0.0123457 Nano, don't display this button
184+ hasEnoughFunds
183185 ? Row (
184186 children: < Widget > [
185187 AppButton .buildAppButton (
0 commit comments