Add Privy type wallet
This commit is contained in:
@@ -59,14 +59,14 @@ const BacktestRowDetails: React.FC<IBotRowDetails> = ({
|
||||
<CardText
|
||||
title="Money Management"
|
||||
content={
|
||||
"SL: " +(moneyManagement.stopLoss * 100).toFixed(2) + "% TP: " +
|
||||
(moneyManagement.takeProfit * 100).toFixed(2) + "%"
|
||||
"SL: " +(moneyManagement?.stopLoss * 100).toFixed(2) + "% TP: " +
|
||||
(moneyManagement?.takeProfit * 100).toFixed(2) + "%"
|
||||
}
|
||||
></CardText>
|
||||
<CardText
|
||||
title="Optimized Money Management"
|
||||
content={
|
||||
"SL: " +optimizedMoneyManagement.stopLoss.toFixed(2) + "% TP: " + optimizedMoneyManagement.takeProfit.toFixed(2) + "%"
|
||||
"SL: " +optimizedMoneyManagement?.stopLoss.toFixed(2) + "% TP: " + optimizedMoneyManagement?.takeProfit.toFixed(2) + "%"
|
||||
}
|
||||
></CardText>
|
||||
|
||||
|
||||
@@ -275,9 +275,9 @@ const BacktestTable: React.FC<IBacktestCards> = ({ list, isFetching }) => {
|
||||
|
||||
// Get average optimized money management for every backtest
|
||||
const optimized = list!.map((b) => b.optimizedMoneyManagement)
|
||||
const stopLoss = optimized.reduce((acc, curr) => acc + curr.stopLoss, 0)
|
||||
const stopLoss = optimized.reduce((acc, curr) => acc + (curr?.stopLoss ?? 0), 0)
|
||||
const takeProfit = optimized.reduce(
|
||||
(acc, curr) => acc + curr.takeProfit,
|
||||
(acc, curr) => acc + (curr?.takeProfit ?? 0),
|
||||
0
|
||||
)
|
||||
|
||||
|
||||
@@ -1631,7 +1631,7 @@ export class TradingClient extends AuthorizedApiBase {
|
||||
url_ = url_.replace(/[?&]$/, "");
|
||||
|
||||
let options_: RequestInit = {
|
||||
method: "GET",
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Accept": "application/json"
|
||||
}
|
||||
@@ -1960,6 +1960,7 @@ export enum AccountType {
|
||||
Trader = "Trader",
|
||||
Watch = "Watch",
|
||||
Auth = "Auth",
|
||||
Privy = "Privy",
|
||||
}
|
||||
|
||||
export interface User {
|
||||
|
||||
@@ -116,8 +116,8 @@ const AccountModal: React.FC<IModalProps> = ({ showModal, toggleModal }) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{selectedExchange != TradingExchanges.Evm &&
|
||||
selectedType != AccountType.Trader ? (
|
||||
{(selectedExchange != TradingExchanges.Evm && selectedType != AccountType.Trader ) ||
|
||||
(selectedExchange == TradingExchanges.Evm && selectedType == AccountType.Privy )? (
|
||||
<>
|
||||
<div className="form-control">
|
||||
<div className="input-group">
|
||||
|
||||
Reference in New Issue
Block a user