diff --git a/components/UTXOPicker.tsx b/components/UTXOPicker.tsx index 5e703b9e79..af026a531c 100644 --- a/components/UTXOPicker.tsx +++ b/components/UTXOPicker.tsx @@ -12,13 +12,14 @@ import remove from 'lodash/remove'; import { inject, observer } from 'mobx-react'; import Amount from './Amount'; -import Button from './../components/Button'; +import Button from '../components/Button'; +import LoadingIndicator from './LoadingIndicator'; -import { localeString } from './../utils/LocaleUtils'; -import { themeColor } from './../utils/ThemeUtils'; +import { localeString } from '../utils/LocaleUtils'; +import { themeColor } from '../utils/ThemeUtils'; -import stores from './../stores/Stores'; -import UTXOsStore from './../stores/UTXOsStore'; +import stores from '../stores/Stores'; +import UTXOsStore from '../stores/UTXOsStore'; interface UTXOPickerProps { title?: string; @@ -161,100 +162,142 @@ export default class UTXOPicker extends React.Component< /> - ( - } + + {!loading && utxos.length === 0 && ( + + - this.toggleItem(item) - } > - - {item.getOutpoint} - - + + )} + + {!loading && utxos.length > 0 && ( + ( + + this.toggleItem(item) + } > - - - - )} - keyExtractor={( - item: any, - index: number - ) => `${item.txid}-${index}`} - onEndReachedThreshold={50} - refreshing={loading} - onRefresh={() => getUTXOs()} - /> - - -