TokenScript icon indicating copy to clipboard operation
TokenScript copied to clipboard

Add hide-able enable action for compound

Open bitcoinwarrior1 opened this issue 5 years ago • 4 comments

Compound requires that you enable it via approve in the native token. Without this the user cannot use the service. Transactions will successfully execute but silently fail.

Should be able to have an enable action which only shows if the user has not done so, after it is enabled, the other actions should show up.

bitcoinwarrior1 avatar Aug 18 '19 05:08 bitcoinwarrior1

Can you get a boolean attribute and use that as a filter to enable the actions which depend on such approval?

SmartLayer avatar Aug 18 '19 05:08 SmartLayer

Yes but you can't show/hide based on this, need to add a way to hide the actions and reveal others.

bitcoinwarrior1 avatar Aug 18 '19 06:08 bitcoinwarrior1

Hiding would be bad ux because it breaks discoverability. if you hit an action which is disabled, you should get a message on why it is disabled. I think not only tokenscript supported filter, but also a localised message to go with it?

SmartLayer avatar Aug 18 '19 06:08 SmartLayer

Atm I am doing it the manual way, but this action should be hidden after it is enabled.

On Sun, 18 Aug 2019 at 4:48 PM, Weiwu Zhang [email protected] wrote:

Hiding would be bad user interface because it breaks discoverability. if you hit an action which is disabled, you should get a message on why it is disabled. I think not only tokenscript supported filter, but also a localised message to go with it?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/AlphaWallet/TokenScript/issues/222?email_source=notifications&email_token=AD64F4WLG7ZMLN2OYJV3AILQFDWDBA5CNFSM4IMRMCKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QZW4A#issuecomment-522296176, or mute the thread https://github.com/notifications/unsubscribe-auth/AD64F4W4QUHMLEDME2CHYFLQFDWDBANCNFSM4IMRMCKA .

-- James Sangalli

bitcoinwarrior1 avatar Aug 18 '19 07:08 bitcoinwarrior1