diff --git a/.env.example b/.env.example index 76aa6f92e4..7a3b65d627 100644 --- a/.env.example +++ b/.env.example @@ -5,10 +5,7 @@ VITE_INFURA_API_KEY= VITE_ALCHEMY_API_KEY= VITE_WALLET_CONNECT_PROJECT_ID= VITE_OISY_URL=https://oisy.com -VITE_COINGECKO_API_URL=https://api.coingecko.com/api/v3 VITE_COINGECKO_API_KEY= -VITE_BLOCKCHAIN_API_URL=https://blockchain.info -VITE_BLOCKSTREAM_API_URL=https://blockstream.info/api VITE_EXCHANGE_DISABLED=true VITE_JUNO_SATELLITE_ID= VITE_JUNO_ORBITER_ID= diff --git a/.env.test b/.env.test index b7998a3d4d..8f7414a2de 100644 --- a/.env.test +++ b/.env.test @@ -5,8 +5,5 @@ VITE_INFURA_API_KEY= VITE_ALCHEMY_API_KEY= VITE_WALLET_CONNECT_PROJECT_ID= VITE_OISY_URL=https://oisy.com -VITE_COINGECKO_API_URL=https://api.coingecko.com/api/v3 -VITE_BLOCKCHAIN_API_URL=https://blockchain.info -VITE_BLOCKSTREAM_API_URL=https://blockstream.info/api VITE_JUNO_SATELLITE_ID= VITE_JUNO_ORBITER_ID= diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 14ea3d28dd..fa6c6bd42d 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -28,16 +28,9 @@ categories: change-template: '- $TITLE (#$NUMBER) @$AUTHOR' +change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. + template: | - ## What's Changed + ## Changes - ### Detailed Changes - {% for change in changes %} - - **Title**: {{ change.title }} - - **PR**: [#{{ change.number }}]({{ change.html_url }}) - - **Author**: @{{ change.author.login }} - - **Motivation**: - {{ change.body | paragraph_start_with("# Motivation") | default("No specific motivation provided.") }} - - **Changes**: - {{ change.body | paragraph_start_with("# Changes") | default("No detailed changes provided.") }} - {% endfor %} + $CHANGES diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index fc5bffa29d..f3c210081b 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -27,11 +27,6 @@ jobs: - name: Prepare uses: ./.github/actions/prepare - - - name: Set up Git - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions@github.com" - name: Bump version id: bump_version diff --git a/.github/workflows/deploy-to-environment.yml b/.github/workflows/deploy-to-environment.yml index 2c8fc4fce6..0c705fd3f6 100644 --- a/.github/workflows/deploy-to-environment.yml +++ b/.github/workflows/deploy-to-environment.yml @@ -72,7 +72,6 @@ jobs: echo "VITE_OISY_URL=${{ secrets.VITE_OISY_URL_STAGING }}" >> $GITHUB_ENV echo "VITE_AIRDROP=${{ secrets.VITE_AIRDROP_STAGING }}" >> $GITHUB_ENV echo "VITE_AIRDROP_COMPLETED=${{ secrets.VITE_AIRDROP_COMPLETED_STAGING }}" >> $GITHUB_ENV - echo "VITE_COINGECKO_API_URL=${{ secrets.VITE_COINGECKO_API_URL_STAGING }}" >> $GITHUB_ENV echo "VITE_COINGECKO_API_KEY=${{ secrets.VITE_COINGECKO_API_KEY_STAGING }}" >> $GITHUB_ENV echo "VITE_JUNO_SATELLITE_ID=${{ secrets.VITE_JUNO_SATELLITE_ID_STAGING }}" >> $GITHUB_ENV echo "VITE_JUNO_ORBITER_ID=${{ secrets.VITE_JUNO_ORBITER_ID_STAGING }}" >> $GITHUB_ENV @@ -80,8 +79,6 @@ jobs: echo "VITE_AUTH_ALTERNATIVE_ORIGINS=${{ secrets.VITE_AUTH_ALTERNATIVE_ORIGINS_STAGING }}" >> $GITHUB_ENV echo "VITE_AUTH_DERIVATION_ORIGIN=${{ secrets.VITE_AUTH_DERIVATION_ORIGIN_STAGING }}" >> $GITHUB_ENV echo "VITE_BTC_TO_CKBTC_EXCHANGE_ENABLED=${{ secrets.VITE_BTC_TO_CKBTC_EXCHANGE_ENABLED_STAGING }}" >> $GITHUB_ENV - echo "VITE_BLOCKCHAIN_API_URL=https://blockchain.info" >> $GITHUB_ENV - echo "VITE_BLOCKSTREAM_API_URL=https://blockstream.info/api" >> $GITHUB_ENV echo "VITE_ONRAMPER_API_KEY_DEV=${{ secrets.VITE_ONRAMPER_API_KEY_DEV_STAGING }}" >> $GITHUB_ENV echo "VITE_ONRAMPER_API_KEY_PROD=${{ secrets.VITE_ONRAMPER_API_KEY_PROD_STAGING }}" >> $GITHUB_ENV { @@ -97,7 +94,6 @@ jobs: echo "VITE_OISY_URL=${{ secrets.VITE_OISY_URL_BETA }}" >> $GITHUB_ENV echo "VITE_AIRDROP=${{ secrets.VITE_AIRDROP_BETA }}" >> $GITHUB_ENV echo "VITE_AIRDROP_COMPLETED=${{ secrets.VITE_AIRDROP_COMPLETED_BETA }}" >> $GITHUB_ENV - echo "VITE_COINGECKO_API_URL=${{ secrets.VITE_COINGECKO_API_URL_BETA }}" >> $GITHUB_ENV echo "VITE_COINGECKO_API_KEY=${{ secrets.VITE_COINGECKO_API_KEY_BETA }}" >> $GITHUB_ENV echo "VITE_JUNO_SATELLITE_ID=${{ secrets.VITE_JUNO_SATELLITE_ID_BETA }}" >> $GITHUB_ENV echo "VITE_JUNO_ORBITER_ID=${{ secrets.VITE_JUNO_ORBITER_ID_BETA }}" >> $GITHUB_ENV @@ -105,8 +101,6 @@ jobs: echo "VITE_AUTH_ALTERNATIVE_ORIGINS=${{ secrets.VITE_AUTH_ALTERNATIVE_ORIGINS_BETA }}" >> $GITHUB_ENV echo "VITE_AUTH_DERIVATION_ORIGIN=${{ secrets.VITE_AUTH_DERIVATION_ORIGIN_BETA }}" >> $GITHUB_ENV echo "VITE_BTC_TO_CKBTC_EXCHANGE_ENABLED=${{ secrets.VITE_BTC_TO_CKBTC_EXCHANGE_ENABLED_BETA }}" >> $GITHUB_ENV - echo "VITE_BLOCKCHAIN_API_URL=https://blockchain.info" >> $GITHUB_ENV - echo "VITE_BLOCKSTREAM_API_URL=https://blockstream.info/api" >> $GITHUB_ENV echo "VITE_ONRAMPER_API_KEY_DEV=${{ secrets.VITE_ONRAMPER_API_KEY_DEV_BETA }}" >> $GITHUB_ENV echo "VITE_ONRAMPER_API_KEY_PROD=${{ secrets.VITE_ONRAMPER_API_KEY_PROD_BETA }}" >> $GITHUB_ENV { diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index d11038dfd5..fd0fe34a57 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -28,11 +28,12 @@ jobs: - name: Create Git tag run: | - git tag -a "v${{ steps.get_version.outputs.version }}" -m "Release v${{ steps.get_version.outputs.version }}" + git tag "v${{ steps.get_version.outputs.version }}" -m "Release v${{ steps.get_version.outputs.version }}" git push origin "v${{ steps.get_version.outputs.version }}" - name: Draft Release Notes id: draft_release uses: release-drafter/release-drafter@v6 with: - version: "v${{ steps.get_version.outputs.version }}" \ No newline at end of file + version: "v${{ steps.get_version.outputs.version }}" + token: ${{ secrets.GIX_CREATE_PR_PAT }} \ No newline at end of file diff --git a/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Google-Chrome-linux.png b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Google-Chrome-linux.png index 8180ad84e2..5a4849e48c 100644 Binary files a/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Google-Chrome-linux.png and b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Google-Chrome-linux.png differ diff --git a/package-lock.json b/package-lock.json index d0d81d08b2..cc003f0967 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,8 +40,8 @@ "@sveltejs/adapter-static": "^3.0.5", "@sveltejs/kit": "^2.7.3", "@sveltejs/vite-plugin-svelte": "^3.1.2", - "@testing-library/jest-dom": "^6.6.2", - "@testing-library/svelte": "^5.2.3", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/svelte": "^5.2.4", "@types/dom-view-transitions": "^1.0.5", "@types/node": "^20.14.9", "autoprefixer": "^10.4.20", @@ -63,8 +63,8 @@ "tslib": "^2.8.0", "typescript": "^5.4.5", "vite": "^5.4.10", - "vite-node": "^2.1.3", - "vitest": "^2.1.2", + "vite-node": "^2.1.4", + "vitest": "^2.1.4", "vitest-mock-extended": "^2.0.2" }, "engines": { @@ -3341,9 +3341,9 @@ "license": "MIT" }, "node_modules/@testing-library/jest-dom": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.2.tgz", - "integrity": "sha512-P6GJD4yqc9jZLbe98j/EkyQDTPgqftohZF5FBkHY5BUERZmcf4HeO2k0XaefEg329ux2p21i1A1DmyQ1kKw2Jw==", + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.3.tgz", + "integrity": "sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA==", "dev": true, "dependencies": { "@adobe/css-tools": "^4.4.0", @@ -3386,9 +3386,9 @@ } }, "node_modules/@testing-library/svelte": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@testing-library/svelte/-/svelte-5.2.3.tgz", - "integrity": "sha512-y5eaD2Vp3hb729dAv3dOYNoZ9uNM0bQ0rd5AfXDWPvI+HiGmjl8ZMOuKzBopveyAkci1Kplb6kS53uZhPGEK+w==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@testing-library/svelte/-/svelte-5.2.4.tgz", + "integrity": "sha512-EFdy73+lULQgMJ1WolAymrxWWrPv9DWyDuDFKKlUip2PA/EXuHptzfYOKWljccFWDKhhGOu3dqNmoc2f/h/Ecg==", "dev": true, "dependencies": { "@testing-library/dom": "^10.0.0" @@ -3827,14 +3827,14 @@ "peer": true }, "node_modules/@vitest/expect": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.2.tgz", - "integrity": "sha512-FEgtlN8mIUSEAAnlvn7mP8vzaWhEaAEvhSXCqrsijM7K6QqjB11qoRZYEd4AKSCDz8p0/+yH5LzhZ47qt+EyPg==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.4.tgz", + "integrity": "sha512-DOETT0Oh1avie/D/o2sgMHGrzYUFFo3zqESB2Hn70z6QB1HrS2IQ9z5DfyTqU8sg4Bpu13zZe9V4+UTNQlUeQA==", "dev": true, "dependencies": { - "@vitest/spy": "2.1.2", - "@vitest/utils": "2.1.2", - "chai": "^5.1.1", + "@vitest/spy": "2.1.4", + "@vitest/utils": "2.1.4", + "chai": "^5.1.2", "tinyrainbow": "^1.2.0" }, "funding": { @@ -3842,21 +3842,20 @@ } }, "node_modules/@vitest/mocker": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.2.tgz", - "integrity": "sha512-ExElkCGMS13JAJy+812fw1aCv2QO/LBK6CyO4WOPAzLTmve50gydOlWhgdBJPx2ztbADUq3JVI0C5U+bShaeEA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.4.tgz", + "integrity": "sha512-Ky/O1Lc0QBbutJdW0rqLeFNbuLEyS+mIPiNdlVlp2/yhJ0SbyYqObS5IHdhferJud8MbbwMnexg4jordE5cCoQ==", "dev": true, "dependencies": { - "@vitest/spy": "^2.1.0-beta.1", + "@vitest/spy": "2.1.4", "estree-walker": "^3.0.3", - "magic-string": "^0.30.11" + "magic-string": "^0.30.12" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/spy": "2.1.2", - "msw": "^2.3.5", + "msw": "^2.4.9", "vite": "^5.0.0" }, "peerDependenciesMeta": { @@ -3869,9 +3868,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.2.tgz", - "integrity": "sha512-FIoglbHrSUlOJPDGIrh2bjX1sNars5HbxlcsFKCtKzu4+5lpsRhOCVcuzp0fEhAGHkPZRIXVNzPcpSlkoZ3LuA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.4.tgz", + "integrity": "sha512-L95zIAkEuTDbUX1IsjRl+vyBSLh3PwLLgKpghl37aCK9Jvw0iP+wKwIFhfjdUtA2myLgjrG6VU6JCFLv8q/3Ww==", "dev": true, "dependencies": { "tinyrainbow": "^1.2.0" @@ -3881,12 +3880,12 @@ } }, "node_modules/@vitest/runner": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.2.tgz", - "integrity": "sha512-UCsPtvluHO3u7jdoONGjOSil+uON5SSvU9buQh3lP7GgUXHp78guN1wRmZDX4wGK6J10f9NUtP6pO+SFquoMlw==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.4.tgz", + "integrity": "sha512-sKRautINI9XICAMl2bjxQM8VfCMTB0EbsBc/EDFA57V6UQevEKY/TOPOF5nzcvCALltiLfXWbq4MaAwWx/YxIA==", "dev": true, "dependencies": { - "@vitest/utils": "2.1.2", + "@vitest/utils": "2.1.4", "pathe": "^1.1.2" }, "funding": { @@ -3894,13 +3893,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.2.tgz", - "integrity": "sha512-xtAeNsZ++aRIYIUsek7VHzry/9AcxeULlegBvsdLncLmNCR6tR8SRjn8BbDP4naxtccvzTqZ+L1ltZlRCfBZFA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.4.tgz", + "integrity": "sha512-3Kab14fn/5QZRog5BPj6Rs8dc4B+mim27XaKWFWHWA87R56AKjHTGcBFKpvZKDzC4u5Wd0w/qKsUIio3KzWW4Q==", "dev": true, "dependencies": { - "@vitest/pretty-format": "2.1.2", - "magic-string": "^0.30.11", + "@vitest/pretty-format": "2.1.4", + "magic-string": "^0.30.12", "pathe": "^1.1.2" }, "funding": { @@ -3908,25 +3907,25 @@ } }, "node_modules/@vitest/spy": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.2.tgz", - "integrity": "sha512-GSUi5zoy+abNRJwmFhBDC0yRuVUn8WMlQscvnbbXdKLXX9dE59YbfwXxuJ/mth6eeqIzofU8BB5XDo/Ns/qK2A==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.4.tgz", + "integrity": "sha512-4JOxa+UAizJgpZfaCPKK2smq9d8mmjZVPMt2kOsg/R8QkoRzydHH1qHxIYNvr1zlEaFj4SXiaaJWxq/LPLKaLg==", "dev": true, "dependencies": { - "tinyspy": "^3.0.0" + "tinyspy": "^3.0.2" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.2.tgz", - "integrity": "sha512-zMO2KdYy6mx56btx9JvAqAZ6EyS3g49krMPPrgOp1yxGZiA93HumGk+bZ5jIZtOg5/VBYl5eBmGRQHqq4FG6uQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.4.tgz", + "integrity": "sha512-MXDnZn0Awl2S86PSNIim5PWXgIAx8CIkzu35mBdSApUip6RFOGXBCf3YFyeEu8n1IHk4bWD46DeYFu9mQlFIRg==", "dev": true, "dependencies": { - "@vitest/pretty-format": "2.1.2", - "loupe": "^3.1.1", + "@vitest/pretty-format": "2.1.4", + "loupe": "^3.1.2", "tinyrainbow": "^1.2.0" }, "funding": { @@ -5029,9 +5028,9 @@ "license": "CC-BY-4.0" }, "node_modules/chai": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", - "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", + "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", "dev": true, "dependencies": { "assertion-error": "^2.0.1", @@ -6686,6 +6685,15 @@ "integrity": "sha512-c2bQfLNbMzLPmzQuOr8fy0csy84WmwnER81W88DzTp9CYNPJ6yzOj2EZAh9pywYpqHnshVLHQJ8WzldAyfY+Iw==", "dev": true }, + "node_modules/expect-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", + "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==", + "dev": true, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/ext": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", @@ -6994,15 +7002,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -8413,13 +8412,10 @@ "peer": true }, "node_modules/loupe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", - "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.1" - } + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", + "integrity": "sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==", + "dev": true }, "node_modules/lz-string": { "version": "1.5.0", @@ -8432,10 +8428,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.11", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", - "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", - "license": "MIT", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } @@ -10903,11 +10898,10 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz", - "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==", - "dev": true, - "license": "MIT" + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", + "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", + "dev": true }, "node_modules/tinypool": { "version": "1.0.1", @@ -11772,13 +11766,13 @@ } }, "node_modules/vite-node": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.3.tgz", - "integrity": "sha512-I1JadzO+xYX887S39Do+paRePCKoiDrWRRjp9kkG5he0t7RXNvPAJPCQSJqbGN4uCrFFeS3Kj3sLqY8NMYBEdA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.4.tgz", + "integrity": "sha512-kqa9v+oi4HwkG6g8ufRnb5AeplcRw8jUF6/7/Qz1qRQOXHImG8YnLbB+LLszENwFnoBl9xIf9nVdCFzNd7GQEg==", "dev": true, "dependencies": { "cac": "^6.7.14", - "debug": "^4.3.6", + "debug": "^4.3.7", "pathe": "^1.1.2", "vite": "^5.0.0" }, @@ -11832,29 +11826,30 @@ } }, "node_modules/vitest": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.2.tgz", - "integrity": "sha512-veNjLizOMkRrJ6xxb+pvxN6/QAWg95mzcRjtmkepXdN87FNfxAss9RKe2far/G9cQpipfgP2taqg0KiWsquj8A==", - "dev": true, - "dependencies": { - "@vitest/expect": "2.1.2", - "@vitest/mocker": "2.1.2", - "@vitest/pretty-format": "^2.1.2", - "@vitest/runner": "2.1.2", - "@vitest/snapshot": "2.1.2", - "@vitest/spy": "2.1.2", - "@vitest/utils": "2.1.2", - "chai": "^5.1.1", - "debug": "^4.3.6", - "magic-string": "^0.30.11", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.4.tgz", + "integrity": "sha512-eDjxbVAJw1UJJCHr5xr/xM86Zx+YxIEXGAR+bmnEID7z9qWfoxpHw0zdobz+TQAFOLT+nEXz3+gx6nUJ7RgmlQ==", + "dev": true, + "dependencies": { + "@vitest/expect": "2.1.4", + "@vitest/mocker": "2.1.4", + "@vitest/pretty-format": "^2.1.4", + "@vitest/runner": "2.1.4", + "@vitest/snapshot": "2.1.4", + "@vitest/spy": "2.1.4", + "@vitest/utils": "2.1.4", + "chai": "^5.1.2", + "debug": "^4.3.7", + "expect-type": "^1.1.0", + "magic-string": "^0.30.12", "pathe": "^1.1.2", "std-env": "^3.7.0", "tinybench": "^2.9.0", - "tinyexec": "^0.3.0", - "tinypool": "^1.0.0", + "tinyexec": "^0.3.1", + "tinypool": "^1.0.1", "tinyrainbow": "^1.2.0", "vite": "^5.0.0", - "vite-node": "2.1.2", + "vite-node": "2.1.4", "why-is-node-running": "^2.3.0" }, "bin": { @@ -11869,8 +11864,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.2", - "@vitest/ui": "2.1.2", + "@vitest/browser": "2.1.4", + "@vitest/ui": "2.1.4", "happy-dom": "*", "jsdom": "*" }, @@ -11914,7 +11909,6 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -11931,29 +11925,7 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/vitest/node_modules/vite-node": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.2.tgz", - "integrity": "sha512-HPcGNN5g/7I2OtPjLqgOtCRu/qhVvBxTUD3qzitmL0SrG1cWFzxzhMDWussxSbrRYWqnKf8P2jiNhPMSN+ymsQ==", - "dev": true, - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.3.6", - "pathe": "^1.1.2", - "vite": "^5.0.0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } + "dev": true }, "node_modules/w3c-xmlserializer": { "version": "5.0.0", diff --git a/package.json b/package.json index 4ad098ba5f..155e95056e 100644 --- a/package.json +++ b/package.json @@ -80,8 +80,8 @@ "@sveltejs/adapter-static": "^3.0.5", "@sveltejs/kit": "^2.7.3", "@sveltejs/vite-plugin-svelte": "^3.1.2", - "@testing-library/jest-dom": "^6.6.2", - "@testing-library/svelte": "^5.2.3", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/svelte": "^5.2.4", "@types/dom-view-transitions": "^1.0.5", "@types/node": "^20.14.9", "autoprefixer": "^10.4.20", @@ -103,8 +103,8 @@ "tslib": "^2.8.0", "typescript": "^5.4.5", "vite": "^5.4.10", - "vite-node": "^2.1.3", - "vitest": "^2.1.2", + "vite-node": "^2.1.4", + "vitest": "^2.1.4", "vitest-mock-extended": "^2.0.2" }, "type": "module", diff --git a/src/frontend/src/btc/components/convert/ConvertToCkBTC.svelte b/src/frontend/src/btc/components/convert/ConvertToCkBTC.svelte index c509dfc8b1..7f561a83a0 100644 --- a/src/frontend/src/btc/components/convert/ConvertToCkBTC.svelte +++ b/src/frontend/src/btc/components/convert/ConvertToCkBTC.svelte @@ -1,7 +1,7 @@ diff --git a/src/frontend/src/env/rest/blockchain.env.ts b/src/frontend/src/env/rest/blockchain.env.ts new file mode 100644 index 0000000000..afa82f63a7 --- /dev/null +++ b/src/frontend/src/env/rest/blockchain.env.ts @@ -0,0 +1,7 @@ +import { UrlSchema } from '$lib/validation/url.validation'; +import { safeParse } from '$lib/validation/utils.validation'; + +export const BLOCKCHAIN_API_URL = safeParse({ + schema: UrlSchema, + value: 'https://blockchain.info' +}); diff --git a/src/frontend/src/env/rest/blockstream.env.ts b/src/frontend/src/env/rest/blockstream.env.ts new file mode 100644 index 0000000000..cb68f806a4 --- /dev/null +++ b/src/frontend/src/env/rest/blockstream.env.ts @@ -0,0 +1,7 @@ +import { UrlSchema } from '$lib/validation/url.validation'; +import { safeParse } from '$lib/validation/utils.validation'; + +export const BLOCKSTREAM_API_URL = safeParse({ + schema: UrlSchema, + value: 'https://blockstream.info/api' +}); diff --git a/src/frontend/src/env/rest/coingecko.env.ts b/src/frontend/src/env/rest/coingecko.env.ts new file mode 100644 index 0000000000..c9cccdc969 --- /dev/null +++ b/src/frontend/src/env/rest/coingecko.env.ts @@ -0,0 +1,9 @@ +import { UrlSchema } from '$lib/validation/url.validation'; +import { safeParse } from '$lib/validation/utils.validation'; + +export const COINGECKO_API_URL = safeParse({ + schema: UrlSchema, + value: 'https://pro-api.coingecko.com/api/v3/' +}); + +export const COINGECKO_API_KEY = import.meta.env.VITE_COINGECKO_API_KEY; diff --git a/src/frontend/src/env/onramper.env.ts b/src/frontend/src/env/rest/onramper.env.ts similarity index 100% rename from src/frontend/src/env/onramper.env.ts rename to src/frontend/src/env/rest/onramper.env.ts diff --git a/src/frontend/src/env/tokens.ckerc20.env.ts b/src/frontend/src/env/tokens.ckerc20.env.ts index 812b4878d9..f42f5444ec 100644 --- a/src/frontend/src/env/tokens.ckerc20.env.ts +++ b/src/frontend/src/env/tokens.ckerc20.env.ts @@ -1,8 +1,9 @@ import ckErc20Tokens from '$env/tokens.ckerc20.json'; import { envTokensCkErc20 } from '$env/types/env-token-ckerc20'; +import { safeParse } from '$lib/validation/utils.validation'; -const ckErc20 = envTokensCkErc20.safeParse(ckErc20Tokens); - -export const { production: ckErc20Production, staging: ckErc20Staging } = ckErc20.success - ? ckErc20.data - : { production: {}, staging: {} }; +export const { production: ckErc20Production, staging: ckErc20Staging } = safeParse({ + schema: envTokensCkErc20, + value: ckErc20Tokens, + fallback: { production: {}, staging: {} } +}); diff --git a/src/frontend/src/env/tokens.sns.json b/src/frontend/src/env/tokens.sns.json index 87c473fc2a..06d4bbfa0e 100644 --- a/src/frontend/src/env/tokens.sns.json +++ b/src/frontend/src/env/tokens.sns.json @@ -462,5 +462,21 @@ "url": "https://mnc6b-aaaaa-aaaap-qhnrq-cai.icp0.io/" }, "indexCanisterVersion": "up-to-date" + }, + { + "ledgerCanisterId": "o7oak-iyaaa-aaaaq-aadzq-cai", + "rootCanisterId": "ormnc-tiaaa-aaaaq-aadyq-cai", + "indexCanisterId": "onixt-eiaaa-aaaaq-aad2q-cai", + "metadata": { + "decimals": 8, + "name": "KongSwap", + "symbol": "KONG", + "fee": { + "__bigint__": "10000" + }, + "alternativeName": "KongSwap", + "url": "https://www.kongswap.io/" + }, + "indexCanisterVersion": "up-to-date" } ] diff --git a/src/frontend/src/eth/components/send/SendInfo.svelte b/src/frontend/src/eth/components/send/SendInfo.svelte index 273a65f0a4..35ffc27845 100644 --- a/src/frontend/src/eth/components/send/SendInfo.svelte +++ b/src/frontend/src/eth/components/send/SendInfo.svelte @@ -1,7 +1,7 @@ {#if displayInfo} - + {#if sendPurpose === 'convert-eth-to-cketh'} {$i18n.convert.text.cketh_conversions_may_take} @@ -26,5 +26,5 @@ })} {/if} - + {/if} diff --git a/src/frontend/src/eth/components/wallet-connect/WalletConnectSignReview.svelte b/src/frontend/src/eth/components/wallet-connect/WalletConnectSignReview.svelte index 9d33cfce68..c15b2c87f2 100644 --- a/src/frontend/src/eth/components/wallet-connect/WalletConnectSignReview.svelte +++ b/src/frontend/src/eth/components/wallet-connect/WalletConnectSignReview.svelte @@ -26,12 +26,12 @@ -

