Merge pull request #896 from secretkeylabs/release/v0.49.0

release: v0.49.0 to develop
This commit is contained in:
Den
2025-02-06 10:38:24 +01:00
committed by GitHub
12 changed files with 28 additions and 31 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "xverse-web-extension",
"version": "0.48.3",
"version": "0.49.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "xverse-web-extension",
"version": "0.48.3",
"version": "0.49.0",
"dependencies": {
"@aryzing/superqs": "0.0.6",
"@keystonehq/hw-transport-webusb": "0.5.1",

View File

@@ -1,7 +1,7 @@
{
"name": "xverse-web-extension",
"description": "The Bitcoin Wallet for everyone",
"version": "0.48.3",
"version": "0.49.0",
"private": true,
"engines": {
"node": "^18.18.2"

View File

@@ -190,6 +190,7 @@ function BatchPsbtSigning({ onSigned, psbts, onCancel, onPostSignDone }: Props)
onSigned(signedPsbts);
setIsLedgerModalVisible(false);
setIsKeystoneModalVisible(false);
} catch (err) {
setIsSigning(false);
setIsSigningComplete(false);

View File

@@ -14,7 +14,7 @@ import {
} from '@secretkeylabs/xverse-core';
import { isDangerFeedback, type InputFeedbackProps } from '@ui-library/inputFeedback';
import type { Brc20TransferEstimateFeesParams, ConfirmBrc20TransferState } from '@utils/brc20';
import { isInOptions, replaceCommaByDot } from '@utils/helper';
import { replaceCommaByDot } from '@utils/helper';
import { getFtTicker } from '@utils/tokens';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';

View File

@@ -3,7 +3,6 @@ import useCancellableEffect from '@hooks/useCancellableEffect';
import useCanUserSwitchPaymentType from '@hooks/useCanUserSwitchPaymentType';
import useDebounce from '@hooks/useDebounce';
import { useResetUserFlow } from '@hooks/useResetUserFlow';
import useSelectedAccount from '@hooks/useSelectedAccount';
import useTransactionContext from '@hooks/useTransactionContext';
import useWalletSelector from '@hooks/useWalletSelector';
import {
@@ -12,7 +11,6 @@ import {
type KeystoneTransport,
type LedgerTransport,
} from '@secretkeylabs/xverse-core';
import { isInOptions } from '@utils/helper';
import { trackMixPanel } from '@utils/mixpanel';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -29,15 +27,12 @@ function SendBtcScreen() {
const navigate = useNavigate();
const { t } = useTranslation('translation');
const isInOption = isInOptions();
useResetUserFlow('/send-btc');
const { selectedAccountType, btcPaymentAddressType } = useWalletSelector();
const [overridePaymentType, setOverridePaymentType] = useState(btcPaymentAddressType);
const { data: btcFeeRate, isLoading: feeRatesLoading } = useBtcFeeRate();
const selectedAccount = useSelectedAccount();
const transactionContext = useTransactionContext(overridePaymentType);
const userCanSwitchPayType = useCanUserSwitchPaymentType();
@@ -119,10 +114,6 @@ function SendBtcScreen() {
);
const handleCancel = () => {
if ((selectedAccountType === 'ledger' || selectedAccountType === 'keystone') && isInOption) {
window.close();
return;
}
navigate(`/coinDashboard/BTC`);
};

View File

@@ -13,7 +13,7 @@ import {
type LedgerTransport,
} from '@secretkeylabs/xverse-core';
import { removeAccountAvatarAction } from '@stores/wallet/actions/actionCreators';
import { isInOptions, isKeystoneAccount, isLedgerAccount } from '@utils/helper';
import { isInOptions } from '@utils/helper';
import { trackMixPanel } from '@utils/mixpanel';
import RoutePaths from 'app/routes/paths';
import { useEffect, useState } from 'react';
@@ -120,11 +120,15 @@ function SendOrdinalScreen() {
}
const handleCancel = () => {
if ((isLedgerAccount(selectedAccount) || isKeystoneAccount(selectedAccount)) && isInOption) {
window.close();
return;
if (isInOption) {
navigate(
isRareSat
? `/nft-dashboard/rare-sats-bundle`
: `/nft-dashboard/ordinal-detail/${selectedOrdinal?.id}`,
);
} else {
navigate(-1);
}
navigate(-1);
};
const handleBackButtonClick = () => {

View File

@@ -12,7 +12,6 @@ import {
type KeystoneTransport,
type LedgerTransport,
} from '@secretkeylabs/xverse-core';
import { isInOptions, isKeystoneAccount, isLedgerAccount } from '@utils/helper';
import { trackMixPanel } from '@utils/mixpanel';
import { getFtBalance } from '@utils/tokens';
import BigNumber from 'bignumber.js';
@@ -25,7 +24,6 @@ import { Step, getPreviousStep } from './steps';
function SendRuneScreen() {
const navigate = useNavigate();
const isInOption = isInOptions();
useResetUserFlow('/send-rune');
@@ -129,10 +127,6 @@ function SendRuneScreen() {
}
const handleCancel = () => {
if ((isLedgerAccount(selectedAccount) || isKeystoneAccount(selectedAccount)) && isInOption) {
window.close();
return;
}
navigate(
`/coinDashboard/FT?ftKey=${fungibleToken.principal}&protocol=${fungibleToken.protocol}`,
);

View File

@@ -1,7 +1,7 @@
import TokenTicker from '@assets/img/dashboard/stx_icon.svg';
import useStackingData from '@hooks/queries/useStackingData';
import { type StackingState } from '@secretkeylabs/xverse-core';
import { XVERSE_WEB_POOL_URL } from '@utils/constants';
import { XVERSE_STACKING_URL } from '@utils/constants';
import { useTranslation } from 'react-i18next';
import {
BoldText,
@@ -34,7 +34,7 @@ function StackingStatusTile() {
})();
const handleOnClick = () => {
window.open(XVERSE_WEB_POOL_URL);
window.open(XVERSE_STACKING_URL);
};
return (

View File

@@ -2,7 +2,7 @@ import useStackingData from '@hooks/queries/useStackingData';
import type { Pool } from '@secretkeylabs/xverse-core';
import { microstacksToStx } from '@secretkeylabs/xverse-core';
import Button from '@ui-library/button';
import { XVERSE_WEB_POOL_URL } from '@utils/constants';
import { XVERSE_STACKING_URL } from '@utils/constants';
import BigNumber from 'bignumber.js';
import { useTranslation } from 'react-i18next';
import { useTheme } from 'styled-components';
@@ -32,7 +32,7 @@ function StartStacking() {
};
const handleOnClick = () => {
window.open(XVERSE_WEB_POOL_URL);
window.open(XVERSE_STACKING_URL);
};
return (

View File

@@ -409,7 +409,7 @@ export default function SwapScreen() {
fromStxTokenFiatValue: new BigNumber(sip10FromTokenInfoUSD?.tokenFiatRate ?? 0),
});
trackMixPanel(AnalyticsEvents.FetchSwapQuote, trackingPayload);
trackMixPanel(AnalyticsEvents.SignSwap, trackingPayload);
};
const QuoteModal = (

View File

@@ -16,7 +16,7 @@ export const BTC_TRANSACTION_TESTNET4_STATUS_URL = 'https://mempool.space/testne
export const BTC_TRANSACTION_SIGNET_STATUS_URL = 'https://mempool.space/signet/tx/';
export const BTC_TRANSACTION_REGTEST_STATUS_URL = 'https://mempool.bitcoin.regtest.hiro.so/tx/';
export const TRANSACTION_STATUS_URL = 'https://explorer.stacks.co/txid/';
export const XVERSE_WEB_POOL_URL = 'https://pool.xverse.app';
export const XVERSE_STACKING_URL = 'https://wallet.xverse.app/earn/stacking';
export const XVERSE_EXPLORE_URL = 'https://wallet.xverse.app/explore';
export const XVERSE_POOL_ADDRESS = 'SPXVRSEH2BKSXAEJ00F1BY562P45D5ERPSKR4Q33';

View File

@@ -36,7 +36,14 @@ export function embellishAccountWithDetails(
}
if (account.accountType === 'ledger' || account.accountType === 'keystone') {
return { ...account, ...getAccountAddressDetails(account, 'native'), btcAddressType: 'native' };
return {
...account,
...getAccountAddressDetails(account, 'native'),
btcAddressType: 'native',
// TODO vic: remove below 2 once we migrate to using Core which returns them in getAccountAddressDetails
btcXpub: account.btcAddresses.native?.xpub,
ordinalsXpub: account.btcAddresses.taproot.xpub,
};
}
return {