Skip to content
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

bugfix/custom gas modal #1629

Merged
merged 2 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Current Develop Branch

## v0.2.17 - Jun 12 2020

- [#1629](https://github.com/MetaMask/metamask-mobile/pull/1629): bugfix/custom gas modal (#1629)
- [#1625](https://github.com/MetaMask/metamask-mobile/pull/1625): Bugfix/wc connect on app closed (#1625)
- [#1624](https://github.com/MetaMask/metamask-mobile/pull/1624): Wallet connect update + Support for simple notifications (#1624)
- [#1623](https://github.com/MetaMask/metamask-mobile/pull/1623): Fix browser intial load (#1623)
Expand Down
57 changes: 31 additions & 26 deletions app/components/Views/SendFlow/CustomGas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import IonicIcon from 'react-native-vector-icons/Ionicons';
import { fromWei, renderWei, hexToBN, renderFromWei, isBN, isDecimal } from '../../../../util/number';
import { getTicker } from '../../../../util/transactions';
import Radio from '../../../UI/Radio';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';

const styles = StyleSheet.create({
root: {
Expand Down Expand Up @@ -541,32 +542,36 @@ class CustomGas extends PureComponent {
const { toggleCustomGasModal } = this.props;
return (
<View style={styles.root}>
<View style={styles.customGasHeader}>
<TouchableOpacity onPress={toggleCustomGasModal}>
<IonicIcon name={'ios-arrow-back'} size={24} color={colors.black} />
</TouchableOpacity>
<Text style={styles.customGasModalTitleText}>{strings('transaction.edit_network_fee')}</Text>
<IonicIcon name={'ios-arrow-back'} size={24} color={colors.white} />
</View>
<View style={styles.optionsContainer}>
<TouchableOpacity
style={[styles.basicButton, advancedCustomGas ? null : styles.optionSelected]}
onPress={this.onAdvancedOptions}
>
<Text style={styles.textOptions}>{strings('custom_gas.basic_options')}</Text>
</TouchableOpacity>
<TouchableOpacity
style={[styles.basicButton, advancedCustomGas ? styles.optionSelected : null]}
onPress={this.onAdvancedOptions}
>
<Text style={styles.textOptions}>{strings('custom_gas.advanced_options')}</Text>
</TouchableOpacity>
</View>
{advancedCustomGas ? this.renderCustomGasInput() : this.renderCustomGasSelector()}
{!advancedCustomGas ? (
<Text style={styles.message}>{strings('custom_gas.cost_explanation')}</Text>
) : null}
{advancedCustomGas ? this.renderGasError() : null}
<KeyboardAwareScrollView resetScrollToCoords={{ x: 0, y: 0 }}>
<View style={styles.customGasHeader}>
<TouchableOpacity onPress={toggleCustomGasModal}>
<IonicIcon name={'ios-arrow-back'} size={24} color={colors.black} />
</TouchableOpacity>
<Text style={styles.customGasModalTitleText}>
{strings('transaction.edit_network_fee')}
</Text>
<IonicIcon name={'ios-arrow-back'} size={24} color={colors.white} />
</View>
<View style={styles.optionsContainer}>
<TouchableOpacity
style={[styles.basicButton, advancedCustomGas ? null : styles.optionSelected]}
onPress={this.onAdvancedOptions}
>
<Text style={styles.textOptions}>{strings('custom_gas.basic_options')}</Text>
</TouchableOpacity>
<TouchableOpacity
style={[styles.basicButton, advancedCustomGas ? styles.optionSelected : null]}
onPress={this.onAdvancedOptions}
>
<Text style={styles.textOptions}>{strings('custom_gas.advanced_options')}</Text>
</TouchableOpacity>
</View>
{advancedCustomGas ? this.renderCustomGasInput() : this.renderCustomGasSelector()}
{!advancedCustomGas ? (
<Text style={styles.message}>{strings('custom_gas.cost_explanation')}</Text>
) : null}
{advancedCustomGas ? this.renderGasError() : null}
</KeyboardAwareScrollView>
</View>
);
}
Expand Down