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: {
fee: number;
amount: number;
txid?: string;
};
SelectWallet: {
onWalletSelect: (wallet: TWallet) => void;

View File

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

View File

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