Skip to content

Commit

Permalink
refactor: update to leather url paths
Browse files Browse the repository at this point in the history
  • Loading branch information
fbwoolf committed Sep 1, 2023
1 parent 3b7bc46 commit 203fad5
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 32 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Leather is the most popular and trusted wallet for apps built on Bitcoin. Connec

To integrate this wallet into your app, we recommend [@stacks/connect](https://github.com/hirosystems/connect).

[📚 See Leather Developer Documentation →](https://hirowallet.gitbook.io/developers)
[📚 See Leather Developer Documentation →](https://leather.gitbook.io/developers/home/welcome)

[📩 Join the mailing list for updates →](https://forms.gle/sdZPu2jbX1AeQ8Fi9)

Expand Down
12 changes: 6 additions & 6 deletions src/app/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { BRANCH_NAME, COMMIT_SHA } from '@shared/environment';
import { RouteUrls } from '@shared/route-urls';

import { useDrawers } from '@app/common/hooks/use-drawers';
import { HiroWalletLogo } from '@app/components/hiro-wallet-logo';
import { LeatherLogo } from '@app/components/leather-logo';
import { NetworkModeBadge } from '@app/components/network-mode-badge';
import { Title } from '@app/components/typography';

Expand All @@ -33,7 +33,7 @@ export const Header: React.FC<HeaderProps> = memo(props => {
const [desktopViewport] = useMediaQuery(`(min-width: ${token('sizes.desktopViewportMinWidth')})`);
const [isNarrowViewport] = useMediaQuery('(max-width: 640px)');

const hiroWalletLogoIsClickable = useMemo(() => {
const leatherLogoIsClickable = useMemo(() => {
return (
pathname !== RouteUrls.RequestDiagnostics &&
pathname !== RouteUrls.Onboarding &&
Expand Down Expand Up @@ -79,10 +79,10 @@ export const Header: React.FC<HeaderProps> = memo(props => {
justifyContent={onClose ? 'center' : 'unset'}
>
<Flex alignItems="flex-end">
<HiroWalletLogo
data-testid={OnboardingSelectors.HiroWalletLogoRouteToHome}
isClickable={hiroWalletLogoIsClickable}
onClick={hiroWalletLogoIsClickable ? () => navigate(RouteUrls.Home) : undefined}
<LeatherLogo
data-testid={OnboardingSelectors.LeatherLogoRouteToHome}
isClickable={leatherLogoIsClickable}
onClick={leatherLogoIsClickable ? () => navigate(RouteUrls.Home) : undefined}
/>
<Text
display={!version ? 'none' : 'unset'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { token } from 'leaf-styles/tokens';

import { LeatherIcon } from './icons/leather-icon';

interface HiroWalletLogoProps extends StackProps {
interface LeatherLogoProps extends StackProps {
isClickable: boolean;
}
export const HiroWalletLogo = memo((props: HiroWalletLogoProps) => {
export const LeatherLogo = memo((props: LeatherLogoProps) => {
const { isClickable, ...rest } = props;

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function LeatherIntroDialogContainer() {

function onRejectAndUninstall() {
void analytics.track('new_brand_reject_terms');
openInNewTab('https://hirowallet.gitbook.io/guides/troubleshooting/uninstalling-the-wallet');
openInNewTab('https://leather.gitbook.io/guides/troubleshooting/uninstall-wallet');
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function ConnectLedgerErrorLayout(props: ConnectLedgerErrorLayoutProps) {
fontSize={1}
onClick={() =>
openInNewTab(
'https://hirowallet.gitbook.io/guides/securing-the-wallet/using-ledger-with-hiro'
'https://leather.gitbook.io/guides/securing-the-wallet/using-ledger-with-leather'
)
}
>
Expand Down
4 changes: 1 addition & 3 deletions src/app/features/settings-dropdown/settings-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ export function SettingsDropdown() {
data-testid={SettingsMenuSelectors.GetSupportMenuItem}
onClick={wrappedCloseCallback(() => {
void analytics.track('click_get_support_menu_item');
openInNewTab(
'https://wallet.hiro.so/wallet-faq/where-can-i-find-support-for-the-stacks-wallet'
);
openInNewTab('https://leather.gitbook.io/guides/installing/contact-support');
})}
>
<Stack isInline>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const body = 'Sending bitcoin is temporarily disabled';
const helpTextList = [
<Box as="li" mt="base" key={1}>
<Stack alignItems="center" isInline>
<Text>Learm more on Twitter at @hirowallet</Text>
<Box as="button" onClick={() => openInNewTab('https://mobile.twitter.com/hirowallet')}>
<Text>Learm more on Twitter at @LeatherBTC</Text>
<Box as="button" onClick={() => openInNewTab('https://twitter.com/leatherbtc')}>
<FiExternalLink />
</Box>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function Brc20SendForm() {
lineHeight="1.6"
onClick={() => {
openInNewTab(
'https://hirowallet.gitbook.io/guides/bitcoin/sending-brc-20-tokens'
'https://leather.gitbook.io/guides/bitcoin/sending-brc-20-tokens'
);
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/send/sent-summary/brc20-sent-symmary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function Brc20SentSummary() {
fontWeight={500}
lineHeight="1.6"
onClick={() => {
openInNewTab('https://hirowallet.gitbook.io/guides/bitcoin/sending-brc-20-tokens');
openInNewTab('https://leather.gitbook.io/guides/bitcoin/sending-brc-20-tokens');
}}
>
{'Learn more'}
Expand Down
2 changes: 1 addition & 1 deletion src/background/messaging/rpc-message-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function rpcMessageHandler(message: WalletRequests, port: chrome.ru
id: message.id,
error: {
code: RpcErrorCode.METHOD_NOT_FOUND,
message: `"${message.method}" is not supported. Try running \`.request('supportedMethods')\` to see what Leather can do, or check out our developer documentation at https://hirowallet.gitbook.io/developers`,
message: `"${message.method}" is not supported. Try running \`.request('supportedMethods')\` to see what Leather can do, or check out our developer documentation at https://leather.gitbook.io/developers/home/welcome`,
},
})
);
Expand Down
10 changes: 5 additions & 5 deletions src/background/messaging/rpc-methods/supported-methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ export function rpcSupportedMethods(message: SupportedMethodsRequest, port: chro
makeRpcSuccessResponse('supportedMethods', {
id: message.id,
result: {
documentation: 'https://hirowallet.gitbook.io/developers',
documentation: 'https://leather.gitbook.io/developers/home/welcome',
methods: [
{
name: 'getAddresses',
docsUrl: [
'https://hirowallet.gitbook.io/developers/bitcoin/connect-users/get-addresses',
'https://leather.gitbook.io/developers/bitcoin/connect-users/get-addresses',
'https://btckit.org/docs/requests/getaddresses',
],
},
{
name: 'signMessage',
docsUrl: 'https://hirowallet.gitbook.io/developers/bitcoin/sign-messages',
docsUrl: 'https://leather.gitbook.io/developers/bitcoin/sign-messages',
},
{
name: 'sendTransfer',
docsUrl:
'https://hirowallet.gitbook.io/developers/bitcoin/sign-transactions/sending-bitcoin',
'https://leather.gitbook.io/developers/bitcoin/sign-transactions/sending-bitcoin',
},
{
name: 'signPsbt',
docsUrl:
'https://hirowallet.gitbook.io/developers/bitcoin/sign-transactions/partially-signed-bitcoin-transactions-psbts',
'https://leather.gitbook.io/developers/bitcoin/sign-transactions/partially-signed-bitcoin-transactions-psbts',
},
],
},
Expand Down
4 changes: 2 additions & 2 deletions tests-legacy/integration/onboarding/onboarding.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ describe(`Onboarding integration tests`, () => {
await wallet.waitForHomePage();
await wallet.clickSettingsButton();
await wallet.page.click(createTestSelector(SettingsSelectors.LockListItem));
await wallet.waitForHiroWalletLogo();
await wallet.page.click(wallet.$hiroWalletLogo);
await wallet.waitForLeatherLogo();
await wallet.page.click(wallet.$leatherLogo);
await wallet.waitForEnterPasswordInput();
});

Expand Down
6 changes: 3 additions & 3 deletions tests-legacy/page-objects/wallet.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class WalletPage {
$settingsViewSecretKey = createTestSelector(SettingsSelectors.ViewSecretKeyListItem);
$homePageBalancesList = createTestSelector(HomePageSelectorsLegacy.BalancesList);
$statusMessage = createTestSelector(WalletPageSelectors.StatusMessage);
$hiroWalletLogo = createTestSelector(OnboardingSelectors.HiroWalletLogoRouteToHome);
$leatherLogo = createTestSelector(OnboardingSelectors.LeatherLogoRouteToHome);
$signOutConfirmHasBackupCheckbox = createTestSelector(
SettingsSelectors.SignOutConfirmHasBackupCheckbox
);
Expand Down Expand Up @@ -114,8 +114,8 @@ export class WalletPage {
await this.page.waitForSelector(this.$enterPasswordInput, { timeout: 30000 });
}

async waitForHiroWalletLogo() {
await this.page.waitForSelector(this.$hiroWalletLogo, { timeout: 3000 });
async waitForLeatherLogo() {
await this.page.waitForSelector(this.$leatherLogo, { timeout: 3000 });
}

async waitForWelcomePage() {
Expand Down
2 changes: 1 addition & 1 deletion tests/selectors/onboarding.selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export enum OnboardingSelectors {
AllowAnalyticsBtn = 'allow-analytics-btn',
BackUpSecretKeyBtn = 'back-up-secret-key-btn',
DenyAnalyticsBtn = 'deny-analytics-btn',
HiroWalletLogoRouteToHome = 'hiro-wallet-logo-route-to-home',
LeatherLogoRouteToHome = 'leather-logo-route-to-home',
NewPasswordInput = 'set-or-enter-password-input',
NoAssetsFundAccountLink = 'no-assets-fund-account-link',
SecretKey = 'secret-key',
Expand Down
2 changes: 1 addition & 1 deletion tests/specs/message-signing/bip322-message-signing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test.describe('Message signing', () =>
test.beforeEach(async ({ extensionId, globalPage, onboardingPage, page }) => {

Check failure on line 7 in tests/specs/message-signing/bip322-message-signing.spec.ts

View workflow job for this annotation

GitHub Actions / Shard 1 of 8

[chromium] › specs/message-signing/bip322-message-signing.spec.ts:53:9 › Message signing › BIP-322 message signing › Signature rejected

2) [chromium] › specs/message-signing/bip322-message-signing.spec.ts:53:9 › Message signing › BIP-322 message signing › Signature rejected Test timeout of 30000ms exceeded while running "beforeEach" hook. 5 | test.describe('Message signing', () => 6 | test.describe('BIP-322 message signing', () => { > 7 | test.beforeEach(async ({ extensionId, globalPage, onboardingPage, page }) => { | ^ 8 | await globalPage.setupAndUseApiCalls(extensionId); 9 | await onboardingPage.signInWithTestAccount(extensionId); 10 | await page.goto('https://leather.io'); at /home/runner/work/extension/extension/tests/specs/message-signing/bip322-message-signing.spec.ts:7:10
await globalPage.setupAndUseApiCalls(extensionId);
await onboardingPage.signInWithTestAccount(extensionId);
await page.goto('https://wallet.hiro.so');
await page.goto('https://leather.io');
});

function clickActionButton(context: BrowserContext) {
Expand Down
2 changes: 1 addition & 1 deletion tests/specs/settings/settings-menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ test.describe('settings menu', () => {

await test
.expect(supportPage)
.toHaveURL('https://hirowallet.gitbook.io/guides/installing/contact-support');
.toHaveURL('https://leather.gitbook.io/guides/installing/contact-support');
});
});

0 comments on commit 203fad5

Please sign in to comment.