Skip to content

Commit

Permalink
Merge branch 'main' into feat/adr-006-client-apis
Browse files Browse the repository at this point in the history
  • Loading branch information
VanishMax authored Jul 29, 2024
2 parents fe321c8 + 318690e commit 7f4d398
Show file tree
Hide file tree
Showing 209 changed files with 7,189 additions and 1,464 deletions.
6 changes: 6 additions & 0 deletions .changeset/afraid-seals-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'minifront': minor
'@repo/ui': minor
---

fix auctions source
5 changes: 5 additions & 0 deletions .changeset/afraid-trains-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@penumbra-zone/perspective': minor
---

Add additional transaction type classifications
5 changes: 5 additions & 0 deletions .changeset/old-jobs-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@penumbra-zone/wasm': minor
---

Properly derive DelegatorVoteView from perspective
5 changes: 0 additions & 5 deletions .changeset/seven-gifts-play.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/small-queens-drum.md

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/deploy-ui-preview-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Deploys the static website for the UI storybook to "preview" environment,
# on every merge into main branch.
name: Deploy UI to preview
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install
working-directory: packages/ui

- name: Build static site
run: pnpm build-storybook
working-directory: packages/ui

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PENUMBRA_UI }}
channelId: live
target: preview
entryPoint: packages/ui
projectId: penumbra-ui
38 changes: 38 additions & 0 deletions .github/workflows/deploy-ui-preview-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Deploys the static website for the UI storybook to a temporary environment,
# with an ephemeral URL posted to the PR for sharing/review.
name: Deploy UI to temporary URL
on:
workflow_dispatch:
pull_request:
paths:
# Only deploy an ephemeral Storybook preview for PRs that make changes to
# the UI package.
- 'packages/ui/src/**'
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install
working-directory: packages/ui

- name: Build static site
run: pnpm build-storybook
working-directory: packages/ui

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PENUMBRA_UI }}
target: preview
entryPoint: packages/ui
projectId: penumbra-ui
34 changes: 34 additions & 0 deletions .github/workflows/deploy-ui-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Deploys the static website for the UI storybook to final prod website,
# on every tag push into main branch.
name: Deploy UI to stable channel
on:
# Support ad-hoc runs
workflow_dispatch:
# Run automatically on tag push
push:
tags:
- '**[0-9]+.[0-9]+.[0-9]+*'
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install
working-directory: packages/ui

