Skip to content

Commit

Permalink
removed transaction time banner (#5832)
Browse files Browse the repository at this point in the history
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
  • Loading branch information
farrah-deriv and carolsachdeva committed Jun 30, 2022
1 parent 47fb870 commit 8b8ceff
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 80 deletions.
2 changes: 1 addition & 1 deletion packages/p2p/src/components/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const App = props => {
general_store.setActiveIndex(general_store.path.my_ads);
}
});
general_store.setP2PConfig();

return () => general_store.onUnmount();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Expand Down
53 changes: 0 additions & 53 deletions packages/p2p/src/components/my-ads/reduce-order-time-banner.jsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jest.mock('Stores', () => ({
active_notification_count: 0,
inactive_notification_count: 0,
order_table_type: false,
order_timeout: { hours: 1, minutes: 10 },
},
}),
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import ToggleContainer from 'Components/misc/toggle-container.jsx';
import { order_list } from 'Constants/order-list';
import { useStores } from 'Stores';
import OrderTableContent from './order-table-content.jsx';
import ReduceOrderTimeBanner from 'Components/my-ads/reduce-order-time-banner.jsx';

const OrderTable = ({ showDetails }) => {
const { general_store } = useStores();
Expand All @@ -28,7 +27,6 @@ const OrderTable = ({ showDetails }) => {
const is_active_tab = general_store.order_table_type === order_list.ACTIVE;
return (
<React.Fragment>
<ReduceOrderTimeBanner />
<div className='orders-tab'>
<div className='orders-tab__header '>
<ToggleContainer>
Expand Down
16 changes: 0 additions & 16 deletions packages/p2p/src/stores/general-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default class GeneralStore extends BaseStore {
@observable notification_count = 0;
@observable order_table_type = order_list.ACTIVE;
@observable orders = [];
@observable order_timeout = 0;
@observable parameters = null;
@observable poi_status = null;
@observable.ref props = {};
Expand Down Expand Up @@ -382,21 +381,6 @@ export default class GeneralStore extends BaseStore {
this.order_table_type = order_table_type;
}

@action.bound
setOrderTimeOut(time) {
this.order_timeout = time;
}

@action.bound
setP2PConfig() {
requestWS({ website_status: 1 }).then(response => {
if (response && !response.error) {
const { order_payment_period } = response.website_status?.p2p_config;
this.setOrderTimeOut(order_payment_period);
}
});
}

@action.bound
setP2pOrderList(order_response) {
if (order_response.error) {
Expand Down
7 changes: 0 additions & 7 deletions packages/p2p/src/utils/date-time.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,3 @@ export const secondsToTimer = distance => {

return `${toDoubleDigits(hours)}:${toDoubleDigits(minutes)}:${toDoubleDigits(seconds)}`;
};

export const minutesToHours = time_in_minutes => {
// Convert the time in minutes to hours
const hours = Math.floor(time_in_minutes / 60);
const minutes = time_in_minutes % 60;
return { hours, minutes };
};

0 comments on commit 8b8ceff

Please sign in to comment.