Skip to content

Commit

Permalink
1.16.2 (#846)
Browse files Browse the repository at this point in the history
* taquito version bump (#829)

* 15.5.5

* TW-391 Changed Skip Ad button on advertisement (#834)

* TW-320: Manifest v3 JSON (#807)

* TW-317: Abandon XMLHttpRequest in BG. Applied axios fetch adapter.

* TW-317: Abandon XMLHttpRequest in BG. Fix BG test

* TW-312: Eliminate 'window' reliance in BG script. Resolving 'regenerator-runtime' package version.

* TW-312: Eliminate 'window' in BG. Refactored 'is-lock-up' setting

* TW-312: Eliminate 'window' in BG. Refactored 'lock-up' feature for MV3

* TW-312: Eliminate 'window' in BG. Refactored 'locale' storing

* TW-312: Eliminate 'window' in BG. Refactored 'Vault.spawn'

* TW-312: Eliminate 'window' in BG. Refactored 'vault.ts>createLedgerSigner()'

* TW-312: Eliminate 'window' in BG. Eliminated LedgerSigner creation to foreground

* Merge branch 'development' into TW-312-eliminate-window-in-bg

* TW-312: Eliminate 'window' in BG. Refactor

* TW-320: Manifest v3 JSON. Edited manifest.json

* TW-312: Eliminate 'window' in BG. Fix for lost 'no-use-before-define' rule follow

* TW-312: Eliminate 'window' in BG. Fix: removed Intercom server instance from FG

* TW-312: Eliminate 'window' in BG. + IDs to TempleLedgerSignerProxy instances

* TW-312: Eliminate 'window' in BG. Refactor

* TW-317: Abandon XMLHttpRequest in BG. Merged from 'development' branch

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for ledger-bridge's <iframe> interraction

* WIP: TW-312: Eliminate 'window' in BG. Ledger rework. Ledger bridge written locally

* TW-312: Eliminate 'window' in BG. Ledger rework. Ledger bridge written locally

* WIP: TW-317: Abandon XMLHttpRequest in BG. Updated '@taquito/*' to v14.1.0

* TW-317: Abandon XMLHttpRequest in BG. ++ '@taquito/*'

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix. LedgerHQ updated

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix. LedgerHQ updated

* WIP: TW-320: Manifest v3 JSON. WebPack rework

* WIP: TW-320: Manifest v3 JSON. WebPack rework

* TW-320: Manifest v3 JSON. WebPack rework. Linted

* TW-320: Manifest v3 JSON. WebPack rework. Refactor

* TW-320: Manifest v3 JSON. WebPack rework. Clean-up fix.

* TW-320: Manifest v3 JSON. WebPack rework. TypeScript

* TW-320: Manifest v3 JSON. WebPack rework. package.json:version > manifest.json:version

* TW-319: Manifest v3. Keep v2 for Firefox

* TW-312: Eliminate 'window' in BG. Ledger rework. Dynamic import for ledger-bridge iframe module

* WIP: TW-310: Manifest v3. Fix disconnecting Intercom port

* TW-312: Eliminate 'window' in BG. Ledger rework. Refactor

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for 'ledger-live in popup window' case

* TW-312: Eliminate 'window' in BG. Ledger rework. Refactor

* TW-312: Eliminate 'window' in BG. Removed console.log

* TW-320: Manifest v3 JSON. WebPack rework. + Definition for 'process.env.MANIFEST_VERSION'

* TW-320: Manifest v3 JSON. WebPack rework. Fix for BG script path in MV2

* TW-320: Manifest v3 JSON. WebPack rework. Fix for BG script chunks

* TW-310: Manifest v3. Fix disconnecting Intercom port

* WIP: TW-310: Manifest v3. Prolong SW lifetime

* TW-310: Manifest v3. Prolong SW lifetime. + scripts/keepBackgroundWorkerAlive.js

* TW-310: Manifest v3. Prolong SW lifetime. Refactor

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for WebAuthn transport on MV2

* TW-320: Manifest v3 JSON. WebPack rework. + 'safari' vendor

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for Firefox multiple tabs on WebAuthn

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for duplicate 'ledgerlive://bridge' tabs opening

* Merge branch 'TW-312-eliminate-window-in-bg' into TW-320-manifest-v3

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for recurring Ledger Live bridge open fail

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for recurring Ledger Live bridge open fail

* TW-312: Eliminate 'window' in BG. Ledger rework. ++ ledger-live.utils

* TW-320: Manifest v3 JSON. Refactor

* TW-320: Manifest v3 JSON. Fix dev live reload

* TW-320: Manifest v3 JSON. WebPack rework. Refactor

* TW-320: Manifest v3 JSON. WebPack rework. Fix dev pages reloader

* TW-320: Manifest v3 JSON. WebPack rework. + Custom dev pages reloader

* TW-320: Manifest v3 JSON. WebPack rework. Exports in ES6

* TW-320: Manifest v3 JSON. WebPack rework. Refactor

* TW-320: Manifest v3 JSON. Keeping BG worker alive from extension pages too

* TW-320: Manifest v3 JSON. BG, Vault. + Saving session (password hash)

* TW-320: Manifest v3 JSON. Fix for 'lock-enabled' feature

* TW-320: Manifest v3 JSON. Refactor lib/temple/back/vault (#827)

* TW-320: Manifest v3 JSON. Not keeping BG worker alive (#831)

* TW-320: Manifest v3 JSON. Refactor

* TW-320: Manifest v3 JSON. + Reset of 'browser.sstorage.session'

* TW-320: Manifest v3 JSON. Fix for WASM file loading in BG worker

* TW-320: Manifest v3 JSON. Refactor

* TW-427: Data URI for assets' icons (#839)

* TW-427: Data URI for assets' icons. Support at add asset

* TW-427: Data URI for assets' icons. Support at displaying icons

* TW-427: Data URI for assets' icons. + Fix for decimals display in AssetInfo component

* TW-392 Improved search assets (#835)

* TW-392 Improved search assets

* TW-392 Deleted console.logs

* TW-392 Deleted console.logs

* TW-392 Filtered assets harder

* TW-382: Utorg buy. Rate & min-max correction (#823)

* TW-382: Utorg buy. Rate & min-max correction

* TW-382: Utorg buy. Rate & min-max correction. Made Currency.network optional

* TW-382: Utorg buy. Rate & min-max correction. + 'app/templates/TopUpInput'

* TW-382: Utorg buy. Rate & min-max correction. Rate loaded for no less then minAmount

* TW-382: Utorg buy. Rate & min-max correction. Fix Alice-Bob top-up rate value

* TW-382: Utorg buy. Rate & min-max correction. Refactor

* TW406+407: [e2e] Setup pupeeteer + 'Import existing wallet' test (#822)

* basicTest+pupeeteer

* link test id fixed

* duplicate page fix

* envs setup + import existing wallet test

* envs setup + import existing wallet test

* Merge branch 'development' into e2e-setup

* [e2e] Setup. Refactor. '/extension-e2e' -> '/e2e' (#832)

* [e2e] Setup. Refactor. Fix for secrets setup

* TW406+407: [e2e] Setup. + Job to pipeline (#838)

* [e2e] Setup. + Job to pipeline

* [e2e] Setup. Pipeline. Run with Xvfb

* [e2e] Setup. Pipeline. Run with Xvfb. Secrets mock

* [e2e] Setup. Pipeline. Run with 'mujo-code/puppeteer-headful'

* [e2e] Setup. Pipeline. Gave up 'mujo-code/puppeteer-headful'

* [e2e] Setup. Pipeline. Secrets mocks clean-up

* TW-406: [e2e] Setup. GitHub workflow. Fix unit tests

* TW-406: [e2e] Setup. Throwing on missing secrets

* TestIDProps is extended

Co-authored-by: Andrii Ivaniv <[email protected]>
Co-authored-by: alex-seleznov <[email protected]>
Co-authored-by: Alex <[email protected]>

* TW-438: Issue #774. Confirm window not showing in dApps (#840)

* TW-438: Issue #774. Confirm window not showing in dApps

* TW-438: Issue #774. Confirm window not showing in dApps. Refactor

* 1.16.0

* TW-439: Fix Plenty images (#841)

* TW-439: Fix Plenty images. Trying all sizes now

* TW-439: Fix Plenty images. Fix icons in 'select asset' field on 'Send page'

* TW-409: [e2e] Reveal seed phrase and private key + before hook fixing (#837)

* basicTest+pupeeteer

* link test id fixed

* duplicate page fix

* envs setup + import existing wallet test

* envs setup + import existing wallet test

* Merge branch 'development' into e2e-setup

* [e2e] Setup. Refactor. '/extension-e2e' -> '/e2e' (#832)

* [e2e] Setup. Refactor. Fix for secrets setup

* reveal seed phrase + private key

* reveal seed + private + before hook is fixed

* Merge branch 'e2e-setup' into TW-409-e2e-reveal-seed-phrase-and-private-key

* TW-409: [e2e] Refactor. Fix failing on Linux

* TW-409: [e2e] Refactor.

* TW-409 conditions fixed

* TW-409: [e2e] Refactor.

* eslint fix

* TW-409: [e2e] Refactor.

Co-authored-by: Andrii Ivaniv <[email protected]>
Co-authored-by: alex-seleznov <[email protected]>
Co-authored-by: Alex <[email protected]>

* TW-387: Fix Alice-Bob input intime update (#836)

* TW-393 Added button for displaying balance in fiat or tezos (#826)

* TW-393 Added button for displaying balance in fiat or tezos

* TW-393 Added tiiltip

* TW-393 Added translations

* TW-393 Fixed comments

* TW-393 Deleted unused icon

* TW-393 Refactored TotalVolumeBanner component

* TW-393 Fixed comments

* TW-393 Fixed comments

* minimum_chrome_version updated

* [TW-435] env setup (#844)

* backend urls moved into .env file

* workflows updated

* env fix

* e2e commented

* vars fix

* e2e removed

* e2e removed

* engines node added

* TW-457: Fix lock-up-enabled (#845)

* TW-457: Fix lock-up-enabled

* TW-457: Fix lock-up-enabled. Fix e2e tests

Co-authored-by: Andrii Ivaniv <[email protected]>

* 1.16.2

* node 16 usage fix

Co-authored-by: Dmytro Herko <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Vlad <[email protected]>
Co-authored-by: alex-seleznov <[email protected]>
  • Loading branch information
5 people authored Jan 24, 2023
1 parent c306807 commit ac42544
Show file tree
Hide file tree
Showing 77 changed files with 764 additions and 199 deletions.
6 changes: 0 additions & 6 deletions .env

This file was deleted.

10 changes: 10 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
TEMPLE_WALLET_SEGMENT_WRITE_KEY=N1pFDJgp6ZJ6s5zfTM0cDhUWWhnE1TkS

TEMPLE_WALLET_EXOLIX_API_KEY=
TEMPLE_WALLET_EVERSTAKE_API_KEY=
TEMPLE_WALLET_EVERSTAKE_LINK_ID=
TEMPLE_WALLET_UTORG_SID=

TEMPLE_WALLET_API_URL=https://temple-api-mainnet.prod.templewallet.com
TEMPLE_WALLET_METADATA_API_URL=https://metadata-api-mainnet.prod.templewallet.com
TEMPLE_WALLET_DEXES_API_URL=wss://dexes-api-mainnet.prod.templewallet.com
34 changes: 19 additions & 15 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,19 @@ on:
- master
- development

env:
TEMPLE_WALLET_SEGMENT_WRITE_KEY: ${{ secrets.TEMPLE_WALLET_SEGMENT_WRITE_KEY }}
TEMPLE_WALLET_EXOLIX_API_KEY: ${{ secrets.TEMPLE_WALLET_EXOLIX_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_API_KEY: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_LINK_ID: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_LINK_ID }}
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}

jobs:
pull-request-check:
name: Checks if ts, lint, tests & build work
runs-on: ubuntu-latest
environment: production
environment: development
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Use Node 14.x
uses: actions/setup-node@v2
- name: Use Node 16.x
uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version: '16.x'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -39,6 +32,21 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: Secrets setup
uses: ./.github/workflows/secrets-setup
with:
TEMPLE_WALLET_SEGMENT_WRITE_KEY: ${{ secrets.TEMPLE_WALLET_SEGMENT_WRITE_KEY }}
TEMPLE_WALLET_EXOLIX_API_KEY: ${{ secrets.TEMPLE_WALLET_EXOLIX_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_API_KEY: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_LINK_ID: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_LINK_ID }}
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}
TEMPLE_WALLET_API_URL: ${{ vars.TEMPLE_WALLET_API_URL }}
TEMPLE_WALLET_METADATA_API_URL: ${{ vars.TEMPLE_WALLET_METADATA_API_URL }}
TEMPLE_WALLET_DEXES_API_URL: ${{ vars.TEMPLE_WALLET_DEXES_API_URL }}
DEFAULT_SEED_PHRASE: ${{ secrets.DEFAULT_SEED_PHRASE }}
DEFAULT_PASSWORD: ${{ secrets.DEFAULT_PASSWORD }}
DEFAULT_HD_ACCOUNT_PRIVATE_KEY: ${{ secrets.DEFAULT_HD_ACCOUNT_PRIVATE_KEY }}

- name: Install dependencies and code quality check
uses: ./.github/workflows/code-quality-check

Expand All @@ -47,10 +55,6 @@ jobs:

- name: Perform end-to-end tests
uses: ./.github/workflows/e2e
with:
DEFAULT_SEED_PHRASE: ${{ secrets.DEFAULT_SEED_PHRASE }}
DEFAULT_PASSWORD: ${{ secrets.DEFAULT_PASSWORD }}
DEFAULT_HD_ACCOUNT_PRIVATE_KEY: ${{ secrets.DEFAULT_HD_ACCOUNT_PRIVATE_KEY }}

- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,13 @@ name: End-to-end tests

description: Prepares and runs e2e tests

inputs:
DEFAULT_SEED_PHRASE:
required: true
DEFAULT_PASSWORD:
required: true
DEFAULT_HD_ACCOUNT_PRIVATE_KEY:
required: true

runs:
using: 'composite'
steps:
- working-directory: ./e2e
shell: bash
run: yarn install

- name: Secrets setup
working-directory: ./e2e
shell: bash
run: |
cat << EOF > .env
DEFAULT_SEED_PHRASE=${{ inputs.DEFAULT_SEED_PHRASE }}
DEFAULT_PASSWORD=${{ inputs.DEFAULT_PASSWORD }}
DEFAULT_HD_ACCOUNT_PRIVATE_KEY=${{ inputs.DEFAULT_HD_ACCOUNT_PRIVATE_KEY }}
EOF
- name: Run tests
working-directory: ./e2e
shell: bash
Expand Down
27 changes: 16 additions & 11 deletions .github/workflows/manual-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,19 @@ on:
description: Firefox build
required: false

env:
TEMPLE_WALLET_SEGMENT_WRITE_KEY: ${{ secrets.TEMPLE_WALLET_SEGMENT_WRITE_KEY }}
TEMPLE_WALLET_EXOLIX_API_KEY: ${{ secrets.TEMPLE_WALLET_EXOLIX_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_API_KEY: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_LINK_ID: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_LINK_ID }}
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}

jobs:
additional-builds:
name: Creates builds for a specific browsers
runs-on: ubuntu-latest
environment: production
environment: development
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Use Node 14.x
uses: actions/setup-node@v2
- name: Use Node 16.x
uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version: '16.x'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -45,6 +38,18 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: Secrets setup
uses: ./.github/workflows/secrets-setup
with:
TEMPLE_WALLET_SEGMENT_WRITE_KEY: ${{ secrets.TEMPLE_WALLET_SEGMENT_WRITE_KEY }}
TEMPLE_WALLET_EXOLIX_API_KEY: ${{ secrets.TEMPLE_WALLET_EXOLIX_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_API_KEY: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_LINK_ID: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_LINK_ID }}
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}
TEMPLE_WALLET_API_URL: ${{ vars.TEMPLE_WALLET_API_URL }}
TEMPLE_WALLET_METADATA_API_URL: ${{ vars.TEMPLE_WALLET_METADATA_API_URL }}
TEMPLE_WALLET_DEXES_API_URL: ${{ vars.TEMPLE_WALLET_DEXES_API_URL }}

- name: Install dependencies and code quality
uses: ./.github/workflows/code-quality-check

Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ on:
tags:
- '*'

env:
TEMPLE_WALLET_SEGMENT_WRITE_KEY: ${{ secrets.TEMPLE_WALLET_SEGMENT_WRITE_KEY }}
TEMPLE_WALLET_EXOLIX_API_KEY: ${{ secrets.TEMPLE_WALLET_EXOLIX_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_API_KEY: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_API_KEY }}
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}

jobs:
create-release:
name: Uploads release assets, generates changelogs
Expand All @@ -22,10 +16,10 @@ jobs:
with:
ref: master

- name: Use Node 14.x
uses: actions/setup-node@v2
- name: Use Node 16.x
uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version: '16.x'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -39,6 +33,18 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: Secrets setup
uses: ./.github/workflows/secrets-setup
with:
TEMPLE_WALLET_SEGMENT_WRITE_KEY: ${{ secrets.TEMPLE_WALLET_SEGMENT_WRITE_KEY }}
TEMPLE_WALLET_EXOLIX_API_KEY: ${{ secrets.TEMPLE_WALLET_EXOLIX_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_API_KEY: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_LINK_ID: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_LINK_ID }}
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}
TEMPLE_WALLET_API_URL: ${{ vars.TEMPLE_WALLET_API_URL }}
TEMPLE_WALLET_METADATA_API_URL: ${{ vars.TEMPLE_WALLET_METADATA_API_URL }}
TEMPLE_WALLET_DEXES_API_URL: ${{ vars.TEMPLE_WALLET_DEXES_API_URL }}

- name: Install dependencies and code quality
uses: ./.github/workflows/code-quality-check

Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/secrets-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Secrets setup

description: Writes secrets

inputs:
TEMPLE_WALLET_SEGMENT_WRITE_KEY:
required: true
TEMPLE_WALLET_EXOLIX_API_KEY:
required: false
TEMPLE_WALLET_EVERSTAKE_API_KEY:
required: false
TEMPLE_WALLET_EVERSTAKE_LINK_ID:
required: false
TEMPLE_WALLET_UTORG_SID:
required: false
TEMPLE_WALLET_API_URL:
required: true
TEMPLE_WALLET_METADATA_API_URL:
required: true
TEMPLE_WALLET_DEXES_API_URL:
required: true
DEFAULT_SEED_PHRASE:
required: false
DEFAULT_PASSWORD:
required: false
DEFAULT_HD_ACCOUNT_PRIVATE_KEY:
required: false

runs:
using: 'composite'
steps:
- name: Create .env file
shell: bash
run: |
cat << EOF > .env
TEMPLE_WALLET_SEGMENT_WRITE_KEY=${{ inputs.TEMPLE_WALLET_SEGMENT_WRITE_KEY }}
TEMPLE_WALLET_EXOLIX_API_KEY=${{ inputs.TEMPLE_WALLET_EXOLIX_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_API_KEY=${{ inputs.TEMPLE_WALLET_EVERSTAKE_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_LINK_ID=${{ inputs.TEMPLE_WALLET_EVERSTAKE_LINK_ID }}
TEMPLE_WALLET_UTORG_SID=${{ inputs.TEMPLE_WALLET_UTORG_SID }}
TEMPLE_WALLET_API_URL=${{ inputs.TEMPLE_WALLET_API_URL }}
TEMPLE_WALLET_METADATA_API_URL=${{ inputs.TEMPLE_WALLET_METADATA_API_URL }}
TEMPLE_WALLET_DEXES_API_URL=${{ inputs.TEMPLE_WALLET_DEXES_API_URL }}
EOF
- name: Create e2e/.env file
shell: bash
run: |
cat << EOF > e2e/.env
DEFAULT_SEED_PHRASE=${{ inputs.DEFAULT_SEED_PHRASE }}
DEFAULT_PASSWORD=${{ inputs.DEFAULT_PASSWORD }}
DEFAULT_HD_ACCOUNT_PRIVATE_KEY=${{ inputs.DEFAULT_HD_ACCOUNT_PRIVATE_KEY }}
EOF
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ git clone https://github.com/madfish-solutions/templewallet-extension && cd temp
yarn
```

### 3) Build
### 3) Create `.env` file

Make copy of `.env.dist` and do changes if needed.

### 4) Build

Builds the extension for production to the `dist` folder.<br>
It correctly bundles in production mode and optimizes the build for the best performance.
Expand All @@ -62,7 +66,7 @@ yarn build:opera
yarn build-all
```

### 4) Load extension to your Browser
### 5) Load extension to your Browser

![TempleWallet_Load](https://user-images.githubusercontent.com/11996139/73763346-f8435a80-4779-11ea-9e9d-4c1db9560f64.gif)

Expand Down
5 changes: 4 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
},
"dependencies": {
"@cucumber/cucumber": "^8.7.0",
"async-retry": "^1.3.3",
"puppeteer": "^19.4.0",
"ts-node": "^10.9.1",
"dotenv": "^16.0.3"
"dotenv": "^16.0.3",
"@types/chai": "^4.3.4",
"chai": "^4.3.7"
}
}
2 changes: 2 additions & 0 deletions e2e/src/classes/browser-context.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ const defaultPrivateKey = getEnv('DEFAULT_HD_ACCOUNT_PRIVATE_KEY');

if (!defaultSeedPhrase) throw new Error('process.env.DEFAULT_SEED_PHRASE not found.');
if (!defaultPassword) throw new Error('process.env.DEFAULT_PASSWORD not found.');
if (!defaultPrivateKey) throw new Error('process.env.DEFAULT_PASSWORD not found.');

export class BrowserContext {
public static EXTENSION_ID: string;
public static browser: Browser;
public static page: Page;
public static seedPhrase = defaultSeedPhrase;
Expand Down
1 change: 0 additions & 1 deletion e2e/src/features/import-existing-wallet.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Feature: Import existing wallet
@dev
Scenario: As a user, I'd like to import account with existing seed phrase
Given I am on the Welcome page
And I press Import Existing Wallet button on the Welcome page
Expand Down
17 changes: 17 additions & 0 deletions e2e/src/features/reveal-private-key.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Feature: Reveal private key
@dev
Scenario: As a user, I'd like to reveal my seed phrase
Given I have imported an existing account

And I press AccountIcon on the Header page
And I am on the AccountsDropdown page
And I press SettingsButton on the AccountsDropdown page

And I am on the Settings page
And I press RevealPrivateKeyButton on the Settings page

And I am on the RevealSecrets page
And I enter password into Reveal Password Field on the RevealSecrets page
And I press Reveal Button on the RevealSecrets page
And I compare my Private Key to Revealed value

17 changes: 17 additions & 0 deletions e2e/src/features/reveal-seed-phrase.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Feature: Reveal seed phrase

Scenario: As a user, I'd like to reveal my seed phrase
Given I have imported an existing account

And I press AccountIcon on the Header page
And I am on the AccountsDropdown page
And I press SettingsButton on the AccountsDropdown page

And I am on the Settings page
And I press RevealSeedPhraseButton on the Settings page

And I am on the RevealSecrets page
And I enter password into Reveal Password Field on the RevealSecrets page
And I press Reveal Button on the RevealSecrets page
And I compare my Seed Phrase to Revealed value

7 changes: 0 additions & 7 deletions e2e/src/hooks/after-all.hook.ts

This file was deleted.

28 changes: 28 additions & 0 deletions e2e/src/hooks/after.hook.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { After } from '@cucumber/cucumber';
import retry from 'async-retry';

import { E2eMessageType } from '../../../src/lib/e2e/types';
import { BrowserContext } from '../classes/browser-context.class';
import { MEDIUM_TIMEOUT, RETRY_OPTIONS } from '../utils/timing.utils';

const FAILED_RESET_ERROR = new Error('Failed to reset extension');

After({ timeout: MEDIUM_TIMEOUT }, async () => {
// [ Extension storages full reset ]

await BrowserContext.page.evaluate(
// @ts-ignore
message => new Promise(res => chrome.runtime.sendMessage(message, res)),
{ type: E2eMessageType.ResetRequest }
);
await BrowserContext.page.evaluate(() => void localStorage.clear());

// [ Extension reload ]

// @ts-ignore
await BrowserContext.page.evaluate(() => void chrome.runtime.reload()).catch(() => void 0);

await retry(() => {
if (BrowserContext.page.isClosed() === false) throw FAILED_RESET_ERROR;
}, RETRY_OPTIONS);
});
Loading

0 comments on commit ac42544

Please sign in to comment.