-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix(feed): Fix Tip action and TipModal #1387
Conversation
Fix refresh Tip Fix error uncontrolled input Remove legacy stuff Close properly Tip Modal and prevent unstoppable loading
✅ Deploy Preview for testitori ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for teritori-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a full app crash when a decimal number (like 0.42
) is entered as tip amount, it's not present on main
Error: Fractional part missing
at _e.TipModal (https://deploy-preview-1387--teritori-dapp.netlify.app/_expo/static/js/web/AppEntry-365ba3edc76685e54f8abeac0296fa69.js:3706:1087)
at _e.TipButton (https://deploy-preview-1387--teritori-dapp.netlify.app/_expo/static/js/web/AppEntry-365ba3edc76685e54f8abeac0296fa69.js:3705:1495)
at div
at https://deploy-preview-1387--teritori-dapp.netlify.app/_expo/static/js/web/AppEntry-365ba3edc76685e54f8abeac0296fa69.js:603:1621
at div
at https://deploy-preview-1387--teritori-dapp.netlify.app/_expo/static/js/web/AppEntry-365ba3edc76685e54f8abeac0296fa69.js:603:1621
at e.FlexRow (https://deploy-preview-1387--teritori-dapp.netlify.app/_expo/static/js/web/AppEntry-365ba3edc76685e54f8abeac0296fa69.js:3247:260)
at e.SocialCardFooter (https://deploy-preview-1387--teritori-dapp.netlify.app/_expo/static/js/web/AppEntry-365ba3edc76685e54f8abeac0296fa69.js:5133:328)
at div
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test and reviewed
Fixes "Cannot tip"
Closes #1376
Gno network: https://github.com/TERITORI/teritori-dapp/blob/fix-tip/packages/components/socialFeed/SocialActions/TipModal.tsx#L119
Other networks: https://github.com/TERITORI/teritori-dapp/blob/fix-tip/packages/components/socialFeed/SocialActions/TipModal.tsx#L159
Fixes "the Tip amount is not refresh"
Closes #1389
https://github.com/TERITORI/teritori-dapp/blob/fix-tip/packages/components/socialFeed/SocialActions/TipModal.tsx#L90
Fixes a wrong Tip amount shown
tipAmount
was astring
here, so theaddedAmount
addition results on a broken number displayedhttps://github.com/TERITORI/teritori-dapp/blob/fix-tip/packages/hooks/feed/usePost.ts#L74
I used the same pattern as here: https://github.com/TERITORI/teritori-dapp/blob/fix-tip/packages/utils/social-feed.ts#L123
Fixes this loader that won't stop if the TX fails (Gno Tip also)
https://github.com/TERITORI/teritori-dapp/blob/fix-tip/packages/components/socialFeed/SocialActions/TipModal.tsx#L91
Fixes closing the TipModal, even if Tip fails, to let the Toast Error visible (Gno Tip also)
https://github.com/TERITORI/teritori-dapp/blob/fix-tip/packages/components/socialFeed/SocialActions/TipModal.tsx#L90
Fixes this error
https://github.com/TERITORI/teritori-dapp/blob/fix-tip/packages/components/socialFeed/SocialActions/TipModal.tsx#L58-L60