Skip to content

Commit

Permalink
Merge pull request #223 from mayuran-deriv/mayuran/correct-redirectio…
Browse files Browse the repository at this point in the history
…n-for-reports

fix: contrect type in stand alone
  • Loading branch information
shafin-deriv authored Jan 3, 2025
2 parents ebfce27 + 262316c commit 26d73f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/stores/run-panel-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { isSafari, mobileOSDetect, standalone_routes } from '@/components/shared
import { contract_stages, TContractStage } from '@/constants/contract-stage';
import { run_panel } from '@/constants/run-panel';
import { ErrorTypes, MessageTypes, observer, unrecoverable_errors } from '@/external/bot-skeleton';
import { getSelectedTradeType } from '@/external/bot-skeleton/scratch/utils';
// import { journalError, switch_account_notification } from '@/utils/bot-notifications';
import GTM from '@/utils/gtm';
import { helpers } from '@/utils/store-helpers';
Expand Down Expand Up @@ -143,7 +144,12 @@ export default class RunPanelStore {
if (show_bot_stop_message)
botNotification(notification_message().bot_stop, {
label: localize('Reports'),
onClick: () => window.location.assign(standalone_routes.reports),
onClick: () => {
const contract_type = getSelectedTradeType();
const url = new URL(standalone_routes.positions);
url.searchParams.set('contract_type_bots', contract_type);
window.location.assign(url.toString());
},
});
};

Expand Down

0 comments on commit 26d73f2

Please sign in to comment.