diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-06-01 06:33:08 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-06-02 01:37:44 +0800 |
commit | 0500d2fb6e17f436535cb4bb5336c139a99e8cfe (patch) | |
tree | 650e05e51536cd0b91e77e3bff18c4ac4f676ec5 /packages/website/ts | |
parent | 31f1a9e5aa2b99dd7d802e67c5cff5854880e884 (diff) | |
download | dexon-0x-contracts-0500d2fb6e17f436535cb4bb5336c139a99e8cfe.tar.gz dexon-0x-contracts-0500d2fb6e17f436535cb4bb5336c139a99e8cfe.tar.zst dexon-0x-contracts-0500d2fb6e17f436535cb4bb5336c139a99e8cfe.zip |
Remove old parse code
Diffstat (limited to 'packages/website/ts')
-rw-r--r-- | packages/website/ts/components/legacy_portal/legacy_portal.tsx | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/packages/website/ts/components/legacy_portal/legacy_portal.tsx b/packages/website/ts/components/legacy_portal/legacy_portal.tsx index 446b7507e..e5d152e3e 100644 --- a/packages/website/ts/components/legacy_portal/legacy_portal.tsx +++ b/packages/website/ts/components/legacy_portal/legacy_portal.tsx @@ -363,32 +363,6 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta isWethNoticeDialogOpen: false, }); } - private _getSharedOrderIfExists(): Order | undefined { - const queryString = window.location.search; - if (queryString.length === 0) { - return undefined; - } - const queryParams = queryString.substring(1).split('&'); - const orderQueryParam = _.find(queryParams, queryParam => { - const queryPair = queryParam.split('='); - return queryPair[0] === 'order'; - }); - if (_.isUndefined(orderQueryParam)) { - return undefined; - } - const orderPair = orderQueryParam.split('='); - if (orderPair.length !== 2) { - return undefined; - } - - const order = JSON.parse(decodeURIComponent(orderPair[1])); - const validationResult = validator.validate(order, portalOrderSchema); - if (validationResult.errors.length > 0) { - logUtils.log(`Invalid shared order: ${validationResult.errors}`); - return undefined; - } - return order; - } private _updateScreenWidth(): void { const newScreenWidth = utils.getScreenWidth(); this.props.dispatcher.updateScreenWidth(newScreenWidth); |