Skip to content

Commit

Permalink
TW-1491: Support Mises browser (#1167)
Browse files Browse the repository at this point in the history
Merge pull request #1172 from madfish-solutions/TW-1491-epic-mises-integration
  • Loading branch information
alex-tsx authored Aug 5, 2024
2 parents d0165a0 + 6913593 commit dbe43f8
Show file tree
Hide file tree
Showing 39 changed files with 611 additions and 225 deletions.
9 changes: 9 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ TEMPLE_WALLET_UTORG_SID=

TEMPLE_WALLET_API_URL=https://temple-api-mainnet.prod.templewallet.com
TEMPLE_WALLET_DEXES_API_URL=wss://dexes-api-mainnet.prod.templewallet.com
TEMPLE_ADS_API_URL=

TEMPLE_WALLET_ROUTE3_AUTH_TOKEN=
TEMPLE_WALLET_MOONPAY_API_KEY=
Expand All @@ -16,17 +17,25 @@ TEMPLE_FIREBASE_CONFIG=
TEMPLE_FIREBASE_MESSAGING_VAPID_KEY=

HYPELAB_API_URL=
HYPELAB_MISES_SMALL_PLACEMENT_SLUG=
HYPELAB_SMALL_PLACEMENT_SLUG=
HYPELAB_MISES_HIGH_PLACEMENT_SLUG=
HYPELAB_HIGH_PLACEMENT_SLUG=
HYPELAB_MISES_WIDE_PLACEMENT_SLUG=
HYPELAB_WIDE_PLACEMENT_SLUG=
HYPELAB_MISES_NATIVE_PLACEMENT_SLUG=
HYPELAB_NATIVE_PLACEMENT_SLUG=
HYPELAB_PROPERTY_SLUG=
HYPELAB_ADS_WINDOW_URL=

PERSONA_ADS_API_KEY=
PERSONA_ADS_MISES_BANNER_UNIT_ID=
PERSONA_ADS_BANNER_UNIT_ID=
PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID=
PERSONA_ADS_WIDE_BANNER_UNIT_ID=
PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID=
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID=
PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID=
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID=

TEMPLE_ADS_ORIGIN_PASSPHRASE=
10 changes: 10 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- development
- 'TW-[0-9]+-epic-**'

jobs:
pull-request-check:
Expand All @@ -31,21 +32,30 @@ jobs:
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}
TEMPLE_WALLET_API_URL: ${{ vars.TEMPLE_WALLET_API_URL }}
TEMPLE_WALLET_DEXES_API_URL: ${{ vars.TEMPLE_WALLET_DEXES_API_URL }}
TEMPLE_ADS_API_URL: ${{ vars.TEMPLE_ADS_API_URL }}
TEMPLE_WALLET_ROUTE3_AUTH_TOKEN: ${{ vars.TEMPLE_WALLET_ROUTE3_AUTH_TOKEN }}
TEMPLE_WALLET_MOONPAY_API_KEY: ${{ secrets.TEMPLE_WALLET_MOONPAY_API_KEY }}
TEMPLE_FIREBASE_CONFIG: ${{ secrets.TEMPLE_FIREBASE_CONFIG }}
TEMPLE_FIREBASE_MESSAGING_VAPID_KEY: ${{ secrets.TEMPLE_FIREBASE_MESSAGING_VAPID_KEY }}
HYPELAB_API_URL: ${{ vars.HYPELAB_API_URL }}
HYPELAB_MISES_SMALL_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_SMALL_PLACEMENT_SLUG }}
HYPELAB_SMALL_PLACEMENT_SLUG: ${{ vars.HYPELAB_SMALL_PLACEMENT_SLUG }}
HYPELAB_MISES_HIGH_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_HIGH_PLACEMENT_SLUG }}
HYPELAB_HIGH_PLACEMENT_SLUG: ${{ vars.HYPELAB_HIGH_PLACEMENT_SLUG }}
HYPELAB_MISES_WIDE_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_WIDE_PLACEMENT_SLUG }}
HYPELAB_WIDE_PLACEMENT_SLUG: ${{ vars.HYPELAB_WIDE_PLACEMENT_SLUG }}
HYPELAB_MISES_NATIVE_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_NATIVE_PLACEMENT_SLUG }}
HYPELAB_NATIVE_PLACEMENT_SLUG: ${{ vars.HYPELAB_NATIVE_PLACEMENT_SLUG }}
HYPELAB_PROPERTY_SLUG: ${{ vars.HYPELAB_PROPERTY_SLUG }}
HYPELAB_ADS_WINDOW_URL: ${{ vars.HYPELAB_ADS_WINDOW_URL }}
PERSONA_ADS_API_KEY: ${{ vars.PERSONA_ADS_API_KEY }}
PERSONA_ADS_MISES_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_BANNER_UNIT_ID }}
PERSONA_ADS_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}
TEMPLE_ADS_ORIGIN_PASSPHRASE: ${{ vars.TEMPLE_ADS_ORIGIN_PASSPHRASE }}
CONVERSION_VERIFICATION_URL: ${{ vars.CONVERSION_VERIFICATION_URL }}
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/manual-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,30 @@ jobs:
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}
TEMPLE_WALLET_API_URL: ${{ vars.TEMPLE_WALLET_API_URL }}
TEMPLE_WALLET_DEXES_API_URL: ${{ vars.TEMPLE_WALLET_DEXES_API_URL }}
TEMPLE_ADS_API_URL: ${{ vars.TEMPLE_ADS_API_URL }}
TEMPLE_WALLET_ROUTE3_AUTH_TOKEN: ${{ vars.TEMPLE_WALLET_ROUTE3_AUTH_TOKEN }}
TEMPLE_WALLET_MOONPAY_API_KEY: ${{ secrets.TEMPLE_WALLET_MOONPAY_API_KEY }}
TEMPLE_FIREBASE_CONFIG: ${{ secrets.TEMPLE_FIREBASE_CONFIG }}
TEMPLE_FIREBASE_MESSAGING_VAPID_KEY: ${{ secrets.TEMPLE_FIREBASE_MESSAGING_VAPID_KEY }}
HYPELAB_API_URL: ${{ vars.HYPELAB_API_URL }}
HYPELAB_MISES_SMALL_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_SMALL_PLACEMENT_SLUG }}
HYPELAB_SMALL_PLACEMENT_SLUG: ${{ vars.HYPELAB_SMALL_PLACEMENT_SLUG }}
HYPELAB_MISES_HIGH_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_HIGH_PLACEMENT_SLUG }}
HYPELAB_HIGH_PLACEMENT_SLUG: ${{ vars.HYPELAB_HIGH_PLACEMENT_SLUG }}
HYPELAB_MISES_WIDE_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_WIDE_PLACEMENT_SLUG }}
HYPELAB_WIDE_PLACEMENT_SLUG: ${{ vars.HYPELAB_WIDE_PLACEMENT_SLUG }}
HYPELAB_MISES_NATIVE_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_NATIVE_PLACEMENT_SLUG }}
HYPELAB_NATIVE_PLACEMENT_SLUG: ${{ vars.HYPELAB_NATIVE_PLACEMENT_SLUG }}
HYPELAB_PROPERTY_SLUG: ${{ vars.HYPELAB_PROPERTY_SLUG }}
HYPELAB_ADS_WINDOW_URL: ${{ vars.HYPELAB_ADS_WINDOW_URL }}
PERSONA_ADS_API_KEY: ${{ vars.PERSONA_ADS_API_KEY }}
PERSONA_ADS_MISES_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_BANNER_UNIT_ID }}
PERSONA_ADS_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}
TEMPLE_ADS_ORIGIN_PASSPHRASE: ${{ vars.TEMPLE_ADS_ORIGIN_PASSPHRASE }}
CONVERSION_VERIFICATION_URL: ${{ vars.CONVERSION_VERIFICATION_URL }}
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,30 @@ jobs:
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}
TEMPLE_WALLET_API_URL: ${{ vars.TEMPLE_WALLET_API_URL }}
TEMPLE_WALLET_DEXES_API_URL: ${{ vars.TEMPLE_WALLET_DEXES_API_URL }}
TEMPLE_ADS_API_URL: ${{ vars.TEMPLE_ADS_API_URL }}
TEMPLE_WALLET_ROUTE3_AUTH_TOKEN: ${{ vars.TEMPLE_WALLET_ROUTE3_AUTH_TOKEN }}
TEMPLE_WALLET_MOONPAY_API_KEY: ${{ secrets.TEMPLE_WALLET_MOONPAY_API_KEY }}
TEMPLE_FIREBASE_CONFIG: ${{ secrets.TEMPLE_FIREBASE_CONFIG }}
TEMPLE_FIREBASE_MESSAGING_VAPID_KEY: ${{ secrets.TEMPLE_FIREBASE_MESSAGING_VAPID_KEY }}
HYPELAB_API_URL: ${{ vars.HYPELAB_API_URL }}
HYPELAB_MISES_SMALL_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_SMALL_PLACEMENT_SLUG }}
HYPELAB_SMALL_PLACEMENT_SLUG: ${{ vars.HYPELAB_SMALL_PLACEMENT_SLUG }}
HYPELAB_MISES_HIGH_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_HIGH_PLACEMENT_SLUG }}
HYPELAB_HIGH_PLACEMENT_SLUG: ${{ vars.HYPELAB_HIGH_PLACEMENT_SLUG }}
HYPELAB_MISES_WIDE_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_WIDE_PLACEMENT_SLUG }}
HYPELAB_WIDE_PLACEMENT_SLUG: ${{ vars.HYPELAB_WIDE_PLACEMENT_SLUG }}
HYPELAB_MISES_NATIVE_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_NATIVE_PLACEMENT_SLUG }}
HYPELAB_NATIVE_PLACEMENT_SLUG: ${{ vars.HYPELAB_NATIVE_PLACEMENT_SLUG }}
HYPELAB_PROPERTY_SLUG: ${{ vars.HYPELAB_PROPERTY_SLUG }}
HYPELAB_ADS_WINDOW_URL: ${{ vars.HYPELAB_ADS_WINDOW_URL }}
PERSONA_ADS_API_KEY: ${{ vars.PERSONA_ADS_API_KEY }}
PERSONA_ADS_MISES_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_BANNER_UNIT_ID }}
PERSONA_ADS_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}
TEMPLE_ADS_ORIGIN_PASSPHRASE: ${{ vars.TEMPLE_ADS_ORIGIN_PASSPHRASE }}
CONVERSION_VERIFICATION_URL: ${{ vars.CONVERSION_VERIFICATION_URL }}
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/secrets-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ inputs:
required: true
TEMPLE_WALLET_DEXES_API_URL:
required: true
TEMPLE_ADS_API_URL:
required: true
TEMPLE_FIREBASE_CONFIG:
required: true
TEMPLE_FIREBASE_MESSAGING_VAPID_KEY:
Expand All @@ -33,12 +35,20 @@ inputs:
required: true
HYPELAB_API_URL:
required: true
HYPELAB_MISES_SMALL_PLACEMENT_SLUG:
required: true
HYPELAB_SMALL_PLACEMENT_SLUG:
required: true
HYPELAB_MISES_HIGH_PLACEMENT_SLUG:
required: true
HYPELAB_HIGH_PLACEMENT_SLUG:
required: true
HYPELAB_MISES_WIDE_PLACEMENT_SLUG:
required: true
HYPELAB_WIDE_PLACEMENT_SLUG:
required: true
HYPELAB_MISES_NATIVE_PLACEMENT_SLUG:
required: true
HYPELAB_NATIVE_PLACEMENT_SLUG:
required: true
HYPELAB_PROPERTY_SLUG:
Expand All @@ -47,12 +57,20 @@ inputs:
required: true
PERSONA_ADS_API_KEY:
required: true
PERSONA_ADS_MISES_BANNER_UNIT_ID:
required: true
PERSONA_ADS_BANNER_UNIT_ID:
required: true
PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID:
required: true
PERSONA_ADS_WIDE_BANNER_UNIT_ID:
required: true
PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID:
required: true
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID:
required: true
PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID:
required: true
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID:
required: true
CONVERSION_VERIFICATION_URL:
Expand Down Expand Up @@ -123,23 +141,32 @@ runs:
TEMPLE_WALLET_API_URL=${{ inputs.TEMPLE_WALLET_API_URL }}
TEMPLE_WALLET_DEXES_API_URL=${{ inputs.TEMPLE_WALLET_DEXES_API_URL }}
TEMPLE_ADS_API_URL=${{ inputs.TEMPLE_ADS_API_URL }}
TEMPLE_WALLET_ROUTE3_AUTH_TOKEN=${{ inputs.TEMPLE_WALLET_ROUTE3_AUTH_TOKEN }}
TEMPLE_WALLET_MOONPAY_API_KEY=${{ inputs.TEMPLE_WALLET_MOONPAY_API_KEY }}
TEMPLE_FIREBASE_CONFIG=${{ inputs.TEMPLE_FIREBASE_CONFIG }}
TEMPLE_FIREBASE_MESSAGING_VAPID_KEY=${{ inputs.TEMPLE_FIREBASE_MESSAGING_VAPID_KEY }}
HYPELAB_API_URL=${{ inputs.HYPELAB_API_URL }}
HYPELAB_MISES_SMALL_PLACEMENT_SLUG=${{ inputs.HYPELAB_MISES_SMALL_PLACEMENT_SLUG }}
HYPELAB_SMALL_PLACEMENT_SLUG=${{ inputs.HYPELAB_SMALL_PLACEMENT_SLUG }}
HYPELAB_MISES_HIGH_PLACEMENT_SLUG=${{ inputs.HYPELAB_MISES_HIGH_PLACEMENT_SLUG }}
HYPELAB_HIGH_PLACEMENT_SLUG=${{ inputs.HYPELAB_HIGH_PLACEMENT_SLUG }}
HYPELAB_MISES_WIDE_PLACEMENT_SLUG=${{ inputs.HYPELAB_MISES_WIDE_PLACEMENT_SLUG }}
HYPELAB_WIDE_PLACEMENT_SLUG=${{ inputs.HYPELAB_WIDE_PLACEMENT_SLUG }}
HYPELAB_MISES_NATIVE_PLACEMENT_SLUG=${{ inputs.HYPELAB_MISES_NATIVE_PLACEMENT_SLUG }}
HYPELAB_NATIVE_PLACEMENT_SLUG=${{ inputs.HYPELAB_NATIVE_PLACEMENT_SLUG }}
HYPELAB_PROPERTY_SLUG=${{ inputs.HYPELAB_PROPERTY_SLUG }}
HYPELAB_ADS_WINDOW_URL=${{ inputs.HYPELAB_ADS_WINDOW_URL }}
PERSONA_ADS_API_KEY=${{ inputs.PERSONA_ADS_API_KEY }}
PERSONA_ADS_MISES_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_MISES_BANNER_UNIT_ID }}
PERSONA_ADS_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_WIDE_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}
TEMPLE_ADS_ORIGIN_PASSPHRASE=${{ inputs.TEMPLE_ADS_ORIGIN_PASSPHRASE }}
CONVERSION_VERIFICATION_URL=${{ inputs.CONVERSION_VERIFICATION_URL }}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "temple-wallet",
"version": "1.23.1",
"version": "1.23.2",
"private": true,
"scripts": {
"start-run": "cross-env TS_NODE_PROJECT=\"webpack/tsconfig.json\" webpack --watch --stats errors-warnings",
Expand Down Expand Up @@ -232,6 +232,6 @@
"follow-redirects": "^1.15.4"
},
"optionalDependencies": {
"@temple-wallet/extension-ads": "^6.3.2"
"@temple-wallet/extension-ads": "^7.1.0"
}
}
Binary file added public/misc/ad-banners/small-tkey-inpage-ad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/app/WithDataLoading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { dispatch } from 'app/store';
import { loadTokensScamlistActions } from 'app/store/assets/actions';
import { loadSwapDexesAction, loadSwapTokensAction } from 'app/store/swap/actions';

