-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1301 from DA0-DA0/development
Deploy governance proposal submit and deposit actions (#1300)
- Loading branch information
Showing
44 changed files
with
1,959 additions
and
221 deletions.
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
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
82 changes: 82 additions & 0 deletions
82
packages/stateful/actions/core/chain_governance/GovernanceDeposit/Component.stories.tsx
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import { ComponentMeta, ComponentStory } from '@storybook/react' | ||
import { cosmos } from 'interchain-rpc' | ||
import Long from 'long' | ||
|
||
import { ReactHookFormDecorator } from '@dao-dao/storybook' | ||
import { GovProposalWithDecodedContent } from '@dao-dao/types' | ||
|
||
import { PayEntityDisplay } from '../../../../components/PayEntityDisplay' | ||
import { TokenAmountDisplay } from '../../../../components/TokenAmountDisplay' | ||
import { GovernanceDepositComponent } from './Component' | ||
|
||
export default { | ||
title: | ||
'DAO DAO / packages / stateful / actions / core / chain_governance / GovernanceDeposit', | ||
component: GovernanceDepositComponent, | ||
decorators: [ReactHookFormDecorator], | ||
} as ComponentMeta<typeof GovernanceDepositComponent> | ||
|
||
const Template: ComponentStory<typeof GovernanceDepositComponent> = (args) => ( | ||
<GovernanceDepositComponent {...args} /> | ||
) | ||
|
||
const { ProposalStatus } = cosmos.gov.v1beta1 | ||
|
||
const makeProposal = (): GovProposalWithDecodedContent => ({ | ||
proposalId: Long.fromInt(1), | ||
content: {} as any, | ||
decodedContent: { | ||
'@type': '/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal', | ||
title: 'Upgrade to v10 Alpha 1', | ||
description: | ||
'Full details on the testnets github. Target binary is v10.0.0-alpha.2', | ||
plan: { | ||
name: 'v10', | ||
time: '0001-01-01T00:00:00Z', | ||
height: '20000', | ||
info: '', | ||
upgraded_client_state: null, | ||
}, | ||
} as any, | ||
status: ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD, | ||
finalTallyResult: { | ||
yes: '54076995000', | ||
abstain: '0', | ||
no: '0', | ||
noWithVeto: '0', | ||
}, | ||
submitTime: new Date('2022-09-23T22:56:17.961690524Z'), | ||
depositEndTime: new Date('2022-10-03T22:56:17.961690524Z'), | ||
totalDeposit: [ | ||
{ | ||
denom: 'ujunox', | ||
amount: '500000000', | ||
}, | ||
], | ||
votingStartTime: new Date('2022-09-23T22:56:17.961690524Z'), | ||
votingEndTime: new Date('2022-09-24T10:56:17.961690524Z'), | ||
}) | ||
|
||
export const Default = Template.bind({}) | ||
Default.args = { | ||
fieldNamePrefix: '', | ||
allActionsWithData: [], | ||
index: 0, | ||
data: { | ||
proposalId: '', | ||
deposit: [ | ||
{ | ||
denom: 'JUNOX', | ||
amount: 1, | ||
}, | ||
], | ||
}, | ||
isCreating: true, | ||
errors: {}, | ||
options: { | ||
proposals: [makeProposal(), makeProposal(), makeProposal(), makeProposal()], | ||
depositTokens: { loading: false, data: [] }, | ||
PayEntityDisplay, | ||
TokenAmountDisplay, | ||
}, | ||
} |
Oops, something went wrong.
4de2b2d
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.
Successfully deployed to the following URLs:
sda-juno – ./apps/sda
sda-juno-git-main-da0da0.vercel.app
dao.daodao.zone
sda-juno-da0da0.vercel.app
dao.juno.daodao.zone
dao-dao-ui-sdp.vercel.app
4de2b2d
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.
Successfully deployed to the following URLs:
dapp-juno – ./apps/dapp
dapp-juno-git-main-da0da0.vercel.app
daodao.zone
dapp-juno-da0da0.vercel.app
dao-dao.vercel.app
v1.daodao.zone
juno.daodao.zone
www.daodao.zone