-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature/make insufficient fee descriptive #2076
Feature/make insufficient fee descriptive #2076
Conversation
61b9fe2
to
fe2b618
Compare
9e62163
to
3c9e4d2
Compare
8519ffd
to
0843d2b
Compare
@@ -16,6 +16,9 @@ import { | |||
import { strings } from '../../../../../locales/i18n'; | |||
import { getTicker, getNormalizedTxState } from '../../../../util/transactions'; | |||
import TransactionReviewFeeCard from '../TransactionReviewFeeCard'; | |||
import Analytics from '../../../../core/Analytics'; | |||
import { ANALYTICS_EVENT_OPTS } from '../../../../util/analytics'; | |||
import { withNavigation } from 'react-navigation'; |
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.
rather than passing navigation through props we use withNavigation
higher order component
@@ -417,7 +417,11 @@ const Main = props => { | |||
|
|||
const renderDappTransactionModal = () => | |||
props.dappTransactionModalVisible && ( | |||
<Approval dappTransactionModalVisible toggleDappTransactionModal={props.toggleDappTransactionModal} /> | |||
<Approval | |||
navigation={props.navigation} |
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.
this is unrelated, but Approval
was missing navigation
prop. it needs it for this: https://github.com/MetaMask/metamask-mobile/blob/develop/app/components/Views/Approval/index.js#L92-L96. I've made the prop isRequired
on it now so we don't do this
But I think this pattern of passing navigation down through props is bad and we should consider using withNavigation
instead
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.
👌
const { onCancelPress, navigation } = this.props; | ||
/* this is kinda weird, we have to reject the transaction to collapse the modal */ | ||
onCancelPress(); | ||
navigation.navigate('PaymentMethodSelector'); |
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.
it would be nice to be able to leave the transaction up and be able to get the user to buy eth and come back to the aforementioned transaction but it's not really possible here. I think for this rejecting is fine and the user can just go through the trouble of setting up the transaction again
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.
Issue 1:
I'm unable to scroll to see any of the messaging in this approve modal
I got this view by using this deeplink:
Issue 2:
I do see it on the Dapp confirm modal and contract deployment modal, however, I'm wondering, should we still show the option to buy ETH on testnets not supported?
For instance there's no option to buy ETH on Ropsten however, I see the link to buy ETH still
this is from https://metamask.github.io/test-dapp
Issue 3:
I'm not seeing this option when I come from a request, am I supposed to?
cc: @cjeria
I got here by using this deeplink:
https://metamask.app.link/send/0x1FDb169Ef12954F20A15852980e1F0C122BfC1D6@1?value=1e15
Ah good catch. yes we should also make this work for deep links (I can add that).
Maybe in those cases we should have links to the faucets instead? |
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
835ecf2
to
e7dd03f
Compare
Make the unknown network id 9999 for good measure
511617a
to
05dcde4
Compare
5e70c46
to
790b097
Compare
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.
Fixes look good, QA Passed 👍🏽
Description
Make 'Insufficient fee' error descriptive & add link to Buy ETH
Previously we were only displaying "Insufficient funds":
Now we display a more detailed error with the amount of ETH required along with a link to buy more ETH:
Checklist
Issue
Resolves https://github.com/MetaMask/mobile-planning/issues/7