File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
src/components/pages/wallet/governance/proposal Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,22 @@ import { useWalletsStore } from "@/lib/zustand/wallets";
1010import useAppWallet from "@/hooks/useAppWallet" ;
1111import VoteCard from "../vote-card" ;
1212import { UTxO } from "@meshsdk/core" ;
13+ import UTxOSelector from "../../new-transaction/utxoSelector" ;
1314
14- export default function WalletGovernanceProposal ( { id, utxos } : { id : string ; utxos : UTxO [ ] } ) {
15+ export default function WalletGovernanceProposal ( {
16+ id,
17+ } : {
18+ id : string ;
19+ } ) {
1520 const network = useSiteStore ( ( state ) => state . network ) ;
1621 const [ proposalMetadata , setProposalMetadata ] = useState <
1722 ProposalMetadata | undefined
1823 > ( undefined ) ;
1924 const drepInfo = useWalletsStore ( ( state ) => state . drepInfo ) ;
2025 const { appWallet } = useAppWallet ( ) ;
2126 const loading = useSiteStore ( ( state ) => state . loading ) ;
27+ const [ manualUtxos , setManualUtxos ] = useState < UTxO [ ] > ( [ ] ) ;
28+ const [ manualSelected , setManualSelected ] = useState ( false ) ;
2229
2330 useEffect ( ( ) => {
2431 const blockchainProvider = getProvider ( network ) ;
@@ -91,10 +98,20 @@ export default function WalletGovernanceProposal({ id, utxos }: { id: string; ut
9198 allowOverflow = { true }
9299 />
93100 </ CardUI >
101+ { appWallet && (
102+ < UTxOSelector
103+ appWallet = { appWallet }
104+ network = { network }
105+ onSelectionChange = { ( utxos , manual ) => {
106+ setManualUtxos ( utxos ) ;
107+ setManualSelected ( manual ) ;
108+ } }
109+ />
110+ ) }
94111 { appWallet && (
95112 < VoteCard
96113 appWallet = { appWallet }
97- utxos = { utxos }
114+ utxos = { manualUtxos }
98115 proposalId = { `${ proposalMetadata . tx_hash } #${ proposalMetadata . cert_index } ` }
99116 />
100117 ) }
You can’t perform that action at this time.
0 commit comments