@@ -4,17 +4,13 @@ import { observer } from 'mobx-react';
44import PropTypes from 'prop-types' ;
55import Background from '../component/background' ;
66import MainContent from '../component/main-content' ;
7- import { NamedField } from '../component/field' ;
7+ import { NamedField , AmountInputField } from '../component/field' ;
88import { Header , Title } from '../component/header' ;
99import { CancelButton , BackButton , SmallGlasButton } from '../component/button' ;
1010import Card from '../component/card' ;
1111import LightningBoltIcon from '../asset/icon/lightning-bolt' ;
1212import { FormStretcher } from '../component/form' ;
13- import {
14- BalanceLabel ,
15- BalanceLabelNumeral ,
16- BalanceLabelUnit ,
17- } from '../component/label' ;
13+ import { BalanceLabel , BalanceLabelUnit } from '../component/label' ;
1814import { color } from '../component/style' ;
1915
2016const styles = StyleSheet . create ( {
@@ -52,19 +48,19 @@ const PayLightningSupplyAmountView = ({ store, nav, payment }) => (
5248 < Card >
5349 < FormStretcher >
5450 < BalanceLabel style = { styles . balance } >
55- < BalanceLabelNumeral style = { styles . numeral } >
56- { store . paymentAmountLabel }
57- </ BalanceLabelNumeral >
51+ < AmountInputField
52+ style = { styles . amountInput }
53+ autoFocus = { true }
54+ value = { store . payment . amount }
55+ onChangeText = { amount => payment . setAmount ( { amount } ) }
56+ onSubmitEditing = { ( ) =>
57+ payment . estimateLightningFeeForAmount ( payment . amount )
58+ }
59+ />
5860 < BalanceLabelUnit style = { styles . unit } >
59- { store . unitLabel }
61+ { store . unitFiatLabel }
6062 </ BalanceLabelUnit >
6163 </ BalanceLabel >
62- < NamedField name = "Fee" >
63- { store . paymentFeeLabel } { store . unitLabel }
64- </ NamedField >
65- < NamedField name = "Total" style = { styles . totalLbl } >
66- { store . paymentTotalLabel } { store . unitLabel }
67- </ NamedField >
6864 { store . payment . note ? (
6965 < NamedField name = "Note" style = { styles . note } >
7066 { store . payment . note }
@@ -73,7 +69,7 @@ const PayLightningSupplyAmountView = ({ store, nav, payment }) => (
7369 </ FormStretcher >
7470 </ Card >
7571 </ MainContent >
76- < SmallGlasButton onPress = { ( ) => payment . payLightning ( ) } >
72+ < SmallGlasButton onPress = { ( ) => nav . goPayLightningConfirm ( ) } >
7773 Confirm
7874 </ SmallGlasButton >
7975 </ Background >
0 commit comments