-
Notifications
You must be signed in to change notification settings - Fork 17
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
Use new registry [part 3] - assets registry #952
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
9e2cfdf
rebase main
Valentine1898 27ce3ad
use registry for storage and block processor
Valentine1898 ce82405
wip: add assets registry for minifront
Valentine1898 21dbd6c
wip
Valentine1898 9a9544f
bump @penumbra-labs/registry
Valentine1898 12dba61
asset registry refactoring
Valentine1898 cff6746
fix ui tests
Valentine1898 424c9de
fix minifront tests
Valentine1898 0b95ca3
refactor zero value view
Valentine1898 b116698
fix unbonding tests
Valentine1898 352f46b
fix storage tests
Valentine1898 8801593
format
Valentine1898 831a5a6
rebase main
Valentine1898 9dff455
Update apps/minifront/src/components/shared/asset-selector.tsx
Valentine1898 83deb25
Update apps/minifront/src/components/staking/account/delegation-value…
Valentine1898 113e080
Update apps/minifront/src/state/staking/index.ts
Valentine1898 0616033
revert Jesse reduce suggestion
Valentine1898 24037d1
bump registry & use assets from indexed-db
Valentine1898 f3e7ad9
format
Valentine1898 4a088e5
move zero-value-view & bump registry
Valentine1898 ebde4a5
wip
Valentine1898 41c5fb0
remove equivalentValues
Valentine1898 0d6eca9
rebase main
Valentine1898 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,15 @@ import InputToken from '../../shared/input-token'; | |
import { useRefreshFee } from './use-refresh-fee'; | ||
import { GasFee } from '../../shared/gas-fee'; | ||
import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; | ||
import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; | ||
import { getStakingTokenMetadata } from '../../../fetchers/registry'; | ||
|
||
export const SendAssetBalanceLoader: LoaderFunction = async (): Promise<BalancesResponse[]> => { | ||
export interface SendLoaderResponse { | ||
assetBalances: BalancesResponse[]; | ||
feeAssetMetadata: Metadata; | ||
} | ||
|
||
export const SendAssetBalanceLoader: LoaderFunction = async (): Promise<SendLoaderResponse> => { | ||
await throwIfPraxNotConnectedTimeout(); | ||
const assetBalances = await getBalances(); | ||
|
||
|
@@ -23,12 +30,13 @@ export const SendAssetBalanceLoader: LoaderFunction = async (): Promise<Balances | |
state.send.selection = assetBalances[0]; | ||
}); | ||
} | ||
const feeAssetMetadata = await getStakingTokenMetadata(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing here — should pull from extension rather than GitHub |
||
|
||
return assetBalances; | ||
return { assetBalances, feeAssetMetadata }; | ||
}; | ||
|
||
export const SendForm = () => { | ||
const assetBalances = useLoaderData() as BalancesResponse[]; | ||
const { assetBalances, feeAssetMetadata } = useLoaderData() as SendLoaderResponse; | ||
const { | ||
selection, | ||
amount, | ||
|
@@ -94,7 +102,12 @@ export const SendForm = () => { | |
balances={assetBalances} | ||
/> | ||
|
||
<GasFee fee={fee} feeTier={feeTier} setFeeTier={setFeeTier} /> | ||
<GasFee | ||
fee={fee} | ||
feeTier={feeTier} | ||
feeAssetMetadata={feeAssetMetadata} | ||
setFeeTier={setFeeTier} | ||
/> | ||
|
||
<InputBlock | ||
label='Memo' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
apps/minifront/src/components/staking/account/header/constants.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interaction with registry moved to fetchers/registry.ts