diff --git a/desktop-app/renderer/api/exchangeAccounts/exchangeAccount.ts b/desktop-app/renderer/api/exchangeAccounts/exchangeAccount.ts index 17ac4ed0..42c5ed1b 100644 --- a/desktop-app/renderer/api/exchangeAccounts/exchangeAccount.ts +++ b/desktop-app/renderer/api/exchangeAccounts/exchangeAccount.ts @@ -8,6 +8,8 @@ export interface BaseExchangeAccount { description: string exchange: string testing: boolean + privateKey: string + publicKey: string } export interface ExchangeAccount extends BaseExchangeAccount { uuid: string diff --git a/desktop-app/renderer/pages/exchangeAccounts/createExchangeAccountDialog.tsx b/desktop-app/renderer/pages/exchangeAccounts/createExchangeAccountDialog.tsx index bc04dc9f..fda4cacc 100644 --- a/desktop-app/renderer/pages/exchangeAccounts/createExchangeAccountDialog.tsx +++ b/desktop-app/renderer/pages/exchangeAccounts/createExchangeAccountDialog.tsx @@ -25,7 +25,9 @@ const defaultExchangeAccount: BaseExchangeAccount = { name: 'My Exchange Account', description: 'My Exchange Account Description', testing: true, - exchange: 'BINANCE' + exchange: 'BINANCE', + privateKey: '', + publicKey: '' } export default function CreateExchangeAccountDialog({ @@ -41,9 +43,7 @@ export default function CreateExchangeAccountDialog({ }): JSX.Element { const searchParams = useSearchParams() const [possibleExchanges, setPossibleExchanges] = useState([]) - const [exchangeAccount, setExchangeAccount] = useState( - defaultExchangeAccount - ) + useEffect(() => { const fetchPossibleExchanges = async () => { try { @@ -118,6 +118,20 @@ export default function CreateExchangeAccountDialog({ type: 'switch', zod: z.boolean(), default: defaultExchangeAccount.testing + }, + { + label: 'Public API Key', + key: 'publicKey', + type: 'input', + zod: z.string(), + default: defaultExchangeAccount.publicKey + }, + { + label: 'Private API Key', + key: 'privateKey', + type: 'input', + zod: z.string(), + default: defaultExchangeAccount.privateKey } ]} onSubmit={async (values) => {