diff --git a/.github/workflows/create-version.yml b/.github/workflows/create-version.yml
index 448b7088c..8f5208aab 100644
--- a/.github/workflows/create-version.yml
+++ b/.github/workflows/create-version.yml
@@ -4,7 +4,7 @@ on:
push:
branches:
- 'main'
- - 'beta'
+ - 'dev'
tags-ignore:
- '**'
paths-ignore:
@@ -109,7 +109,7 @@ jobs:
# When successful, this job creates a version tag, triggering `publish-version.yml`
- name: Semantic Release
- uses: cycjimmy/semantic-release-action@v2.5.4
+ uses: cycjimmy/semantic-release-action@v2.6.0
id: semantic
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
env:
diff --git a/.github/workflows/debug-build.yml b/.github/workflows/debug-build.yml
index de6c26722..506457d77 100644
--- a/.github/workflows/debug-build.yml
+++ b/.github/workflows/debug-build.yml
@@ -8,7 +8,7 @@ jobs:
steps:
- uses: lucasmotta/pull-request-sticky-header@1.0.0
- if: github.repository == 'blockstack/stacks-wallet'
+ if: github.repository == 'hirosystems/stacks-wallet'
with:
header: '> _Building new release, please wait for the latest_
'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -20,6 +20,8 @@ jobs:
env:
STX_NETWORK: ${{ matrix.stx_network }}
+ SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
+ SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}
strategy:
matrix:
@@ -68,7 +70,7 @@ jobs:
id: cache-node-modules
with:
path: '**/node_modules'
- key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
+ key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}-${{ secrets.CACHE_BUSTER }}
- name: Variables
id: vars
@@ -120,6 +122,7 @@ jobs:
BRANCH_NAME: ${{ steps.vars.outputs.branch_name }}
CSC_LINK: ${{ secrets[matrix.CSC_LINK_SECRET_NAME] }}
CSC_KEY_PASSWORD: ${{ secrets[matrix.CSC_KEY_PASSWORD_SECRET_NAME] }}
+ SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
@@ -128,7 +131,7 @@ jobs:
- uses: actions/upload-artifact@v2
name: ${{ matrix.NPM_COMMAND }} ${{ matrix.stx_network }} upload
with:
- name: stacks-wallet-${{ matrix.stx_network }}-${{ matrix.NPM_COMMAND }}
+ name: hiro-wallet-${{ matrix.stx_network }}-${{ matrix.NPM_COMMAND }}
path: ${{ matrix.UPLOAD_ASSETS }}
asset-signatures:
@@ -171,13 +174,13 @@ jobs:
steps:
- uses: lucasmotta/pull-request-sticky-header@1.0.0
- if: (!contains(needs.*.result, 'failure')) && github.repository == 'blockstack/stacks-wallet'
+ if: (!contains(needs.*.result, 'failure')) && github.repository == 'hirosystems/stacks-wallet'
with:
header: '> [Download the latest build](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: lucasmotta/pull-request-sticky-header@1.0.0
- if: (contains(needs.*.result, 'failure')) && github.repository == 'blockstack/stacks-wallet'
+ if: (contains(needs.*.result, 'failure')) && github.repository == 'hirosystems/stacks-wallet'
with:
header: '> _Build failed, [see here for details](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})_'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index 854f05c70..dca7dbf78 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -1,6 +1,13 @@
name: Integration tests
-on: [pull_request]
+on:
+ pull_request:
+ workflow_dispatch:
+ inputs:
+ url:
+ description: 'API URL to test'
+ required: true
+ default: https://stacks-node-api.testnet.stacks.co
jobs:
test-integration:
@@ -9,6 +16,7 @@ jobs:
env:
STX_NETWORK: ${{ matrix.stx_network }}
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
+ DEFAULT_TESTNET_STACKS_NODE_URL: ${{ github.event.inputs.name }}
strategy:
matrix:
diff --git a/.github/workflows/publish-version.yml b/.github/workflows/publish-version.yml
index e6080a8df..45b3dfdc5 100644
--- a/.github/workflows/publish-version.yml
+++ b/.github/workflows/publish-version.yml
@@ -35,9 +35,6 @@ jobs:
CSC_LINK_SECRET_NAME: CODE_SIGNING_CERTIFICATE_WINDOWS
CSC_KEY_PASSWORD_SECRET_NAME: CODE_SIGNING_PASSWORD_WINDOWS
- outputs:
- version: ${{ steps.extract_version.outputs.version }}
-
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
@@ -49,7 +46,7 @@ jobs:
- uses: actions/cache@v2
with:
path: '**/node_modules'
- key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
+ key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}-${{ secrets.CACHE_BUSTER }}
- name: Add required Linux dependencies
uses: ./.github/actions/linux-deps
@@ -73,10 +70,6 @@ jobs:
with:
node-version: 12
- - name: Extract version
- id: extract_version
- uses: Saionaro/extract-package-version@v1.0.6
-
#
# Windows build breaks when using the package.json script to install `app/` packages
# using separate run to install those packages separately
@@ -100,6 +93,8 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_ENV: production
+ SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
+ SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}
CSC_LINK: ${{ secrets[matrix.CSC_LINK_SECRET_NAME] }}
CSC_KEY_PASSWORD: ${{ secrets[matrix.CSC_KEY_PASSWORD_SECRET_NAME] }}
APPLE_ID: ${{ secrets.APPLE_ID }}
@@ -108,7 +103,7 @@ jobs:
- uses: actions/upload-artifact@v2
name: ${{ matrix.os }} upload
with:
- name: stacks-wallet-${{ matrix.stx_network }}-${{ matrix.NPM_COMMAND }}
+ name: hiro-wallet-${{ matrix.stx_network }}-${{ matrix.NPM_COMMAND }}
path: ${{ matrix.UPLOAD_ASSETS }}
create-release:
@@ -118,19 +113,24 @@ jobs:
outputs:
release_upload_url: ${{ steps.create_release.outputs.upload_url }}
+ new_version: ${{ steps.extract_version.outputs.version }}
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
+ - name: Extract version
+ id: extract_version
+ uses: Saionaro/extract-package-version@v1.1.1
+
- name: Download binaries
uses: actions/download-artifact@v2
with:
path: release
- name: Move binaries to root directory
- run: mv release/*/stacks-wallet* .
+ run: mv release/*/hiro-wallet* .
- name: Download release-notes.txt from create-version workflow
uses: dawidd6/action-download-artifact@v2
@@ -149,21 +149,25 @@ jobs:
run: |
sed -i '1d' release-notes.txt
echo "\`\`\`" >> release-notes.txt
- shasum -a 256 stacks-wallet* >> shasums.txt
- gpg --armor --output shasums.txt.asc --clearsign shasums.txt
+ shasum -a 256 hiro-wallet* >> shasums.txt
+ gpg --armor --output shasums.txt.asc --clearsign --digest-algo SHA256 shasums.txt
cat release-notes.txt shasums.txt.asc > release-body.txt
echo "\`\`\`" >> release-body.txt
+ - run: echo ${{ steps.extract_version.outputs.version }}
+
- name: Create Release
id: create_release
uses: actions/create-release@v1
+ # check for case where it hasn't found version number
+ if: steps.extract_version.outputs.version != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- tag_name: v${{ needs.build.outputs.version }}
- release_name: Hiro Wallet v${{ needs.build.outputs.version }}
+ tag_name: v${{ steps.extract_version.outputs.version }}
+ release_name: Hiro Wallet v${{ steps.extract_version.outputs.version }}
draft: false
- prerelease: ${{ contains(needs.build.outputs.version, 'beta') }}
+ prerelease: ${{ contains(steps.extract_version.outputs.version, 'dev') }}
body_path: release-body.txt
upload-release-assets:
@@ -201,23 +205,30 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.release_upload_url }}
- asset_path: release/stacks-wallet-${{ matrix.stx_network }}-${{ matrix.os }}/stacks-wallet.${{ matrix.stx_network }}.${{ matrix.ext }}
- asset_name: stacks-wallet.${{ matrix.stx_network }}.v${{ needs.build.outputs.version }}.${{ matrix.ext }}
+ asset_path: release/hiro-wallet-${{ matrix.stx_network }}-${{ matrix.os }}/hiro-wallet.${{ matrix.stx_network }}.${{ matrix.ext }}
+ asset_name: hiro-wallet.${{ matrix.stx_network }}.v${{ needs.create-release.outputs.new_version }}.${{ matrix.ext }}
asset_content_type: application/octet-stream
announce-release:
runs-on: ubuntu-latest
+ env:
+ DISCORD_WEBHOOK: ${{ secrets.DISCORD_UX_NOTIFS_WEBHOOK }}
needs:
- - build
+ - create-release
- upload-release-assets
steps:
- - name: Discord notification
- if: github.ref == 'refs/heads/main'
- env:
- DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
+ - name: Discord Stable Release Notification
+ if: contains(needs.create-release.outputs.new_version, 'dev') == false
+ uses: Ilshidur/action-discord@master
+ with:
+ args: |
+ đź”” New Hiro Wallet released: [Download `v${{ needs.create-release.outputs.new_version }}` here](https://github.com/${{ github.repository }}/releases/tag/v${{ needs.create-release.outputs.new_version }})
+
+ - name: Discord Dev Release Notification
+ if: contains(needs.create-release.outputs.new_version, 'dev') == true
uses: Ilshidur/action-discord@master
with:
args: |
- đź”” New Hiro Wallet released: [Download `v${{ needs.build.outputs.version }}` here](https://github.com/${{ github.repository }}/releases/tag/v${{ needs.build.outputs.version }})
+ New Hiro Wallet Preview released: [Download `v${{ needs.create-release.outputs.new_version }}` here](https://github.com/${{ github.repository }}/releases/tag/v${{ needs.create-release.outputs.new_version }})
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 451e87aa9..8531a19bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,62 @@
+# [4.6.0-dev.5](https://github.com/blockstack/stacks-wallet/compare/v4.6.0-dev.4...v4.6.0-dev.5) (2021-12-01)
+
+
+### Bug Fixes
+
+* **send-form:** incorrect fee calc in send max button ([b4c1fee](https://github.com/blockstack/stacks-wallet/commit/b4c1fee7c7f9c83f46d83fd3e20f92d9fd5369b9))
+
+# [4.6.0-dev.4](https://github.com/blockstack/stacks-wallet/compare/v4.6.0-dev.3...v4.6.0-dev.4) (2021-11-16)
+
+
+### Features
+
+* add segment integration ([c1d6f1f](https://github.com/blockstack/stacks-wallet/commit/c1d6f1f1b447aa2ec178a4b0ff019940a4f0ea43)), closes [#928](https://github.com/blockstack/stacks-wallet/issues/928)
+
+# [4.6.0-dev.3](https://github.com/blockstack/stacks-wallet/compare/v4.6.0-dev.2...v4.6.0-dev.3) (2021-11-02)
+
+
+### Bug Fixes
+
+* **sentry:** use dsn in debug mode ([eea392c](https://github.com/blockstack/stacks-wallet/commit/eea392cdb10c6347c9324f2ea26049a352e981ef))
+
+# [4.6.0-dev.2](https://github.com/blockstack/stacks-wallet/compare/v4.6.0-dev.1...v4.6.0-dev.2) (2021-10-28)
+
+
+### Bug Fixes
+
+* separate discord notifications, stable/dev ([55114dc](https://github.com/blockstack/stacks-wallet/commit/55114dc26d0dc0afbaee9dc1de13c9fb74d3a512))
+
+# [4.6.0-dev.1](https://github.com/blockstack/stacks-wallet/compare/v4.5.3...v4.6.0-dev.1) (2021-10-28)
+
+
+### Bug Fixes
+
+* lack of warning when you're using the wrong ledger device ([099b03f](https://github.com/blockstack/stacks-wallet/commit/099b03f84c7ed2f6c684a794820504f20d17a8ab))
+* remove 3rd party notification from link to explorer, closes [#937](https://github.com/blockstack/stacks-wallet/issues/937) ([edf6bb3](https://github.com/blockstack/stacks-wallet/commit/edf6bb32ea42f1a4d6b7a7004fb28245f3223486))
+* **stacking:** fee incorrectly applied to stacking contract calls ([cf608d0](https://github.com/blockstack/stacks-wallet/commit/cf608d0af4434e397945fcc0f91f8b751b0f0c91))
+* typo with SENTRY_DSN ([5ba69ed](https://github.com/blockstack/stacks-wallet/commit/5ba69ed617f1e0bc9806ae1a54ee5ccafb2aa5ea))
+
+
+### Features
+
+* **sentry:** add opt-in diagnostics with sentry, closes [#899](https://github.com/blockstack/stacks-wallet/issues/899) ([5670b9d](https://github.com/blockstack/stacks-wallet/commit/5670b9d4e5c4fbc0fd92229b23838742b2f9617f))
+* update release flow branches ([ee594d3](https://github.com/blockstack/stacks-wallet/commit/ee594d3da57b0c508034fd104667ecc953918fcf))
+
+# [4.6.0-beta.1](https://github.com/blockstack/stacks-wallet/compare/v4.5.3...v4.6.0-beta.1) (2021-10-28)
+
+
+### Bug Fixes
+
+* lack of warning when you're using the wrong ledger device ([099b03f](https://github.com/blockstack/stacks-wallet/commit/099b03f84c7ed2f6c684a794820504f20d17a8ab))
+* remove 3rd party notification from link to explorer, closes [#937](https://github.com/blockstack/stacks-wallet/issues/937) ([edf6bb3](https://github.com/blockstack/stacks-wallet/commit/edf6bb32ea42f1a4d6b7a7004fb28245f3223486))
+* **stacking:** fee incorrectly applied to stacking contract calls ([cf608d0](https://github.com/blockstack/stacks-wallet/commit/cf608d0af4434e397945fcc0f91f8b751b0f0c91))
+* typo with SENTRY_DSN ([5ba69ed](https://github.com/blockstack/stacks-wallet/commit/5ba69ed617f1e0bc9806ae1a54ee5ccafb2aa5ea))
+
+
+### Features
+
+* **sentry:** add opt-in diagnostics with sentry, closes [#899](https://github.com/blockstack/stacks-wallet/issues/899) ([5670b9d](https://github.com/blockstack/stacks-wallet/commit/5670b9d4e5c4fbc0fd92229b23838742b2f9617f))
+
## [4.5.3](https://github.com/blockstack/stacks-wallet/compare/v4.5.2...v4.5.3) (2021-09-15)
diff --git a/README.md b/README.md
index dec6d5ad4..97cbbb851 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,11 @@
-# Hiro Wallet for Desktop
+# Hiro Wallet—Desktop

+[](https://github.com/blockstack/stacks-wallet/releases/latest)
+[](https://github.com/semantic-release/semantic-release)
[](https://blockstack.github.io/stacks-wallet/)
+
[](https://open.vscode.dev/blockstack/stacks-wallet)

diff --git a/app/app.html b/app/app.html
index df5511a33..f7917aff1 100644
--- a/app/app.html
+++ b/app/app.html
@@ -4,7 +4,7 @@
diff --git a/app/components/external-link.tsx b/app/components/external-link.tsx
index de3947b8a..485106968 100644
--- a/app/components/external-link.tsx
+++ b/app/components/external-link.tsx
@@ -10,7 +10,7 @@ interface ExternalLinkProps extends BoxProps {
export const ExternalLink: FC = ({ href, children, ...props }) => {
const openUrl = () => openExternalLink(href);
return (
-
+
= props => {
{address !== null && (
-
+
View on Explorer
-
+
)}
diff --git a/app/components/internal-link.tsx b/app/components/internal-link.tsx
new file mode 100644
index 000000000..cc9aba2a1
--- /dev/null
+++ b/app/components/internal-link.tsx
@@ -0,0 +1,30 @@
+import React, { FC } from 'react';
+import { Box, Text, BoxProps, color } from '@stacks/ui';
+import { openExternalLink } from '@utils/external-links';
+
+interface InternalLinkProps extends BoxProps {
+ href: string;
+}
+
+export const InternalLink: FC = ({ href, children, ...props }) => {
+ const openUrl = () => openExternalLink(href);
+ return (
+
+ {children}
+
+ ↗
+
+
+ );
+};
diff --git a/app/components/request-diagnostics.layout.tsx b/app/components/request-diagnostics.layout.tsx
new file mode 100644
index 000000000..d9740ca5a
--- /dev/null
+++ b/app/components/request-diagnostics.layout.tsx
@@ -0,0 +1,63 @@
+import React, { FC } from 'react';
+import { FiCheck } from 'react-icons/fi';
+import { Box, Button, Flex, color, Stack, Text, FlexProps } from '@stacks/ui';
+
+import { OnboardingSelector } from 'app/tests/features/onboarding.selectors';
+
+interface ReasonToAllowDiagnosticsProps extends FlexProps {
+ text: string;
+}
+const ReasonToAllowDiagnostics: FC = ({ text, ...props }) => {
+ return (
+
+
+
+
+ {text}
+
+ );
+};
+
+interface AllowDiagnosticsLayoutProps {
+ onUserAllowDiagnostics(): void;
+ onUserDenyDiagnosticsPermissions(): void;
+}
+export const AllowDiagnosticsLayout: FC = props => {
+ const { onUserAllowDiagnostics, onUserDenyDiagnosticsPermissions } = props;
+
+ return (
+ <>
+
+ We would like to gather de-identified usage data to help improve your experience with Hiro
+ Wallet.
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+};
diff --git a/app/components/tx-signing/sign-transaction-ledger.tsx b/app/components/tx-signing/sign-transaction-ledger.tsx
index ca76b286e..74d290072 100644
--- a/app/components/tx-signing/sign-transaction-ledger.tsx
+++ b/app/components/tx-signing/sign-transaction-ledger.tsx
@@ -1,4 +1,5 @@
-import React, { useCallback, useState } from 'react';
+import React, { useCallback, useMemo, useState } from 'react';
+import { useSelector } from 'react-redux';
import {
useCreateLedgerContractCallTx,
useCreateLedgerTokenTransferTx,
@@ -13,36 +14,56 @@ import {
StackingModalFooter as Footer,
} from '../../modals/components/stacking-modal-layout';
import { SignTransactionProps } from './sign-transaction';
+import { RootState } from '@store/index';
+import { selectAddress } from '@store/keys';
type SignTransactionLedgerProps = SignTransactionProps;
export const SignTransactionLedger = (props: SignTransactionLedgerProps) => {
const { action, txOptions, isBroadcasting, onTransactionSigned, onClose } = props;
+ const [ledgerAddress, setLedgerAddress] = useState(null);
const {
step: ledgerStep,
isLocked,
isSupportedAppVersion,
appVersionErrorText,
+ publicKeysDoNotMatchError,
} = usePrepareLedger();
+
const [hasSubmitted, setHasSubmitted] = useState(false);
+ const { persistedAddress } = useSelector((state: RootState) => ({
+ persistedAddress: selectAddress(state),
+ }));
const { createLedgerContractCallTx } = useCreateLedgerContractCallTx();
const { createLedgerTokenTransferTx } = useCreateLedgerTokenTransferTx();
const createLedgerTx = useCallback(async () => {
+ const data = await main.ledger.showStxAddress();
+ if (persistedAddress !== data.address) {
+ setLedgerAddress(data.address);
+ }
if ('recipient' in txOptions) {
return createLedgerTokenTransferTx(txOptions);
}
return createLedgerContractCallTx(txOptions);
- }, [createLedgerContractCallTx, createLedgerTokenTransferTx, txOptions]);
+ }, [createLedgerContractCallTx, createLedgerTokenTransferTx, persistedAddress, txOptions]);
+
+ const ledgerError = useMemo(() => {
+ if (!isSupportedAppVersion) return appVersionErrorText;
+ if (ledgerAddress && persistedAddress !== ledgerAddress) return publicKeysDoNotMatchError;
+ return null;
+ }, [
+ appVersionErrorText,
+ isSupportedAppVersion,
+ ledgerAddress,
+ persistedAddress,
+ publicKeysDoNotMatchError,
+ ]);
return (
<>
-
+