- name: Build static site
run: pnpm build-storybook
working-directory: packages/ui

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PENUMBRA_UI }}
channelId: live
target: stable
entryPoint: packages/ui
projectId: penumbra-ui
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ packages/*/penumbra-zone-*.tgz
packages/*/repo-*-*.tgz
packages/*/package

tsconfig.tsbuildinfo
tsconfig.tsbuildinfo

# Storybook builds
storybook-static
26 changes: 1 addition & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,34 +75,10 @@ pnpm dev
```

You now have a local copy of Minifront available at
[`https://localhost:5173`](https://localhost:5173) and an unbundled Prax is
available at [`apps/extension/dist`](apps/extension/dist), ready to be loaded
into your browser.
[`https://localhost:5173`](https://localhost:5173).

Minifront will hot-reload.

If you're working on Prax, Chrome will show extension page changes after a
manual refresh, but cannot reload the extension worker scripts or content
scripts. For worker script changes, you must manually reload the extension. For
content script changes, you must also manually reload pages hosting the injected
scripts.

#### Loading your unbundled build of Prax into Chrome

After building Prax, you can load it into Chrome.

It's recommended to use a dedicated browser profile for development, not your
personal profile.

1. Go to the Extensions page [`chrome://extensions`](chrome://extensions)
2. Enable _Developer Mode_ by clicking the toggle switch at the top right
3. Click the button _Load unpacked extension_ at the top and locate your cloned
repository. Select the extension's build output directory
[`apps/extension/dist`](../apps/extension/dist).
4. Activate the extension to enter onboarding.
- You may set a blank password.
- You can pin the Prax extension button to your toolbar for quick access.

## Security

If you believe you've found a security-related issue with Penumbra,
Expand Down
86 changes: 86 additions & 0 deletions apps/minifront/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,91 @@
# minifront

## 6.12.3

### Patch Changes

- Updated dependencies [3477bef]
- Updated dependencies [16147fe]
- @penumbra-zone/types@17.0.1
- @penumbra-zone/perspective@18.0.0
- @penumbra-zone/crypto-web@16.0.1
- @repo/ui@7.2.1

## 6.12.2

### Patch Changes

- Updated dependencies [a788eff]
- Updated dependencies [54a5d66]
- @penumbra-zone/transport-dom@7.4.0
- @penumbra-zone/client@14.0.0
- @repo/ui@7.2.0

## 6.12.1

### Patch Changes

- Updated dependencies [86c1bbe]
- @penumbra-zone/perspective@17.0.0
- @penumbra-zone/getters@12.1.0
- @repo/ui@7.1.0
- @penumbra-zone/types@17.0.0
- @penumbra-zone/crypto-web@16.0.0

## 6.12.0

### Minor Changes

- 0233722: added proxying timestampByHeight

### Patch Changes

- 52fdce2: Add decimal part validation (its length cannot exeed the exponent of a selected token)
- Updated dependencies [e0f4258]
- Updated dependencies [0233722]
- Updated dependencies [978efe6]
- Updated dependencies [af04e2a]
- Updated dependencies [26bd932]
- @penumbra-zone/zquery@3.0.1
- @penumbra-zone/types@16.1.0
- @penumbra-zone/client@13.0.0
- @penumbra-zone/transport-dom@7.3.0
- @repo/ui@7.0.3
- @penumbra-zone/crypto-web@15.0.0
- @penumbra-zone/perspective@16.0.0

## 6.11.4

### Patch Changes

- Updated dependencies [22bf02c]
- @penumbra-zone/protobuf@5.5.0
- @penumbra-zone/client@12.0.0
- @penumbra-zone/getters@12.0.0
- @penumbra-zone/perspective@15.0.0
- @penumbra-zone/types@16.0.0
- @repo/ui@7.0.2
- @penumbra-zone/crypto-web@14.0.0

## 6.11.3

### Patch Changes

- Updated dependencies [3aaead1]
- @penumbra-zone/crypto-web@13.0.1
- @penumbra-zone/types@15.1.1
- @repo/ui@7.0.1
- @penumbra-zone/perspective@14.0.2

## 6.11.2

### Patch Changes

- Updated dependencies [ab09596]
- @penumbra-zone/client@11.1.1
- @penumbra-zone/perspective@14.0.1
- @repo/ui@7.0.0

## 6.11.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/minifront/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minifront",
"version": "6.11.1",
"version": "6.12.3",
"private": true,
"license": "(MIT OR Apache-2.0)",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const DestinationAddr = () => {
// Set initial account to trigger address loading
useEffect(() => {
setAccount(0);
}, []);
}, [setAccount]);

return (
<div className='mb-2 flex w-full flex-col gap-1 text-stone-700'>
Expand Down
5 changes: 5 additions & 0 deletions apps/minifront/src/components/ibc/ibc-out/ibc-out-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ export const IbcOutForm = () => {
issue: 'insufficient funds',
checkFn: () => validationErrors.amountErr,
},
{
type: 'error',
issue: 'invalid decimal length',
checkFn: () => validationErrors.exponentErr,
},
]}
balances={filteredBalances}
/>
Expand Down
7 changes: 7 additions & 0 deletions apps/minifront/src/components/send/send-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const SendForm = () => {
memo,
fee,
feeTier,
assetFeeMetadata,
setAmount,
setSelection,
setRecipient,
Expand Down Expand Up @@ -82,6 +83,11 @@ export const SendForm = () => {
issue: 'insufficient funds',
checkFn: () => validationErrors.amountErr,
},
{
type: 'error',
issue: 'invalid decimal length',
checkFn: () => validationErrors.exponentErr,
},
]}
balances={transferableBalancesResponses?.data ?? []}
loading={transferableBalancesResponses?.loading}
Expand All @@ -97,6 +103,7 @@ export const SendForm = () => {
feeTier={feeTier}
stakingAssetMetadata={stakingTokenMetadata.data}
setFeeTier={setFeeTier}
assetFeeMetadata={assetFeeMetadata}
/>

<InputBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const eduPanelContent: Record<EduPanel, string> = {
[EduPanel.IBC_WITHDRAW]:
'IBC to a connected chain. Note that if the chain is a transparent chain, the transaction will be visible to others.',
[EduPanel.SWAP]:
'Shielded swaps between any kind of cryptoasset, with sealed-bid, batch pricing and no frontrunning. Only the batch totals are revealed, providing long-term privacy. Penumbra has no MEV, because transactions do not leak data about user activity.',
'Shielded batch swaps between any kind of cryptoasset, using an intelligent batch pricing mechanism. While the assets and amounts are publicly revealed, user identities and specific transaction details remain hidden, ensuring long-term privacy.',
[EduPanel.SWAP_AUCTION]:
"Offer a specific quantity of cryptocurrency at decreasing prices until all the tokens are sold. Buyers can place bids at the price they're willing to pay, with the auction concluding when all tokens are sold or when the auction time expires. This mechanism allows for price discovery based on market demand, with participants potentially acquiring tokens at prices lower than initially offered.",
[EduPanel.STAKING]:
Expand Down
14 changes: 7 additions & 7 deletions apps/minifront/src/components/shared/gas-fee.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {
Fee,
FeeTier_Tier,
} from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/fee/v1/fee_pb.js';
} from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/fee/v1/fee_pb';
import { SegmentedPicker, SegmentedPickerOption } from '@repo/ui/components/ui/segmented-picker';
import { InputBlock } from './input-block';
import { ValueViewComponent } from '@repo/ui/components/ui/value';
import {
Metadata,
ValueView,
} from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb.js';
} from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb';

const FEE_TIER_OPTIONS: SegmentedPickerOption<FeeTier_Tier>[] = [
{
Expand All @@ -30,23 +30,23 @@ export const GasFee = ({
feeTier,
stakingAssetMetadata,
setFeeTier,
assetFeeMetadata,
}: {
fee: Fee | undefined;
feeTier: FeeTier_Tier;
stakingAssetMetadata?: Metadata;
assetFeeMetadata?: Metadata;
setFeeTier: (feeTier: FeeTier_Tier) => void;
}) => {
if (!stakingAssetMetadata) {
return null;
}
// If the metadata for the fee asset is undefined, fallback to using the bundled staking asset metadata.
const feeMetadata = assetFeeMetadata ?? stakingAssetMetadata;

const feeValueView = new ValueView({
valueView: {
case: 'knownAssetId',
value: {
amount: fee?.amount ?? { hi: 0n, lo: 0n },
// TODO: once https://github.com/penumbra-zone/web/pull/1468 is merged, change this to metadata: assetFeeMedata
metadata: stakingAssetMetadata,
metadata: feeMetadata,
},
},
});
Expand Down
Loading

0 comments on commit 7f4d398

Please sign in to comment.