mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-08-10 16:43:19 +00:00
Show receiver icon in transaction list, if it is known. Small UI fixes.
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Release"
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "minibits_wallet",
|
||||
"version": "0.2.2-beta.14",
|
||||
"version": "0.2.2-beta.15",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android:clean": "cd android && ./gradlew clean",
|
||||
|
||||
@@ -161,27 +161,27 @@ export function BottomModal(props: ModalProps) {
|
||||
FooterTextProps?.style,
|
||||
]
|
||||
|
||||
const statusBarOnModalOpen = useThemeColor('statusBarOnModalOpen')
|
||||
// const statusBarOnModalOpen = useThemeColor('statusBarOnModalOpen')
|
||||
|
||||
return (
|
||||
<View>
|
||||
<Modal
|
||||
isVisible={isVisible}
|
||||
statusBarTranslucent={false}
|
||||
statusBarTranslucent={true}
|
||||
avoidKeyboard={true}
|
||||
onBackdropPress={onBackdropPress}
|
||||
onBackButtonPress={onBackButtonPress}
|
||||
backdropOpacity={backdropOpacity}
|
||||
style={[$outerContainerBase]}
|
||||
//coverScreen={true}
|
||||
// coverScreen={true}
|
||||
{...otherProps}
|
||||
>
|
||||
<StatusBar backgroundColor={isVisible ? statusBarOnModalOpen : undefined} />
|
||||
{/*<StatusBar backgroundColor={isVisible ? statusBarOnModalOpen : undefined} />*/}
|
||||
<View style={[$innerContainerBase, $innerContainerStyle]}>
|
||||
{HeadingComponent ||
|
||||
(isHeadingPresent && (
|
||||
<Text
|
||||
weight="bold"
|
||||
weight="medium"
|
||||
text={heading}
|
||||
tx={headingTx}
|
||||
txOptions={headingTxOptions}
|
||||
|
||||
@@ -5,11 +5,11 @@ import { Text } from './Text'
|
||||
import { spacing } from '../theme'
|
||||
|
||||
export function Loading(props: ViewProps & { statusMessage?: string, textStyle?: TextStyle, shiftedUp?: boolean }) {
|
||||
const statusBarOnModalOpen = useThemeColor('statusBarOnLoading')
|
||||
//const statusBarOnModalOpen = useThemeColor('statusBarOnLoading')
|
||||
const loadingIndicator = useThemeColor('loadingIndicator')
|
||||
return (
|
||||
<View style={[StyleSheet.absoluteFillObject, $loading(props?.shiftedUp ?? false), props.style]}>
|
||||
<StatusBar backgroundColor={props.style && props.style.backgroundColor ? props.style.backgroundColor : statusBarOnModalOpen } />
|
||||
{/*<StatusBar backgroundColor={props.style && props.style.backgroundColor ? props.style.backgroundColor : statusBarOnModalOpen } />*/}
|
||||
<ActivityIndicator color={loadingIndicator} animating size="large" />
|
||||
{props.statusMessage && (<Text style={[{opacity: 1}, props.textStyle]} text={props.statusMessage}/>)}
|
||||
</View>
|
||||
|
||||
@@ -37,6 +37,10 @@ import { MINIBITS_NIP05_DOMAIN } from '@env'
|
||||
const c = self.contacts.find(c => c.npub === npub)
|
||||
return c ? c : undefined
|
||||
},
|
||||
findByLud16: (lud16: string) => {
|
||||
const c = self.contacts.find(c => c.lud16 === lud16)
|
||||
return c ? c : undefined
|
||||
},
|
||||
alreadyExists(pubkey: string) {
|
||||
return self.contacts.some(m => m.pubkey === pubkey) ? true : false
|
||||
},
|
||||
|
||||
@@ -470,7 +470,9 @@ export const WalletStoreModel = types
|
||||
return {proofs, swapFeePaid}
|
||||
|
||||
} catch (e: any) {
|
||||
if(!e.message.toLowerCase().includes('timeout')) {
|
||||
if(!e.message.toLowerCase().includes('timeout') &&
|
||||
!e.message.toLowerCase().includes('network request failed')) {
|
||||
// remove in-flight request only if it was not a timeout or network error
|
||||
currentCounter.removeInFlightRequest(transactionId)
|
||||
}
|
||||
throw new AppError(
|
||||
@@ -555,9 +557,11 @@ export const WalletStoreModel = types
|
||||
}
|
||||
|
||||
} catch (e: any) {
|
||||
if(!e.message.toLowerCase().includes('timeout')) {
|
||||
currentCounter.removeInFlightRequest(transactionId)
|
||||
}
|
||||
if(!e.message.toLowerCase().includes('timeout') &&
|
||||
!e.message.toLowerCase().includes('network request failed')) {
|
||||
// remove in-flight request only if it was not a timeout or network error
|
||||
currentCounter.removeInFlightRequest(transactionId)
|
||||
}
|
||||
|
||||
let message = 'Swap to prepare ecash to send has failed.'
|
||||
if (isOnionMint(mintUrl)) message += TorVPNSetupInstructions;
|
||||
@@ -732,9 +736,11 @@ export const WalletStoreModel = types
|
||||
return proofs
|
||||
|
||||
} catch (e: any) {
|
||||
if(!e.message.toLowerCase().includes('timeout')) {
|
||||
if(!e.message.toLowerCase().includes('timeout') &&
|
||||
!e.message.toLowerCase().includes('network request failed')) {
|
||||
// remove in-flight request only if it was not a timeout or network error
|
||||
currentCounter.removeInFlightRequest(transactionId)
|
||||
}
|
||||
}
|
||||
|
||||
let message = 'Error on request to mint new ecash.'
|
||||
if (isOnionMint(mintUrl)) message += TorVPNSetupInstructions;
|
||||
@@ -841,7 +847,9 @@ export const WalletStoreModel = types
|
||||
return meltResponse
|
||||
|
||||
} catch (e: any) {
|
||||
if(!e.message.toLowerCase().includes('timeout')) {
|
||||
if(!e.message.toLowerCase().includes('timeout') &&
|
||||
!e.message.toLowerCase().includes('network request failed')) {
|
||||
// remove in-flight request only if it was not a timeout or network error
|
||||
currentCounter.removeInFlightRequest(transactionId)
|
||||
}
|
||||
|
||||
|
||||
@@ -169,6 +169,15 @@ export const TransactionListItem = observer(function (props: TransactionListProp
|
||||
return (<Icon containerStyle={$txIconContainer} icon="faArrowTurnDown" size={spacing.medium} color={txPendingColor}/>)
|
||||
}
|
||||
|
||||
if([TransactionType.SEND, TransactionType.TRANSFER].includes(tx.type)) {
|
||||
if(tx.profile) {
|
||||
const profilePicture = getProfilePicture(tx.profile)
|
||||
if(profilePicture) {
|
||||
return profilePicture
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (<Icon containerStyle={$txIconContainer} icon="faArrowTurnUp" size={spacing.medium} color={txSendColor}/>)
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ export const TransferScreen = observer(function TransferScreen({ route }: Props)
|
||||
const amountInputRef = useRef<TextInput>(null)
|
||||
const lnurlCommentInputRef = useRef<TextInput>(null)
|
||||
|
||||
const {proofsStore, mintsStore, paymentRequestsStore, walletStore, walletProfileStore} = useStores()
|
||||
const {proofsStore, mintsStore, paymentRequestsStore, walletStore, walletProfileStore, contactsStore} = useStores()
|
||||
// const {walletStore} = nonPersistedStores
|
||||
|
||||
const isInternetReachable = useIsInternetReachable()
|
||||
@@ -377,9 +377,15 @@ useEffect(() => {
|
||||
setTransaction(transaction)
|
||||
|
||||
if(transaction && lnurlPayParams && lnurlPayParams.address) {
|
||||
transaction.setSentTo(
|
||||
lnurlPayParams.address as string
|
||||
)
|
||||
|
||||
const profile = contactsStore.findByLud16(lnurlPayParams.address)
|
||||
|
||||
if (profile) {
|
||||
transaction.setSentTo(profile.nip05 || profile.name)
|
||||
transaction.setProfile(JSON.stringify(profile))
|
||||
} else {
|
||||
transaction.setSentTo(lnurlPayParams.address)
|
||||
}
|
||||
}
|
||||
|
||||
if (error) { // This handles timed out pending payments
|
||||
@@ -583,12 +589,19 @@ const onEncodedInvoice = async function (encoded: string, paymentRequestDesc: st
|
||||
log.trace("[onEncodedInvoice] start", {mintUrl, unit})
|
||||
|
||||
try {
|
||||
//@ts-ignore
|
||||
navigation.setParams({encodedInvoice: undefined})
|
||||
//@ts-ignore
|
||||
navigation.setParams({paymentRequest: undefined})
|
||||
//@ts-ignore
|
||||
navigation.setParams({lnurlParams: undefined})
|
||||
//@ts-ignore
|
||||
navigation.setParams({paymentOption: undefined})
|
||||
//@ts-ignore
|
||||
navigation.setParams({fixedAmount: undefined})
|
||||
//@ts-ignore
|
||||
navigation.setParams({isDonation: undefined})
|
||||
//@ts-ignore
|
||||
navigation.setParams({donationForName: undefined})
|
||||
|
||||
const invoice = LightningUtils.decodeInvoice(encoded)
|
||||
|
||||
@@ -1085,7 +1085,7 @@ const $screen: ViewStyle = {
|
||||
const $headerContainer: TextStyle = {
|
||||
alignItems: 'center',
|
||||
// padding: spacing.tiny,
|
||||
height: spacing.screenHeight * 0.28,
|
||||
height: spacing.screenHeight * 0.27,
|
||||
}
|
||||
|
||||
const $tabContainer: TextStyle = {
|
||||
|
||||
@@ -2089,7 +2089,7 @@ const handleReceivedEventTask = async function (encryptedEvent: NostrEvent): Pro
|
||||
// this is not valid for events sent from LNURL bridge, that are sent and signed by a minibits server key
|
||||
// and *** do not contain sentFrom *** // LEGACY, replaced by claim api
|
||||
let sentFromPubkey = directMessageEvent.pubkey
|
||||
let sentFrom = NostrClient.getFirstTagValue(directMessageEvent.tags, 'from')
|
||||
let sentFrom = NostrClient.getFirstTagValue(directMessageEvent.tags, 'from') as string
|
||||
let sentFromNpub = NostrClient.getNpubkey(sentFromPubkey)
|
||||
let contactFrom: Contact | undefined = undefined
|
||||
let zapSenderProfile: NostrProfile | undefined = undefined
|
||||
|
||||
Reference in New Issue
Block a user