diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 89e80e5d8..95a65923b 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -7795,6 +7795,11 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.0.tgz", "integrity": "sha512-jfT7iTf/4kOQ9S7CHV9BIyRaQqHu67mOjsIQBC3BKZvzvUB6zLxEwJ6sBE3ozcvP8kF6Uk5PXN0Q+c0dfhGX0g==" }, + "node_modules/@wert-io/widget-initializer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@wert-io/widget-initializer/-/widget-initializer-5.2.0.tgz", + "integrity": "sha512-Rs9XLeFtvWtZGg9kOVvMZ+PpRxFconMFox6fGQO9psET1B29bBNO6sifOeNzxQ5pMVVbLiK2ZQD5w194sqrB3A==" + }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", diff --git a/webapp/package.json b/webapp/package.json index a48902b36..2f8b18275 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -125,4 +125,4 @@ "@walletconnect/core": "2.9.2", "@walletconnect/keyvaluestorage": "1.0.0" } -} +} \ No newline at end of file diff --git a/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.tsx b/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.tsx index da9ddebe9..e739fe38f 100644 --- a/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.tsx +++ b/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.tsx @@ -25,10 +25,7 @@ import { PRICE_IN_WEI, isEnoughClaimMana } from '../../../modules/ens/utils' -import { - MARKETPLACE_SERVER_URL, - marketplaceAPI -} from '../../../modules/vendor/decentraland/marketplace/api' +import { MARKETPLACE_SERVER_URL } from '../../../modules/vendor/decentraland/marketplace/api' import { DCLController__factory } from '../../../contracts/factories/DCLController__factory' import { Mana } from '../../Mana' import { Props } from './ClaimNameFatFingerModal.types' diff --git a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.container.tsx b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.container.tsx index ff0b1ee36..be0d7f5f1 100644 --- a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.container.tsx +++ b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.container.tsx @@ -1,15 +1,11 @@ import { connect } from 'react-redux' import { push, replace } from 'connected-react-router' -import { ChainId } from '@dcl/schemas' -import { AuthIdentity } from 'decentraland-crypto-fetch' import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { isConnecting } from 'decentraland-dapps/dist/modules/wallet/selectors' import { getWallet } from '../../../modules/wallet/selectors' import { locations } from '../../../modules/routing/locations' import { Section } from '../../../modules/vendor/decentraland' import { BrowseOptions } from '../../../modules/routing/types' -import { getCurrentIdentity } from '../../../modules/identity/selectors' -import { claimNameTransactionSubmitted } from '../../../modules/ens/actions' import { MapDispatch, MapDispatchProps, @@ -20,8 +16,7 @@ import ClaimNamePage from './ClaimNamePage' const mapState = (state: RootState): MapStateProps => ({ isConnecting: isConnecting(state), - wallet: getWallet(state), - identity: (getCurrentIdentity(state) as AuthIdentity | null) ?? undefined + wallet: getWallet(state) }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ @@ -29,15 +24,6 @@ const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ dispatch(push(locations.names({ ...options, section: Section.ENS }))), onClaim: (name: string) => dispatch(openModal('ClaimNameFatFingerModal', { name })), - onClaimTxSubmitted: ( - subdomain: string, - address: string, - chainId: ChainId, - txHash: string - ) => - dispatch( - claimNameTransactionSubmitted(subdomain, address, chainId, txHash) - ), onRedirect: path => dispatch(replace(path)) }) diff --git a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.spec.tsx b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.spec.tsx index 7f15a650a..d8dffa9f0 100644 --- a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.spec.tsx +++ b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.spec.tsx @@ -13,7 +13,6 @@ jest.mock('../../../modules/ens/utils', () => ({ describe('ClaimNamePage', () => { let walletMock: Wallet - let currentManaMock: number let onBrowseMock: Props['onBrowse'] let onClaimMock: Props['onClaim'] let onRedirectMock: Props['onRedirect'] @@ -21,7 +20,6 @@ describe('ClaimNamePage', () => { const renderAndTypeText = async (text: string) => { const matchers = renderWithProviders( { }) describe('and has enough funds to claim the NAME', () => { beforeEach(() => { - currentManaMock = 100 walletMock = {} as Wallet onClaimMock = jest.fn() }) @@ -123,7 +120,6 @@ describe('ClaimNamePage', () => { }) describe('and does not have enough funds to claim the NAME', () => { beforeEach(() => { - currentManaMock = 99 // 100 is the mana needed walletMock = {} as Wallet onClaimMock = jest.fn() }) diff --git a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.types.ts b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.types.ts index 4f3136373..c0d93fc29 100644 --- a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.types.ts +++ b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.types.ts @@ -1,34 +1,23 @@ import { Dispatch } from 'redux' import { CallHistoryMethodAction } from 'connected-react-router' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' -import { AuthIdentity } from 'decentraland-crypto-fetch' import { OpenModalAction, openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { BrowseOptions } from '../../../modules/routing/types' -import { - ClaimNameTransactionSubmittedAction, - claimNameTransactionSubmitted -} from '../../../modules/ens/actions' export type Props = { wallet: Wallet | null isConnecting: boolean - identity: AuthIdentity | undefined - onClaimTxSubmitted: typeof claimNameTransactionSubmitted onBrowse: (options?: BrowseOptions) => void onClaim: typeof openModal onRedirect: (path: string) => void } -export type MapStateProps = Pick +export type MapStateProps = Pick export type MapDispatchProps = Pick< Props, - 'onBrowse' | 'onClaim' | 'onRedirect' | 'onClaimTxSubmitted' -> -export type MapDispatch = Dispatch< - | CallHistoryMethodAction - | OpenModalAction - | ClaimNameTransactionSubmittedAction + 'onBrowse' | 'onClaim' | 'onRedirect' > +export type MapDispatch = Dispatch diff --git a/webapp/src/modules/sagas.ts b/webapp/src/modules/sagas.ts index 5d2e5a546..46df2cdfc 100644 --- a/webapp/src/modules/sagas.ts +++ b/webapp/src/modules/sagas.ts @@ -2,6 +2,7 @@ import { all } from 'redux-saga/effects' import { AuthIdentity } from 'decentraland-crypto-fetch' import { ApplicationName } from 'decentraland-dapps/dist/modules/features/types' import { authorizationSaga } from 'decentraland-dapps/dist/modules/authorization/sagas' +import { FiatGateway } from 'decentraland-dapps/dist/modules/gateway/types' import { createAnalyticsSaga } from 'decentraland-dapps/dist/modules/analytics/sagas' import { createProfileSaga } from 'decentraland-dapps/dist/modules/profile/sagas' import { transactionSaga } from 'decentraland-dapps/dist/modules/transaction/sagas' @@ -55,6 +56,10 @@ const contentClient = createContentClient({ }) const gatewaySaga = createGatewaySaga({ + [FiatGateway.WERT]: { + marketplaceServerURL: config.get('MARKETPLACE_SERVER_URL'), + url: config.get('WERT_API_URL') + }, [NetworkGatewayType.MOON_PAY]: { apiBaseUrl: config.get('MOON_PAY_API_URL'), apiKey: config.get('MOON_PAY_API_KEY'),