+
+ )
+}
diff --git a/src/components/Modals/ReclaimNameModal/ReclaimNameModal.types.ts b/src/components/Modals/ReclaimNameModal/ReclaimNameModal.types.ts
new file mode 100644
index 000000000..a9e752dab
--- /dev/null
+++ b/src/components/Modals/ReclaimNameModal/ReclaimNameModal.types.ts
@@ -0,0 +1,18 @@
+import { ModalProps } from 'decentraland-ui'
+import { Dispatch } from 'redux'
+import { ClearENSErrorsAction, ReclaimNameRequestAction, reclaimNameRequest } from 'modules/ens/actions'
+import { ENS } from 'modules/ens/types'
+
+export type Props = ModalProps & {
+ error: string | null
+ ens: ENS
+ isLoadingReclaim: boolean
+ isWaitingTxReclaim: boolean
+ onReclaim: typeof reclaimNameRequest
+ onUnmount: () => void
+}
+
+export type MapStateProps = Pick
+export type MapDispatchProps = Pick
+export type MapDispatch = Dispatch
+export type OwnProps = Omit
diff --git a/src/components/Modals/ReclaimNameModal/index.ts b/src/components/Modals/ReclaimNameModal/index.ts
new file mode 100644
index 000000000..b37c375cb
--- /dev/null
+++ b/src/components/Modals/ReclaimNameModal/index.ts
@@ -0,0 +1,2 @@
+import ReclaimNameModal from './ReclaimNameModal.container'
+export default ReclaimNameModal
diff --git a/src/components/Modals/index.ts b/src/components/Modals/index.ts
index 1ce6b650b..f5a8bd6e0 100644
--- a/src/components/Modals/index.ts
+++ b/src/components/Modals/index.ts
@@ -51,3 +51,4 @@ export { default as EmotesV2AnnouncementModal } from './EmotesV2AnnouncementModa
export { default as WorldsYourStorageModal } from './WorldsYourStorageModal'
export { default as WorldsForENSOwnersAnnouncementModal } from './WorldsForENSOwnersAnnouncementModal'
export { default as EnsMapAddressModal } from './ENSMapAddressModal'
+export { default as ReclaimNameModal } from './ReclaimNameModal'
diff --git a/src/modules/ens/sagas.ts b/src/modules/ens/sagas.ts
index bf816ea69..6059bab3c 100644
--- a/src/modules/ens/sagas.ts
+++ b/src/modules/ens/sagas.ts
@@ -388,8 +388,8 @@ export function* ensSaga(builderClient: BuilderClient, ensApi: ENSApi) {
const wallet: Wallet = yield call(getWallet)
const signer: ethers.Signer = yield call(getSigner)
const address = wallet.address
- const ensContract: ReturnType = yield call([ENS__factory, 'connect'], ENS_ADDRESS, signer)
- const dclRegistrarContract: ReturnType = yield call(
+ const ensContract: ReturnType<(typeof ENS__factory)['connect']> = yield call([ENS__factory, 'connect'], ENS_ADDRESS, signer)
+ const dclRegistrarContract: ReturnType<(typeof DCLRegistrar__factory)['connect']> = yield call(
[DCLRegistrar__factory, 'connect'],
REGISTRAR_ADDRESS,
signer
@@ -527,6 +527,7 @@ export function* ensSaga(builderClient: BuilderClient, ensApi: ENSApi) {
const dclRegistrarContract = DCLRegistrar__factory.connect(REGISTRAR_ADDRESS, signer)
const transaction: ethers.ContractTransaction = yield call([dclRegistrarContract, 'reclaim'], ens.tokenId, wallet.address)
yield put(reclaimNameSuccess(transaction.hash, wallet.chainId, { ...ens, ensOwnerAddress: wallet.address }))
+ yield put(closeModal('ReclaimNameModal'))
} catch (error) {
const ensError: ENSError = { message: isErrorWithMessage(error) ? error.message : 'Unknown error' }
yield put(reclaimNameFailure(ensError))
@@ -539,7 +540,7 @@ export function* ensSaga(builderClient: BuilderClient, ensApi: ENSApi) {
const wallet: Wallet = yield call(getWallet)
const signer: ethers.Signer = yield call(getSigner)
const from = wallet.address
- const manaContract: ReturnType = yield call([ERC20__factory, 'connect'], MANA_ADDRESS, signer)
+ const manaContract: ReturnType<(typeof ERC20__factory)['connect']> = yield call([ERC20__factory, 'connect'], MANA_ADDRESS, signer)
const transaction: ethers.ContractTransaction = yield call([manaContract, 'approve'], CONTROLLER_V2_ADDRESS, allowance)
yield put(allowClaimManaSuccess(allowance, from.toString(), wallet.chainId, transaction.hash))
diff --git a/src/modules/ens/selectors.ts b/src/modules/ens/selectors.ts
index 1e73210e7..3d75681c5 100644
--- a/src/modules/ens/selectors.ts
+++ b/src/modules/ens/selectors.ts
@@ -16,7 +16,8 @@ import {
RECLAIM_NAME_SUCCESS,
CLAIM_NAME_REQUEST,
CLAIM_NAME_TRANSACTION_SUBMITTED,
- SET_ENS_ADDRESS_SUCCESS
+ SET_ENS_ADDRESS_SUCCESS,
+ RECLAIM_NAME_REQUEST
} from './actions'
import { Authorization, ENS } from './types'
import { ENSState } from './reducer'
@@ -105,8 +106,8 @@ export const isWaitingTxSetLandContent = (state: RootState, landId: string) =>
transaction => SET_ENS_CONTENT_SUCCESS === transaction.actionType && transaction.payload.land.id === landId
)
-export const isReclaimingName = (state: RootState, name: string) =>
- getLoading(state).some(loadingAction => loadingAction.type === CLAIM_NAME_REQUEST && loadingAction.name === name)
+export const isReclaimingName = (state: RootState, subdomain: string) =>
+ getLoading(state).some(loadingAction => loadingAction.type === RECLAIM_NAME_REQUEST && loadingAction.payload.ens.subdomain === subdomain)
export const isLoadingContentBySubdomain = createSelector>(
getENSList,
diff --git a/src/modules/translation/languages/en.json b/src/modules/translation/languages/en.json
index f3a9c044e..3b69b4ede 100644
--- a/src/modules/translation/languages/en.json
+++ b/src/modules/translation/languages/en.json
@@ -578,9 +578,9 @@
"subtitle": "Your are editing {name}."
},
"ens_list_page": {
- "title": "NAMEs",
+ "title": "Your NAMEs",
"sort_by": "Sort by",
- "mint_name": "Mint name",
+ "mint_name": "Mint a New NAME",
"result": "{count} {count, plural, one {result} other {results}}",
"edit": "Edit",
"transfer": "Transfer",
@@ -588,52 +588,58 @@
"name": "Name",
"link": "Link",
"assigned_to": "Assigned To",
- "address": "Address",
- "alias": "Alias",
- "land": "Land",
+ "address": "Associated Address",
+ "alias": "Linked Avatar",
+ "land": "Linked LAND",
"actions": "Actions",
"you": "you"
},
+ "unclaimed": "Unclaimed",
"assigned_to_land": "Land ({landId})",
"assigned_to_estate": "Estate ({landId})",
"button": {
"assign": "Use as Link",
"edit": "Edit Link",
"use_as_alias": "Use as Alias",
- "add_to_avatar": "Add to Avatar",
- "link_to_address": "Link to an Ethereum Address",
- "assign_to_land": "Assign to Land or World"
+ "add_to_avatar": "Assign to Avatar",
+ "link_to_address": "Assign ETH address",
+ "assign_to_land": "Assign to Location",
+ "reclaim_land": "Reclaim to assign to location",
+ "reclaim_address": "Reclaim to assign ETH address"
},
"empty_names": "It looks like you don't have any Names.{br} {link} to get started.",
"items": "{count} {count, plural, one {result} other {results}}",
"alias_popup": "This name is being used by your profile but it can still be assigned",
"not_profile_created": "You need to get into the world first to set an alias.",
"empty_state": {
- "title": "Nothing here yet",
- "subtitle": "Own your presence in the metaverse with a username free from numbers on the end (e.g. Genesis#1234).",
- "mint_name": "Mint name",
- "go_to_marketplace": "Visit marketplace"
+ "title": "Nothing Here Yet",
+ "subtitle": "Own your presence in the metaverse with a username free from numbers on the end (e.g. Genesis#1234), plus enjoy the added benefits of Voting Power and access to your own World!",
+ "mint_name": "Claim Your Name"
}
},
"ens_detail_page": {
"name": "Name",
- "address": "Address",
- "alias": "Alias",
- "land": "Land",
- "unassign": "Unassigned",
- "set_as_primary": "Set as primary",
+ "address": "Associated Address",
+ "alias": "Linked Avatar",
+ "land": "Linked LAND",
+ "unassign": "Assign to Avatar",
+ "set_as_primary": "Assign to Avatar",
"edit_address": "Edit address",
- "assign_address": "Assign address value",
- "point_location": "Point location",
+ "assign_address": "Assign ETH address",
+ "point_location": "Assign to Location",
"tooltips": {
- "alias": "The assigned alias can be only one per Avatar",
- "address": "It can be used in external in any WEB3 transaction. Read the benefits of a ENS controller NAME",
- "land": "Lands are Located spacial Assets, minimum units are Parcels, learn more about Metaverse advantages"
- }
+ "alias": "You can only assign one NAME per avatar",
+ "address": "Use your Decentraland NAME across Web3 thanks to a partnership with ENS.",
+ "land": "When you assign a LAND parcel or estate a NAME it can be easily navigated to with a dedicated URL (e.g. https://name.dcl.eth)."
+ },
+ "unclaimed": "Unclaimed",
+ "reclaim_name": "Reclaim name",
+ "reclaim_for_location": "Reclaim to assign location",
+ "reclaim_for_address": "Reclaim to assign address"
},
"ens_map_address_modal": {
- "title": "Link to an Ethereum Address",
- "description": "Enable others to reference your account by defining an Ethereum address with your Decentraland NAME. This allows you to receive assets simply by providing your NAME.",
+ "title": "Assigned Address",
+ "description": "Enable others to reference your account by assigning an Ethereum address to your Decentraland NAME. This allows you to receive assets simply by providing your NAME.",
"address": {
"label": "Linked Ethereum Address",
"placeholder": "Address"
@@ -647,11 +653,19 @@
"title": "Grant Permission",
"info": "Enable others to reference your account by defining an Ethereum address with your Decentraland NAME.
This allows you to receive assets simply by providing your NAME. Authorize the public ENS resolver to set the address record on your behalf in Decentraland.",
"action": "Authorize",
- "error": "Something went wrong"
+ "error": "Something went wrong, please try again."
},
"confirm_transaction": "Confirm the transaction...",
"processing": "Processing..."
},
+ "ens_reclaim_name_modal": {
+ "title": "Reclaim name",
+ "info": "This reclaims control of your NAME after it has been transferred to you.",
+ "action": "Reclaim",
+ "confirm_transaction": "Confirm the transaction...",
+ "processing": "Processing...",
+ "error": "Something went wrong, please try again."
+ },
"worlds_list_page": {
"table": {
"name": "NAME",
@@ -1053,9 +1067,7 @@
"land_assign_ens_page": {
"title": "Use {name} as link",
"subtitle": "This link will take you to {land}",
- "set_name_message": "Before you can assign this name to your land, you need to submit 2 or 3 transactions: The first transaction reclaims your ENS name so you become its controller and it's only required if the name was bought or transferred from another user, the second one allows you to use your name as a link and the third transaction links your name to your LAND.",
- "reclaim": "Reclaim",
- "reclaim_explanation": "This reclaims the control of your name after it has been transferred to you. The owner of the name has the control over it until it gets reclaimed.",
+ "set_name_message": "Before you can assign this name to your land, you need to submit 1 or 2 transactions: The first transaction allows you to use your name as a link and the second transaction links your name to your LAND.",
"set_resolver": "Set Resolver",
"set_resolver_explanation": "This allows your name to be linked to a land.",
"set_content": "Set Content",
diff --git a/src/modules/translation/languages/es.json b/src/modules/translation/languages/es.json
index 760248271..95378d8db 100644
--- a/src/modules/translation/languages/es.json
+++ b/src/modules/translation/languages/es.json
@@ -580,9 +580,9 @@
"unpublish_needed": "Por favor Despublica tu Escena antes de actualizar los detalles de la misma"
},
"ens_list_page": {
- "title": "Nombres",
+ "title": "Tus Nombres",
"sort_by": "Ordernar por",
- "mint_name": "Comprar nombre",
+ "mint_name": "Comprar un nuevo nombre",
"result": "{count} {count, plural, one {resultado} other {resultados}}",
"edit": "Editar",
"transfer": "Transferir",
@@ -590,31 +590,33 @@
"name": "Nombre",
"link": "Enlace",
"assigned_to": "Asignado a",
- "address": "Dirección",
- "alias": "alias",
- "land": "Tierra",
+ "address": "Dirección asociada",
+ "alias": "Alias vinculado",
+ "land": "Tierra vinculada",
"actions": "Acciones",
"you": "tú"
},
+ "unclaimed": "No recuperado",
"assigned_to_land": "Tierra ({landId})",
"assigned_to_estate": "Estate ({landId})",
"button": {
"assign": "Usar como link",
"edit": "Editar link",
"use_as_alias": "Usar como alias",
- "add_to_avatar": "Agregar a Avatar",
- "link_to_address": "Enlazar a una dirección de Ethereum",
- "assign_to_land": "Asignar a tierra o mundo"
+ "add_to_avatar": "Asignar a Avatar",
+ "link_to_address": "Asignar a una dirección de Ethereum",
+ "assign_to_land": "Asignar a ubicación",
+ "reclaim_land": "Recuperar para asignar a ubicación",
+ "reclaim_address": "Recuperar para asigner a dirección de ETH"
},
"empty_names": "No tienes ningun nombre aún.{br} {link} para comenzar.",
"items": "{count} {count, plural, one {resultado} other {resultados}}",
"alias_popup": "Este nombre está siendo usado por tu perfil pero igual puede ser asignado",
"not_profile_created": "Primero necesitas entrar en el mundo antes de asignar un alias.",
"empty_state": {
- "title": "Nada aquí todavía",
- "subtitle": "Tenga presencia en el Metaverso con un nombre de usuario libre de números al final (e.j. Genesis#1234).",
- "mint_name": "Agregar nombre",
- "go_to_marketplace": "Visitar el marketplace"
+ "title": "Nada Aquí Todavía",
+ "subtitle": "¡Posee su presencia en el metalto con un nombre de usuario libre de números al final (por ejemplo, Génesis#1234), además de disfrutar de los beneficios adicionales del poder de votación y el acceso a su propio mundo!",
+ "mint_name": "Comprar un nuevo nombre"
}
},
"ens_detail_page": {
@@ -631,7 +633,11 @@
"alias": "El alias asignado puede ser solo uno por avatar",
"address": "Se puede usar externamente en cualquier transacción Web3. Leer los beneficios de ENS",
"land": "Las tierras son activos espaciales, las unidades mínimas son parcelas, leer mas sobre los beneficios del Metaverso"
- }
+ },
+ "unclaimed": "Sin recuperar",
+ "reclaim_name": "Recuperar nombre",
+ "reclaim_for_location": "Recuperar para asignar a ubicación",
+ "reclaim_for_address": "Recuperar para asigner a dirección de ETH"
},
"ens_map_address_modal": {
"title": "Enlace a una dirección de Ethereum",
@@ -649,11 +655,19 @@
"title": "Conceder permiso",
"info": "Permitir que otros hagan referencia a su cuenta definiendo una dirección de Ethereum con su nombre Decentraland.