diff --git a/components/CollapsedQR.tsx b/components/CollapsedQR.tsx index e6c7fa784..e223cf7e4 100644 --- a/components/CollapsedQR.tsx +++ b/components/CollapsedQR.tsx @@ -53,7 +53,7 @@ interface CollapsedQRProps { expanded?: boolean; textBottom?: boolean; truncateLongValue?: boolean; - satAmount?: string; + satAmount?: string | number; } interface CollapsedQRState { diff --git a/views/PaymentRequest.tsx b/views/PaymentRequest.tsx index 7680b54ea..aee113e64 100644 --- a/views/PaymentRequest.tsx +++ b/views/PaymentRequest.tsx @@ -340,7 +340,10 @@ export default class PaymentRequest extends React.Component< { - navigation.navigate('QR', { value: paymentRequest }); + navigation.navigate('QR', { + value: paymentRequest, + satAmount: requestAmount + }); }} color={themeColor('text')} underlayColor="transparent" diff --git a/views/QR.tsx b/views/QR.tsx index e587ace9e..3500b2fe2 100644 --- a/views/QR.tsx +++ b/views/QR.tsx @@ -11,20 +11,25 @@ interface QRProps { interface QRState { value: string; + satAmount?: number; } export default class QR extends React.PureComponent { constructor(props: any) { super(props); const value: string = this.props.navigation.getParam('value', ''); + const satAmount: number | undefined = + this.props.navigation.getParam('satAmount'); + this.state = { - value + value, + satAmount }; } render() { const { navigation } = this.props; - const { value } = this.state; + const { value, satAmount } = this.state; return ( @@ -38,11 +43,16 @@ export default class QR extends React.PureComponent { /> - + );