diff --git a/BlueComponents.js b/BlueComponents.js index 716a64fa..f75f9e7f 100644 --- a/BlueComponents.js +++ b/BlueComponents.js @@ -18,6 +18,7 @@ import { Image, Keyboard, SafeAreaView, + InteractionManager, InputAccessoryView, Clipboard, Platform, @@ -103,7 +104,6 @@ export class BitcoinButton extends Component { borderRadius: 5, backgroundColor: (this.props.active && BlueApp.settings.hdbackgroundColor) || BlueApp.settings.brandingColor, // eslint-disable-next-line - width: this.props.style.width, minWidth: this.props.style.width, // eslint-disable-next-line minHeight: this.props.style.height, @@ -141,7 +141,6 @@ export class LightningButton extends Component { borderRadius: 5, backgroundColor: (this.props.active && BlueApp.settings.lnbackgroundColor) || BlueApp.settings.brandingColor, // eslint-disable-next-line - width: this.props.style.width, minWidth: this.props.style.width, // eslint-disable-next-line minHeight: this.props.style.height, @@ -1363,6 +1362,8 @@ export class BlueTransactionListItem extends Component { itemPriceUnit: BitcoinUnit.BTC, }; + state = { transactionTimeToReadable: '...' }; + txMemo = () => { if (BlueApp.tx_metadata[this.props.item.hash] && BlueApp.tx_metadata[this.props.item.hash]['memo']) { return BlueApp.tx_metadata[this.props.item.hash]['memo']; @@ -1524,11 +1525,18 @@ export class BlueTransactionListItem extends Component { } }; + componentDidMount() { + InteractionManager.runAfterInteractions(() => { + const transactionTimeToReadable = loc.transactionTimeToReadable(this.props.item.received); + this.setState({ transactionTimeToReadable }); + }); + } + render() { return ( - + {this.state.bip21encoded === undefined ? ( @@ -150,7 +151,7 @@ export default class ReceiveDetails extends Component { /> - + ); } diff --git a/screen/transactions/transactionStatus.js b/screen/transactions/transactionStatus.js index d98ca95d..dd14b924 100644 --- a/screen/transactions/transactionStatus.js +++ b/screen/transactions/transactionStatus.js @@ -314,7 +314,6 @@ export default class TransactionsStatus extends Component { } title="Bump Fee" /> - ); } @@ -324,13 +323,12 @@ export default class TransactionsStatus extends Component { return ( - ); } else if (this.state.isRBFCancelPossible === buttonStatus.possible) { return ( - + this.props.navigation.navigate('RBFCancel', { @@ -349,7 +347,7 @@ export default class TransactionsStatus extends Component { })()} this.props.navigation.navigate('TransactionDetails', { hash: this.state.tx.hash })} > {loc.send.create.details.toLowerCase()} diff --git a/screen/wallets/add.js b/screen/wallets/add.js index 20e1f457..1f610a43 100644 --- a/screen/wallets/add.js +++ b/screen/wallets/add.js @@ -138,7 +138,7 @@ export default class WalletsAdd extends Component { }); }} style={{ - width: 141, + width: '45%', height: 88, }} /> @@ -155,7 +155,7 @@ export default class WalletsAdd extends Component { }); }} style={{ - width: 141, + width: '45%', height: 88, }} /> diff --git a/screen/wallets/transactions.js b/screen/wallets/transactions.js index 2aa0badc..108395e7 100644 --- a/screen/wallets/transactions.js +++ b/screen/wallets/transactions.js @@ -8,6 +8,7 @@ import { BlueSendButtonIcon, BlueReceiveButtonIcon, BlueTransactionListItem, Blu import { Icon } from 'react-native-elements'; import { LightningCustodianWallet } from '../../class'; import Handoff from 'react-native-handoff'; +import { ScrollView } from 'react-native-gesture-handler'; /** @type {AppStorage} */ let BlueApp = require('../../BlueApp'); let loc = require('../../loc'); @@ -173,7 +174,7 @@ export default class WalletTransactions extends Component { renderListFooterComponent = () => { // if not all txs rendered - display indicator - return (this.getTransactions(Infinity).length > this.state.limit && ) || ; + return (this.getTransactions(Infinity).length > this.state.limit && ) || ; }; renderListHeaderComponent = () => { @@ -230,7 +231,7 @@ export default class WalletTransactions extends Component { wallet={this.state.wallet} onWalletUnitChange={wallet => InteractionManager.runAfterInteractions(async () => { - this.setState({ wallet }, () => BlueApp.saveToDisk()); + this.setState({ wallet }, () => InteractionManager.runAfterInteractions(() => BlueApp.saveToDisk())); }) } /> @@ -250,11 +251,9 @@ export default class WalletTransactions extends Component { margin: 16, backgroundColor: '#f2f2f2', borderRadius: 9, - minWidth: 343, minHeight: 49, justifyContent: 'center', alignItems: 'center', - alignSelf: 'center', }} > marketplace @@ -281,7 +280,7 @@ export default class WalletTransactions extends Component { ListHeaderComponent={this.renderListHeaderComponent} ListFooterComponent={this.renderListFooterComponent} ListEmptyComponent={ - + )} - + } refreshControl={ this.refreshTransactions()} refreshing={this.state.showShowFlatListRefreshControl} /> @@ -331,6 +330,7 @@ export default class WalletTransactions extends Component { data={this.state.dataSource} keyExtractor={this._keyExtractor} renderItem={this.renderItem} + contentInset={{ top: 0, left: 0, bottom: 90, right: 0 }} />