Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add page to generate stacking signature #172

Merged
merged 32 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fb211bf
feat: add page to generate stacking signature
hstove Mar 14, 2024
f6ee98c
fix: prettier formatting
hstove Mar 14, 2024
c310fa6
feat: add signer-info, add params to stack aggregation commit
friedger Mar 14, 2024
07c7d70
feat: add maxAmount and authId
friedger Mar 15, 2024
d273471
feat: add signature to stack-stx
friedger Mar 16, 2024
b3f64cb
chore: fmt, lint, types
friedger Mar 16, 2024
e7bbc63
feat: add signer details to stack-increase, stack-extend
friedger Mar 16, 2024
7ccee10
fix: update deps to fix type errors
friedger Mar 18, 2024
348ba1c
feat: update npm packages, add extra needed args to stack-agg-commit
hstove Mar 21, 2024
029b78a
feat: improved dark mode (logo and text colors)
hstove Mar 22, 2024
276b948
feat: add default nakamoto testnet url
hstove Mar 25, 2024
aa5e830
chore: tweaks to "topic" dropdown
hstove Mar 25, 2024
5ae1585
fix: signed in auth button
hstove Mar 25, 2024
80fef90
feat: update signer data JSON
hstove Mar 25, 2024
436c2be
fix: prettier
hstove Mar 25, 2024
d72ab3f
fix: pasting maxAmount
hstove Mar 25, 2024
88f96a0
fix: toString of bigint
hstove Mar 25, 2024
9ca30a7
fix: auth-id arg in stack-aggregation-commit
hstove Mar 30, 2024
81a479d
fix: prevent signature for agg-commit unless period is 1
hstove Apr 3, 2024
5e05154
feat: allow pooling to yourself
hstove Apr 8, 2024
408d10b
fix: include network in pool info link
hstove Apr 8, 2024
cc9e7c0
fix: show "started" info on active delegation page
hstove Apr 9, 2024
16e4d02
feat: major update to signer key validation
hstove Apr 12, 2024
586fbc0
fix: prettier
hstove Apr 12, 2024
019a351
feat: validate signature on stack-aggregation-commit without needing …
hstove Apr 17, 2024
9b8ee23
chore: update copy for liquid stacking
friedger Apr 20, 2024
5557139
chore: update copy for signer data input
friedger Apr 20, 2024
042be8a
fix: use correct topic during validation
friedger Apr 20, 2024
aac5d7b
chore: lint
friedger Apr 21, 2024
5978673
fix: spacing in signer details copy
hstove Apr 22, 2024
1fc74c6
fix: link types - use internal links in new tab
hstove Apr 22, 2024
189eb3f
fix: dont show error on first paste of signer JSON
hstove Apr 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"@noble/hashes": "1.3.2",
"@reduxjs/toolkit": "1.9.7",
"@scure/base": "1.1.3",
"@stacks/auth": "6.9.0",
"@stacks/auth": "6.13.0",
"@stacks/blockchain-api-client": "7.3.2",
"@stacks/common": "6.8.1",
"@stacks/connect": "7.7.0",
"@stacks/connect-react": "22.4.0",
"@stacks/network": "6.8.1",
"@stacks/stacking": "6.9.0",
"@stacks/transactions": "6.9.0",
"@stacks/stacking": "6.13.2",
"@stacks/transactions": "6.13.0",
"@stacks/ui": "7.10.0",
"@stacks/ui-core": "7.3.0",
"@stacks/ui-theme": "7.5.0",
Expand Down
125 changes: 91 additions & 34 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ import { DelegateStackIncrease } from './pages/stacking/pool-admin/delegate-stac
import { DelegateStackStx } from './pages/stacking/pool-admin/delegate-stack-stx/delegate-stack-stx';
import { PoolInfo } from './pages/stacking/pool-admin/pool-info/pool-info';
import { StackAggregationCommit } from './pages/stacking/pool-admin/stack-aggregation-commit/stack-aggregation-commit';
import { StackAggregationIncrease } from './pages/stacking/pool-admin/stack-aggregation-increase/stack-aggregation-increase';
import { PooledStackingInfo } from './pages/stacking/pooled-stacking-info/pooled-stacking-info';
import { SelfServiceExtend } from './pages/stacking/self-service-extend/self-service-extend';
import { GenerateSignerKeySignature } from './pages/stacking/signer/generate-signature/signer-key-signature';
import { SignerInfo } from './pages/stacking/signer/signer-info/signer-info';
import { StackExtend } from './pages/stacking/stack-extend/stack-extend';
import { StackIncrease } from './pages/stacking/stack-increase/stack-increase';
import { StartDirectStacking } from './pages/stacking/start-direct-stacking/start-direct-stacking';
Expand Down Expand Up @@ -125,6 +128,13 @@ const router = createBrowserRouter([
path: 'self-service-extend',
element: <SelfServiceExtend />,
},
{
path: 'signer',
children: [
{ index: true, element: <SignerInfo /> },
{ path: 'generate-signature', element: <GenerateSignerKeySignature /> },
],
},
{ path: 'pool/:poolAddress', element: <PoolInfo /> },
{
path: 'pool-admin',
Expand All @@ -134,6 +144,7 @@ const router = createBrowserRouter([
{ path: 'delegate-stack-extend', element: <DelegateStackExtend /> },
{ path: 'delegate-stack-increase', element: <DelegateStackIncrease /> },
{ path: 'stack-aggregation-commit', element: <StackAggregationCommit /> },
{ path: 'stack-aggregation-increase', element: <StackAggregationIncrease /> },
],
},
{
Expand Down
19 changes: 19 additions & 0 deletions src/assets/images/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex } from '@stacks/ui';
import { Flex, color } from '@stacks/ui';
import { useGlobalContext } from 'src/context/use-app-context';

import { figmaTheme } from '@constants/figma-theme';
Expand All @@ -17,12 +17,20 @@ export function Footer() {
columnGap="loose"
>
<OpenLinkInNewTab
color={figmaTheme.text}
color={color('text-caption')}
fontWeight={500}
sx={{ textDecoration: 'underline' }}
href={`${window.location.origin}/pool-admin${createSearch(activeNetwork)}`}
>
Use Hot Wallet
Pool Administration
</OpenLinkInNewTab>
<OpenLinkInNewTab
color={color('text-caption')}
fontWeight={500}
sx={{ textDecoration: 'underline' }}
href={`${window.location.origin}/signer/generate-signature${createSearch(activeNetwork)}`}
>
Signer Key Signature
</OpenLinkInNewTab>
</Flex>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/info-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ export const InfoCardLabel: FC<InfoCardLabelProps> = ({ children, ...props }) =>
);

export const InfoCardValue: FC<FlexProps> = props => (
<Text textStyle="body.large.medium" textAlign="right" {...props} />
<Text textStyle="body.large.medium" textAlign="right" color={color('text-caption')} {...props} />
);
23 changes: 16 additions & 7 deletions src/components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { useMemo } from 'react';
import { Link } from 'react-router-dom';

import { Box, Button, Flex, Text } from '@stacks/ui';
import { Box, Button, Flex, Text, color } from '@stacks/ui';
import { useGlobalContext } from 'src/context/use-app-context';
import { useHover } from 'use-events';

import logo from '@assets/images/logo.svg';
import { figmaTheme } from '@constants/figma-theme';
import darkLogo from '@assets/images/logo-dark.svg';
import lightLogo from '@assets/images/logo.svg';
import { createSearch } from '@utils/networks';
import { truncateMiddle } from '@utils/tx-utils';

import { useAuth } from './auth-provider/auth-provider';
Expand All @@ -14,16 +17,22 @@ import { OpenLinkInNewTab } from './open-link-in-new-tab';
export function Navbar() {
const { isSignedIn, signOut, signIn, address } = useAuth();
const [isHovered, bind] = useHover();
const { activeNetwork } = useGlobalContext();

const logo = useMemo(() => {
const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
return isDark ? darkLogo : lightLogo;
}, []);

return (
<Flex
flexDirection="row"
justifyContent="space-between"
p="base-loose"
borderBottom={`1px solid ${figmaTheme.borderSubdued}`}
borderBottom={`1px solid ${color('border')}`}
>
<Flex alignItems="center">
<Link to="/">
<Link to={`/${createSearch(activeNetwork)}`}>
<Flex alignItems="center">
<img src={logo} alt="Site logo with Stacks symbol and Stacking text" />
</Flex>
Expand All @@ -33,14 +42,14 @@ export function Navbar() {
<Flex p="sm" justify="right" alignItems="center">
<NetworkInfo />
<OpenLinkInNewTab href="https://wallet.hiro.so/wallet/faq#stacking" px="loose">
<Text color={figmaTheme.text} fontWeight={500}>
<Text color={color('text-body')} fontWeight={500}>
FAQ
</Text>
</OpenLinkInNewTab>
<Box pr="12px">
{isSignedIn && address ? (
<Button
width="142px"
width="160px"
boxShadow="none"
_hover={{ boxShadow: 'none' }}
mode="tertiary"
Expand Down
Loading
Loading