{$i18n.wallet_connect.text.method}

+

{$i18n.wallet_connect.text.method}:

{request.params.request.method}

-

{$i18n.wallet_connect.text.message}

+

{$i18n.wallet_connect.text.message}:

{#if nonNullish(json)}
diff --git a/src/frontend/src/eth/constants/steps.constants.ts b/src/frontend/src/eth/constants/steps.constants.ts index 1ce10b3e0c..7c2d311998 100644 --- a/src/frontend/src/eth/constants/steps.constants.ts +++ b/src/frontend/src/eth/constants/steps.constants.ts @@ -1,4 +1,4 @@ -import { ProgressStepsSend } from '$lib/enums/progress-steps'; +import { ProgressStepsSend, ProgressStepsSign } from '$lib/enums/progress-steps'; import type { ProgressStep } from '@dfinity/gix-components'; export const sendSteps = ({ @@ -59,17 +59,17 @@ export const walletConnectSendSteps = ({ export const walletConnectSignSteps = (i18n: I18n): [ProgressStep, ...ProgressStep[]] => [ { - step: ProgressStepsSend.INITIALIZATION, + step: ProgressStepsSign.INITIALIZATION, text: i18n.send.text.initializing, state: 'in_progress' } as ProgressStep, { - step: ProgressStepsSend.SIGN_TRANSFER, + step: ProgressStepsSign.SIGN, text: i18n.send.text.signing_message, state: 'next' } as ProgressStep, { - step: ProgressStepsSend.TRANSFER, + step: ProgressStepsSign.APPROVE, text: i18n.send.text.approving, state: 'next' } as ProgressStep diff --git a/src/frontend/src/icp-eth/components/send/ConvertETH.svelte b/src/frontend/src/icp-eth/components/send/ConvertETH.svelte index 29cffe0683..096835f439 100644 --- a/src/frontend/src/icp-eth/components/send/ConvertETH.svelte +++ b/src/frontend/src/icp-eth/components/send/ConvertETH.svelte @@ -8,7 +8,7 @@ import { autoLoadUserToken } from '$icp-eth/services/user-token.services'; import { ckEthMinterInfoStore } from '$icp-eth/stores/cketh.store'; import { toCkEthHelperContractAddress } from '$icp-eth/utils/cketh.utils'; - import ButtonHero from '$lib/components/ui/ButtonHero.svelte'; + import ButtonHero from '$lib/components/hero/ButtonHero.svelte'; import { ethAddressNotLoaded } from '$lib/derived/address.derived'; import { authIdentity } from '$lib/derived/auth.derived'; import { isBusy } from '$lib/derived/busy.derived'; diff --git a/src/frontend/src/icp/components/convert/ConvertToBTC.svelte b/src/frontend/src/icp/components/convert/ConvertToBTC.svelte index 9a945bf3d6..5ac4e14694 100644 --- a/src/frontend/src/icp/components/convert/ConvertToBTC.svelte +++ b/src/frontend/src/icp/components/convert/ConvertToBTC.svelte @@ -5,8 +5,8 @@ import IcSendModal from '$icp/components/send/IcSendModal.svelte'; import { ckBtcMinterInfoStore } from '$icp/stores/ckbtc.store'; import type { OptionIcCkToken } from '$icp/types/ic'; + import ButtonHero from '$lib/components/hero/ButtonHero.svelte'; import IconCkConvert from '$lib/components/icons/IconCkConvert.svelte'; - import ButtonHero from '$lib/components/ui/ButtonHero.svelte'; import { isBusy } from '$lib/derived/busy.derived'; import { modalConvertCkBTCToBTC } from '$lib/derived/modal.derived'; import { tokenId } from '$lib/derived/token.derived'; diff --git a/src/frontend/src/lib/components/buy/BuyButton.svelte b/src/frontend/src/lib/components/buy/BuyButton.svelte index 3159071c12..c401debb8e 100644 --- a/src/frontend/src/lib/components/buy/BuyButton.svelte +++ b/src/frontend/src/lib/components/buy/BuyButton.svelte @@ -1,7 +1,7 @@ @@ -13,13 +17,13 @@ - {#if $exchangeInitialized} + {#if $loaded} {formatUSD({ value: totalUsd })} {:else} {formatUSD({ value: 0 })} {/if} - - {$i18n.hero.text.available_balance} + + {$anyBalanceNonZero ? $i18n.hero.text.available_balance : $i18n.hero.text.top_up} diff --git a/src/frontend/src/lib/components/hero/Actions.svelte b/src/frontend/src/lib/components/hero/Actions.svelte index 96f282674c..ff7b894b6f 100644 --- a/src/frontend/src/lib/components/hero/Actions.svelte +++ b/src/frontend/src/lib/components/hero/Actions.svelte @@ -16,6 +16,7 @@ import Receive from '$lib/components/receive/Receive.svelte'; import Send from '$lib/components/send/Send.svelte'; import HeroButtonGroup from '$lib/components/ui/HeroButtonGroup.svelte'; + import { anyBalanceNonZero } from '$lib/derived/balances.derived'; import { networkEthereum, networkICP, @@ -41,6 +42,9 @@ let isTransactionsPage = false; $: isTransactionsPage = isRouteTransactions($page); + + let sendAction = false; + $: sendAction = $anyBalanceNonZero || isTransactionsPage;