Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.20.1 #1122

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ HYPELAB_ADS_WINDOW_URL=
PERSONA_ADS_API_KEY=
PERSONA_ADS_BANNER_UNIT_ID=
PERSONA_ADS_WIDE_BANNER_UNIT_ID=
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID=
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID=
1 change: 1 addition & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
PERSONA_ADS_API_KEY: ${{ vars.PERSONA_ADS_API_KEY }}
PERSONA_ADS_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_BANNER_UNIT_ID }}
PERSONA_ADS_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}

- name: Install dependencies and code quality check
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manual-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
PERSONA_ADS_API_KEY: ${{ vars.PERSONA_ADS_API_KEY }}
PERSONA_ADS_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_BANNER_UNIT_ID }}
PERSONA_ADS_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}
# [e2e]
DEFAULT_HD_ACCOUNT_SEED_PHRASE: ${{ secrets.DEFAULT_HD_ACCOUNT_SEED_PHRASE }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
PERSONA_ADS_API_KEY: ${{ vars.PERSONA_ADS_API_KEY }}
PERSONA_ADS_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_BANNER_UNIT_ID }}
PERSONA_ADS_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}

- name: Install dependencies and code quality
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/secrets-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ inputs:
required: true
PERSONA_ADS_WIDE_BANNER_UNIT_ID:
required: true
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID:
required: true
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID:
required: true
# [e2e]
Expand Down Expand Up @@ -129,6 +131,7 @@ runs:
PERSONA_ADS_API_KEY=${{ inputs.PERSONA_ADS_API_KEY }}
PERSONA_ADS_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_BANNER_UNIT_ID }}
PERSONA_ADS_WIDE_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}

TEMPLE_WALLET_DEVELOPMENT_BRANCH_NAME=${{ github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "temple-wallet",
"version": "1.20.0",
"version": "1.20.1",
"private": true,
"scripts": {
"start-run": "cross-env TS_NODE_PROJECT=\"webpack/tsconfig.json\" webpack --watch --stats errors-warnings",
Expand Down
14 changes: 14 additions & 0 deletions src/content-scripts/replace-ads/ads-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ export const BANNER_ADS_META: AdMetadata[] = [
maxContainerHeight: 110
}
},
{
source: {
providerName: 'Persona',
shape: 'medium'
},
dimensions: {
width: 600,
height: 160,
minContainerWidth: 500,
minContainerHeight: 80,
maxContainerWidth: 800,
maxContainerHeight: 220
}
},
{
source: {
providerName: 'HypeLab',
Expand Down
4 changes: 4 additions & 0 deletions src/content-scripts/replace-ads/persona-ad.iframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const getUnitId = (shape: PersonaAdShape, isStaging: boolean) => {
switch (shape) {
case 'wide':
return '3a094192-4c7b-4761-a50c-bd9b6a67e987';
case 'medium':
return 'cf20c750-2fe4-4761-861f-b73b2247fd4d';
case 'squarish':
return 'bf498e26-eb16-4e35-8954-e65690f28819';
default:
Expand All @@ -49,6 +51,8 @@ const getUnitId = (shape: PersonaAdShape, isStaging: boolean) => {
switch (shape) {
case 'wide':
return EnvVars.PERSONA_ADS_WIDE_BANNER_UNIT_ID;
case 'medium':
return EnvVars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID;
case 'squarish':
return EnvVars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID;
default:
Expand Down
1 change: 1 addition & 0 deletions src/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ export const EnvVars = {
PERSONA_ADS_API_KEY: process.env.PERSONA_ADS_API_KEY!,
PERSONA_ADS_BANNER_UNIT_ID: process.env.PERSONA_ADS_BANNER_UNIT_ID!,
PERSONA_ADS_WIDE_BANNER_UNIT_ID: process.env.PERSONA_ADS_WIDE_BANNER_UNIT_ID!,
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: process.env.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID!,
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: process.env.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID!
} as const;
3 changes: 0 additions & 3 deletions src/replaceAds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,7 @@ if (window.frameElement === null) {
fetchFromStorage<boolean>(WEBSITES_ANALYTICS_ENABLED).then(enabled => {
if (enabled) {
// Replace ads with ours
window.addEventListener('load', () => replaceAds());
window.addEventListener('ready', () => replaceAds());
setInterval(() => replaceAds(), 1000);
replaceAds();
}
});
}
Loading