diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx index f023a3472947..0c851b77c25b 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx @@ -80,9 +80,10 @@ export const ConfirmUnverifiedModal = ({ } bottomBarComponents={ <> - + {isPassphraseRequired && ( )} + } - > - - + /> ); }; diff --git a/packages/suite/src/support/messages.ts b/packages/suite/src/support/messages.ts index 888b00936558..ebb50b5b8b99 100644 --- a/packages/suite/src/support/messages.ts +++ b/packages/suite/src/support/messages.ts @@ -4517,6 +4517,10 @@ export default defineMessages({ id: 'RECEIVE_ADDRESS_REVEAL', defaultMessage: 'Show full address', }, + RECEIVE_UNVERIFIED_ADDRESS_REVEAL: { + id: 'RECEIVE_UNVERIFIED_ADDRESS_REVEAL', + defaultMessage: 'Generate unverified address', + }, RECEIVE_ADDRESS_COINJOIN_DISALLOW: { id: 'RECEIVE_ADDRESS_COINJOIN_DISALLOW', defaultMessage: @@ -9077,4 +9081,13 @@ export default defineMessages({ id: 'TR_PASSPHRASE_DESCRIPTION_ITEM3', defaultMessage: 'No one can recover it, not even Trezor support', }, + TR_CONNECT_DEVICE_PROMO_TITLE: { + id: 'TR_CONNECT_DEVICE_PROMO_TITLE', + defaultMessage: 'Receive address can’t be verified', + }, + TR_CONNECT_DEVICE_PROMO_DESCRIPTION: { + id: 'TR_CONNECT_DEVICE_PROMO_DESCRIPTION', + defaultMessage: + "Verify on Trezor to confirm receive address. Continuing without confirming isn't recommended.", + }, }); diff --git a/packages/suite/src/views/wallet/receive/Receive.tsx b/packages/suite/src/views/wallet/receive/Receive.tsx index 9f327d1922c8..6e02843bbab7 100644 --- a/packages/suite/src/views/wallet/receive/Receive.tsx +++ b/packages/suite/src/views/wallet/receive/Receive.tsx @@ -36,12 +36,12 @@ export const Receive = () => { const disabled = !!device.authConfirm; const showCexWarning = account?.accountType === 'coinjoin' && !isCoinjoinReceiveWarningHidden; - console.log('isDeviceLocked', isDeviceLocked); + const isDeviceConnected = device.connected && device.available; return ( - {true && } + {!isDeviceConnected && } @@ -53,6 +53,7 @@ export const Receive = () => { disabled={disabled} locked={isDeviceLocked} pendingAddresses={pendingAddresses} + isDeviceConnected={isDeviceConnected} /> { const selectedDevice = useSelector(selectDevice); @@ -10,14 +11,13 @@ export const ConnectDevicePromo = () => { return ( - + - Receive address can’t be verified + - Verify on Trezor to confirm receive address. Continuing without confirming - isn’t recommended. + diff --git a/packages/suite/src/views/wallet/receive/components/FreshAddress.tsx b/packages/suite/src/views/wallet/receive/components/FreshAddress.tsx index 33283d50bea9..3be543d13650 100644 --- a/packages/suite/src/views/wallet/receive/components/FreshAddress.tsx +++ b/packages/suite/src/views/wallet/receive/components/FreshAddress.tsx @@ -109,6 +109,7 @@ interface FreshAddressProps { disabled: boolean; locked: boolean; pendingAddresses: string[]; + isDeviceConnected: boolean; } export const FreshAddress = ({ @@ -117,6 +118,7 @@ export const FreshAddress = ({ disabled, pendingAddresses, locked, + isDeviceConnected, }: FreshAddressProps) => { const isAccountUtxoBased = useSelector((state: AccountsRootState) => selectIsAccountUtxoBased(state, account?.key ?? ''), @@ -156,53 +158,62 @@ export const FreshAddress = ({ return null; }; + const buttonRevealAddressProps = { + 'data-test': '@wallet/receive/reveal-address-button', + onClick: handleAddressReveal, + isDisabled: disabled || locked || coinjoinDisallowReveal || !firstFreshAddress, + isLoading: locked, + }; + return ( - - - - - {addressValue && } - - {addressValue ?? } - - - - - - - - - {account.networkType === 'ethereum' && ( - + + + + + {addressValue && } + + {addressValue ?? } + + + + + {isDeviceConnected ? ( + + + + ) : ( + + + + )} + + {account.networkType === 'ethereum' && ( + + } + > - } - > - - - )} - + + )} + + ); };