Skip to content

Commit

Permalink
fix: Ensure signer fallback on corrupt source (#2021)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat authored Mar 10, 2024
1 parent d85d5ff commit 26e1793
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/library/SubmitTx/ManualSign/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ export const ManualSign = (props: SubmitProps & { buttons?: ReactNode[] }) => {
}
}, [getTxSignature()]);

return (
<>
{source === 'ledger' && <Ledger {...props} />}
{source === 'vault' && <Vault {...props} />}
</>
);
// Determine which signing method to use. NOTE: Falls back to `ledger` on all other sources to
// ensure submit button is displayed.
switch (source) {
case 'vault':
return <Vault {...props} />;
default:
return <Ledger {...props} />;
}
};

0 comments on commit 26e1793

Please sign in to comment.