Merge branch 'master' into ref

This commit is contained in:
Marcos Rodriguez Velez 2024-06-04 17:42:39 -04:00
commit 9b9b7f769f
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7
3 changed files with 11 additions and 1 deletions

View File

@ -60,6 +60,7 @@ export type SendDetailsStackParamList = {
Success: { Success: {
fee: number; fee: number;
amount: number; amount: number;
txid?: string;
}; };
SelectWallet: { SelectWallet: {
onWalletSelect: (wallet: TWallet) => void; onWalletSelect: (wallet: TWallet) => void;

View File

@ -211,6 +211,7 @@ const Confirm: React.FC = () => {
navigate('Success', { navigate('Success', {
fee: Number(fee), fee: Number(fee),
amount, amount,
txid,
}); });
dispatch({ type: ActionType.SET_LOADING, payload: false }); dispatch({ type: ActionType.SET_LOADING, payload: false });

View File

@ -12,6 +12,7 @@ import SafeArea from '../../components/SafeArea';
import { useTheme } from '../../components/themes'; import { useTheme } from '../../components/themes';
import loc from '../../loc'; import loc from '../../loc';
import { BitcoinUnit } from '../../models/bitcoinUnits'; import { BitcoinUnit } from '../../models/bitcoinUnits';
import HandOffComponent from '../../components/HandOffComponent';
const Success = () => { const Success = () => {
const pop = () => { const pop = () => {
@ -19,7 +20,7 @@ const Success = () => {
}; };
const { colors } = useTheme(); const { colors } = useTheme();
const { getParent } = useNavigation(); const { getParent } = useNavigation();
const { amount, fee, amountUnit = BitcoinUnit.BTC, invoiceDescription = '', onDonePressed = pop } = useRoute().params; const { amount, fee, amountUnit = BitcoinUnit.BTC, invoiceDescription = '', onDonePressed = pop, txid } = useRoute().params;
const stylesHook = StyleSheet.create({ const stylesHook = StyleSheet.create({
root: { root: {
backgroundColor: colors.elevated, backgroundColor: colors.elevated,
@ -47,6 +48,13 @@ const Success = () => {
<View style={styles.buttonContainer}> <View style={styles.buttonContainer}>
<Button onPress={onDonePressed} title={loc.send.success_done} /> <Button onPress={onDonePressed} title={loc.send.success_done} />
</View> </View>
{txid && (
<HandOffComponent
title={loc.transactions.details_title}
type={HandOffComponent.activityTypes.ViewInBlockExplorer}
url={`https://mempool.space/tx/${txid}`}
/>
)}
</SafeArea> </SafeArea>
); );
}; };