mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
WIP: lnd tx list fix
This commit is contained in:
parent
146905e8a4
commit
48335cd11e
@ -630,6 +630,48 @@ export class BlueTransactionOnchainIcon extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export class BlueTransactionOffchainIcon extends Component {
|
||||
render() {
|
||||
return (
|
||||
<View {...this.props} style={stylesBlueIcon.container}>
|
||||
<View style={stylesBlueIcon.boxIncomming}>
|
||||
<View style={stylesBlueIcon.ballOutgoing}>
|
||||
<Icon
|
||||
{...this.props}
|
||||
name="bolt"
|
||||
size={16}
|
||||
type="font-awesome"
|
||||
color="#d0021b"
|
||||
iconStyle={{ left: 0, top: 7, transform: [{ rotate: '135deg' }] }}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export class BlueTransactionOffchainIncomingIcon extends Component {
|
||||
render() {
|
||||
return (
|
||||
<View {...this.props} style={stylesBlueIcon.container}>
|
||||
<View style={stylesBlueIcon.boxIncomming}>
|
||||
<View style={stylesBlueIcon.ballIncomming}>
|
||||
<Icon
|
||||
{...this.props}
|
||||
name="bolt"
|
||||
size={16}
|
||||
type="font-awesome"
|
||||
color="#37c0a1"
|
||||
iconStyle={{ left: 0, top: 7, transform: [{ rotate: '45deg' }] }}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export class BlueTransactionOutgoingIcon extends Component {
|
||||
render() {
|
||||
return (
|
||||
|
@ -299,6 +299,13 @@ export class LightningCustodianWallet extends LegacyWallet {
|
||||
tx.value = tx.amount * 100000000;
|
||||
tx.received = new Date(tx.time * 1000).toString();
|
||||
tx.memo = 'Refill';
|
||||
|
||||
if (typeof tx.totalamt !== 'undefined' && typeof tx.totalfees !== 'undefined') {
|
||||
// lnd tx outgoing
|
||||
tx.value = (tx.totalamt * 1 + tx.totalfees * 1) * -1;
|
||||
tx.memo = 'Lightning payment'; // TODO once api is ready
|
||||
tx.received = new Date().toString(); // TODO once api is ready
|
||||
}
|
||||
}
|
||||
return txs;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import {
|
||||
BlueTransactionIncommingIcon,
|
||||
BlueTransactionOutgoingIcon,
|
||||
BlueTransactionPendingIcon,
|
||||
BlueTransactionOffchainIcon,
|
||||
BlueSendButtonIcon,
|
||||
BlueReceiveButtonIcon,
|
||||
BlueRefreshIcon,
|
||||
@ -406,6 +407,15 @@ export default class WalletsList extends Component {
|
||||
);
|
||||
}
|
||||
}
|
||||
if (rowData.preimage) {
|
||||
// is it lightning offchain payment?
|
||||
return (
|
||||
<View style={{ width: 25 }}>
|
||||
<BlueTransactionOffchainIcon />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
if (!rowData.confirmations) {
|
||||
return (
|
||||
<View style={{ width: 25 }}>
|
||||
|
Loading…
Reference in New Issue
Block a user