@@ -4,13 +4,12 @@ import cx from 'classnames';
44import QrReader from 'react-qr-reader' ;
55import LightningPayReq from './lib/bolt11' ;
66import { formatDetailsKey } from './utils/keys' ;
7- import { formatTimestamp } from './utils/timestamp' ;
7+ // import { formatTimestamp } from './utils/timestamp';
88
99// Assets
1010import arrowImage from './assets/images/arrow.svg' ;
1111import closeImage from './assets/images/close.svg' ;
1212import githubImage from './assets/images/github.svg' ;
13- import bitcoinImage from './assets/images/bitcoin.svg' ;
1413import boltImage from './assets/images/bolt.png' ;
1514import qrcodeImage from './assets/images/qrcode.png' ;
1615
@@ -20,7 +19,6 @@ import {
2019 APP_TAGLINE ,
2120 APP_INPUT_PLACEHOLDER ,
2221 APP_GITHUB ,
23- DONATION_BTC ,
2422} from './constants/app' ;
2523import {
2624 TAGS_KEY ,
@@ -51,7 +49,8 @@ export class App extends PureComponent {
5149
5250 getInvoiceDetails = ( text ) => this . setState ( ( ) => {
5351 try {
54- const decodedInvoice = LightningPayReq . decode ( text ) ;
52+ const payReq = text . toLowerCase ( ) ;
53+ const decodedInvoice = LightningPayReq . decode ( payReq ) ;
5554
5655 return {
5756 decodedInvoice,
@@ -218,7 +217,8 @@ export class App extends PureComponent {
218217 valuePropFormat &&
219218 valuePropFormat === TIMESTAMP_STRING_KEY
220219 ) {
221- value = `${ formatTimestamp ( decodedInvoice [ key ] ) } ` ;
220+ // TODO: this breaks
221+ // value = `${formatTimestamp(decodedInvoice[key])}`;
222222 }
223223
224224 return (
@@ -277,34 +277,15 @@ export class App extends PureComponent {
277277 }
278278
279279 renderOptions = ( ) => {
280- const { isBitcoinAddrOpened , isInvoiceLoaded } = this . state ;
280+ const { isInvoiceLoaded } = this . state ;
281281 const optionsClassnames = cx (
282282 'options' ,
283283 { 'options--hide' : isInvoiceLoaded } ,
284284 ) ;
285- const bitcoinClassnames = cx (
286- 'options__bitcoin' ,
287- { 'options__bitcoin--opened' : isBitcoinAddrOpened } ,
288- ) ;
289285
290286 return (
291287 < div className = { optionsClassnames } >
292288 < div className = 'options__wrapper' >
293- < div className = { bitcoinClassnames } >
294- < div className = 'options__bitcoin-address' >
295- { DONATION_BTC }
296- </ div >
297- < button
298- onClick = { this . handleBitcoinClick }
299- className = 'options__bitcoin-icon-wrapper'
300- >
301- < img
302- className = 'options__bitcoin-icon'
303- src = { bitcoinImage }
304- alt = 'Bitcoin'
305- />
306- </ button >
307- </ div >
308289 < a
309290 href = { APP_GITHUB }
310291 className = 'options__github'
0 commit comments