import { useAdsImpressionsLinking } from './hooks/use-ads-impressions-linking';
import { useAdvertisingLoading } from './hooks/use-advertising.hook';
import { useAssetsLoading } from './hooks/use-assets-loading';
import { useAssetsMigrations } from './hooks/use-assets-migrations';
Expand Down Expand Up @@ -42,6 +43,7 @@ export const WithDataLoading: FC<PropsWithChildren> = ({ children }) => {
useStorageAnalytics();
useConversionTracking();
useUserIdAccountPkhSync();
useAdsImpressionsLinking();

return <>{children}</>;
};
2 changes: 1 addition & 1 deletion src/app/atoms/AccountTypeBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const AccountTypeBadge = memo<AccountTypeBadgeProps>(({ account, darkTheme = fal
return title ? (
<span
className={clsx(
'rounded border px-1 py-px ml-2 leading-none font-medium',
'rounded border px-1 py-px leading-none font-medium',
darkTheme ? 'border-gray-500 text-gray-500' : 'border-black text-black'
)}
style={{ fontSize: '0.44rem' }}
Expand Down
18 changes: 18 additions & 0 deletions src/app/hooks/use-ads-impressions-linking.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { dispatch } from 'app/store';
import { setAdsImpressionsLinkedAction } from 'app/store/settings/actions';
import { useIsAdsImpressionsLinkedSelector } from 'app/store/settings/selectors';
import { performLinkingOfAdsImpressions } from 'lib/ads/link-ads-impressions';
import { useDidMount } from 'lib/ui/hooks';

import { useAdsViewerPkh } from './use-ads-viewer-pkh';

export const useAdsImpressionsLinking = () => {
const linked = useIsAdsImpressionsLinkedSelector();
const accountPkh = useAdsViewerPkh();

useDidMount(() => {
if (linked) return;

performLinkingOfAdsImpressions(accountPkh).then(() => void dispatch(setAdsImpressionsLinkedAction()));
});
};
9 changes: 8 additions & 1 deletion src/app/layouts/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import ContentContainer from 'app/layouts/ContentContainer';
import { useOnboardingProgress } from 'app/pages/Onboarding/hooks/useOnboardingProgress.hook';
import { AdvertisingBanner } from 'app/templates/advertising/advertising-banner/advertising-banner';
import { AdvertisingOverlay } from 'app/templates/advertising/advertising-overlay/advertising-overlay';
import { IS_MISES_BROWSER } from 'lib/env';
import { T } from 'lib/i18n';
import { NotificationsBell } from 'lib/notifications/components/bell';
import { useTempleClient } from 'lib/temple/front';
Expand All @@ -47,7 +48,13 @@ const PageLayout: FC<PageLayoutProps> = ({ children, contentContainerStyle, ...t

return (
<>
<DocBg bgClassName="bg-primary-orange" />
{
/*
Mises browser has an issue with <html>'s height - not reaching 100% no matter what CSS,
unless it is expanded by content. We at least won't color it to not highlight that.
*/
!IS_MISES_BROWSER && <DocBg bgClassName="bg-primary-orange" />
}

<div className={clsx(fullPage && 'pb-20', 'relative')}>
<Header />
Expand Down
7 changes: 1 addition & 6 deletions src/app/layouts/PageLayout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ const Control: FC = () => {
<NetworkSelect />
</div>

<Popper
placement="left-start"
strategy="fixed"
style={{ pointerEvents: 'none' }}
popup={props => <AccountDropdown {...props} />}
>
<Popper placement="bottom-end" strategy="fixed" popup={props => <AccountDropdown {...props} />}>
{({ ref, opened, toggleOpened }) => (
<Button
ref={ref}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const AccountItem: React.FC<AccountItemProps> = ({ account, selected, gas
const classNameMemo = useMemo(
() =>
classNames(
'block w-full p-2 flex items-center',
'w-full p-2 flex items-center',
'text-white text-shadow-black overflow-hidden',
'transition ease-in-out duration-200',
selected && 'shadow',
Expand Down Expand Up @@ -58,7 +58,7 @@ export const AccountItem: React.FC<AccountItemProps> = ({ account, selected, gas
<HashShortView hash={publicKeyHash} />
</div>

<div className="flex flex-wrap items-center">
<div className="flex flex-wrap items-center gap-x-2 gap-y-1">
<Balance address={publicKeyHash}>
{bal => (
<span className="text-xs leading-tight flex items-baseline text-gray-500">
Expand Down
10 changes: 1 addition & 9 deletions src/app/layouts/PageLayout/Header/AccountDropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,7 @@ const AccountDropdown: FC<AccountDropdownProps> = ({ opened, setOpened }) => {
}, [opened, searchValue]);

return (
<DropdownWrapper
opened={opened}
design="dark"
className="origin-top-right p-2 w-64"
style={{
transform: 'translate(3.25rem, 3.25rem)',
pointerEvents: 'all'
}}
>
<DropdownWrapper opened={opened} design="dark" className="origin-top-right p-2 w-64">
<div className="flex items-center mb-2">
<h3 className="flex items-center text-sm text-white opacity-20">
<T id="accounts" />
Expand Down
Loading

0 comments on commit dbe43f8

Please sign in to comment.