File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
apps/extension/src/stores/ui-config Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export interface UIConfigOptions {
3232 showFiatValue : boolean ;
3333 showSearchBar : boolean ;
3434 switchAssetViewModeSuggestion : boolean ;
35+ switchAssetViewModeSuggestion2 : boolean ;
3536 isPrivacyMode : boolean ;
3637 rememberLastFeeOption : boolean ;
3738 lastFeeOption : "low" | "average" | "high" | false ;
@@ -64,7 +65,9 @@ export class UIConfigStore {
6465 rememberLastFeeOption : false ,
6566 lastFeeOption : false ,
6667 show24HChangesInMagePage : true ,
68+ // switchAssetViewModeSuggestion is deprecated to show the suggestion again
6769 switchAssetViewModeSuggestion : true ,
70+ switchAssetViewModeSuggestion2 : true ,
6871
6972 useWebHIDLedger : false ,
7073 } ;
@@ -270,12 +273,12 @@ export class UIConfigStore {
270273 }
271274
272275 get switchAssetViewModeSuggestion ( ) : boolean {
273- return this . options . switchAssetViewModeSuggestion ;
276+ return this . options . switchAssetViewModeSuggestion2 ;
274277 }
275278
276279 @action
277280 turnOffSwitchAssetViewModeSuggestion ( ) {
278- this . options . switchAssetViewModeSuggestion = false ;
281+ this . options . switchAssetViewModeSuggestion2 = false ;
279282 }
280283
281284 get useWebHIDLedger ( ) : boolean {
Original file line number Diff line number Diff line change @@ -110,7 +110,13 @@ export class AmountConfig extends TxChainSetter implements IAmountConfig {
110110 const subFee = this . feeConfig . fees [ 0 ] . mul (
111111 new Dec ( this . _fractionSubFeeWeight )
112112 ) ;
113- return maxValue . sub ( subFee ) . toString ( ) ;
113+ const finalValue = maxValue . sub ( subFee ) ;
114+
115+ if ( finalValue . toDec ( ) . lte ( new Dec ( 0 ) ) ) {
116+ return "0" ;
117+ }
118+
119+ return finalValue . toString ( ) ;
114120 }
115121
116122 return maxValue . toString ( ) ;
You can’t perform that action at this time.
0 commit comments