Skip to content

Commit

Permalink
fix: Auto-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio committed Mar 8, 2024
1 parent e5f1e62 commit 29c54d2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 50 deletions.
2 changes: 1 addition & 1 deletion webapp/src/components/Modals/BuyWithCryptoModal/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const useCrossChainBuyNftRoute = (
providerTokens: Token[],
crossChainProvider: CrossChainProvider | undefined,
wallet: Wallet | null,
slippage: number,
slippage: number
): CrossChainRoute => {
const getBuyNftRoute = useCallback(
(fromAddress, fromAmount, fromChain, fromToken, crossChainProvider) =>
Expand Down
20 changes: 4 additions & 16 deletions webapp/src/components/SuccessPage/SuccessPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,28 +159,16 @@ export function SuccessPage(props: Props) {
</div>
)}
</div>
) : asset.category === NFTCategory.PARCEL ||
asset.category === NFTCategory.ESTATE ? (
) : asset.category === NFTCategory.PARCEL || asset.category === NFTCategory.ESTATE ? (
<div className={styles.ensActions}>
<div className={styles.primaryEnsActions}>
<Button
as={Link}
className={styles.successButton}
secondary
to={locations.nft(contractAddress, tokenId)}
>
<Button as={Link} className={styles.successButton} secondary to={locations.nft(contractAddress, tokenId)}>
{t('success_page.success_state.manage_land')}
</Button>
{!!profile && (
<>
<Button
className={styles.successButton}
primary
href={BUILDER_URL + '/scenes'}
>
{t(
'success_page.success_state.start_building'
)}
<Button className={styles.successButton} primary href={BUILDER_URL + '/scenes'}>
{t('success_page.success_state.start_building')}
</Button>
</>
)}
Expand Down
49 changes: 21 additions & 28 deletions webapp/src/modules/analytics/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,34 +241,27 @@ track<BuyItemSuccessAction>(BUY_ITEM_SUCCESS, events.BUY_ITEM, ({ payload }) =>
fromChainId: payload.chainId
}))

track<BuyItemCrossChainSuccessAction>(
BUY_ITEM_CROSS_CHAIN_SUCCESS,
events.BUY_ITEM_CROSS_CHAIN,
({ payload }) => {
const {
route: { route },
item,
order,
txHash
} = payload
return {
fromAmount: ethers.utils.formatUnits(
route.estimate.fromAmount,
route.estimate.fromToken.decimals
),
fromTokenName: route.estimate.fromToken.name,
fromToken: route.params.fromToken,
fromChain: route.params.fromChain,
itemId: item.itemId,
contractAddress: item.contractAddress,
rarity: item.rarity,
network: item.network,
chainId: item.chainId,
price: Number(ethers.utils.formatEther(order?.price ?? item.price)),
data: item.data,
txHash,
category: item.category
}
track<BuyItemCrossChainSuccessAction>(BUY_ITEM_CROSS_CHAIN_SUCCESS, events.BUY_ITEM_CROSS_CHAIN, ({ payload }) => {
const {
route: { route },
item,
order,
txHash
} = payload
return {
fromAmount: ethers.utils.formatUnits(route.estimate.fromAmount, route.estimate.fromToken.decimals),
fromTokenName: route.estimate.fromToken.name,
fromToken: route.params.fromToken,
fromChain: route.params.fromChain,
itemId: item.itemId,
contractAddress: item.contractAddress,
rarity: item.rarity,
network: item.network,
chainId: item.chainId,
price: Number(ethers.utils.formatEther(order?.price ?? item.price)),
data: item.data,
txHash,
category: item.category
}
})

Expand Down
6 changes: 1 addition & 5 deletions webapp/src/modules/features/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ export const getIsChainSelectorEnabled = (state: RootState) => {

export const getIsLandCrossChainEnabled = (state: RootState) => {
if (hasLoadedInitialFlags(state)) {
return getIsFeatureEnabled(
state,
ApplicationName.MARKETPLACE,
FeatureName.CROSS_CHAIN_LANDS
)
return getIsFeatureEnabled(state, ApplicationName.MARKETPLACE, FeatureName.CROSS_CHAIN_LANDS)
}
return false
}

0 comments on commit 29c54d2

Please sign in to comment.