Skip to content
Merged
Changes from all commits
Commits
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
19 changes: 4 additions & 15 deletions src/components/multisig/proxy/ProxyControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export default function ProxyControl() {
// State management
const [proxyContract, setProxyContract] = useState<MeshProxyContract | null>(null);
const [isProxySetup, setIsProxySetup] = useState<boolean>(false);
const [, setLocalLoading] = useState<boolean>(false);
const [tvlLoading, setTvlLoading] = useState<boolean>(false);

// Setup flow state
Expand All @@ -149,10 +148,6 @@ export default function ProxyControl() {
{ address: "", unit: "lovelace", amount: "" }
]);

// UTxO selection state (UI only). We will still pass all UTxOs from provider to contract.
const [, setSelectedUtxos] = useState<UTxO[]>([]);
const [, setManualSelected] = useState<boolean>(false);

// Helper to resolve inputs for multisig controlled txs
const getMsInputs = useCallback(async (): Promise<{ utxos: UTxO[]; walletAddress: string }> => {
if (!appWallet?.address) {
Expand Down Expand Up @@ -264,8 +259,7 @@ export default function ProxyControl() {

try {
setSetupLoading(true);
setLocalLoading(true);


// Reset setup data to prevent conflicts with previous attempts
setSetupData({});
setSetupStep(0);
Expand Down Expand Up @@ -301,7 +295,6 @@ export default function ProxyControl() {
});
} finally {
setSetupLoading(false);
setLocalLoading(false);
}
}, [proxyContract, isWalletReady, getMsInputs, newTransaction, toast]);

Expand All @@ -318,7 +311,6 @@ export default function ProxyControl() {

try {
setSetupLoading(true);
setLocalLoading(true);

// If msCbor is set, route through useTransaction hook to create a signable
if (appWallet?.scriptCbor && setupData.txHex) {
Expand Down Expand Up @@ -395,7 +387,6 @@ export default function ProxyControl() {
});
} finally {
setSetupLoading(false);
setLocalLoading(false);
}
}, [setupData, activeWallet, appWallet, createProxy, refetchProxies, getMsInputs, newTransaction, userAddress, toast]);

Expand Down Expand Up @@ -600,7 +591,6 @@ export default function ProxyControl() {

try {
setSpendLoading(true);
setLocalLoading(true);

// Get the selected proxy
const proxy = proxies?.find((p: { id: string }) => p.id === selectedProxyId);
Expand Down Expand Up @@ -672,7 +662,6 @@ export default function ProxyControl() {
});
} finally {
setSpendLoading(false);
setLocalLoading(false);
}
}, [proxyContract, isWalletReady, spendOutputs, selectedProxyId, proxies, network, activeWallet, handleProxySelection, getMsInputs, newTransaction, appWallet?.scriptCbor, toast]);

Expand Down Expand Up @@ -840,9 +829,9 @@ export default function ProxyControl() {
<UTxOSelector
appWallet={appWallet}
network={network}
onSelectionChange={(utxos, manual) => {
setSelectedUtxos(utxos);
setManualSelected(manual);
onSelectionChange={() => {
// Selection is for user visibility only;
// contract uses all UTxOs from the multisig wallet.
}}
/>
</div>
Expand Down
Loading