aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/redux
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-08-30 05:33:55 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-08-31 04:24:24 +0800
commit82a01ef0200571d7e9079647d6b70d2d25e6ce05 (patch)
tree99401fa4bd6f5cf23b9a4be8d09fdab79bf10b06 /packages/website/ts/redux
parent81ba2a8411abc84ab052a65e1c674af44b8cf746 (diff)
downloaddexon-sol-tools-82a01ef0200571d7e9079647d6b70d2d25e6ce05.tar
dexon-sol-tools-82a01ef0200571d7e9079647d6b70d2d25e6ce05.tar.gz
dexon-sol-tools-82a01ef0200571d7e9079647d6b70d2d25e6ce05.tar.bz2
dexon-sol-tools-82a01ef0200571d7e9079647d6b70d2d25e6ce05.tar.lz
dexon-sol-tools-82a01ef0200571d7e9079647d6b70d2d25e6ce05.tar.xz
dexon-sol-tools-82a01ef0200571d7e9079647d6b70d2d25e6ce05.tar.zst
dexon-sol-tools-82a01ef0200571d7e9079647d6b70d2d25e6ce05.zip
Initial changes for v2 portal
Diffstat (limited to 'packages/website/ts/redux')
-rw-r--r--packages/website/ts/redux/dispatcher.ts10
-rw-r--r--packages/website/ts/redux/reducer.ts17
2 files changed, 11 insertions, 16 deletions
diff --git a/packages/website/ts/redux/dispatcher.ts b/packages/website/ts/redux/dispatcher.ts
index db008d319..5e79b6518 100644
--- a/packages/website/ts/redux/dispatcher.ts
+++ b/packages/website/ts/redux/dispatcher.ts
@@ -7,7 +7,7 @@ import {
AssetToken,
BlockchainErrs,
Language,
- Order,
+ PortalOrder,
ProviderType,
ScreenWidths,
Side,
@@ -50,7 +50,7 @@ export class Dispatcher {
type: ActionTypes.UpdateOrderSalt,
});
}
- public updateUserSuppliedOrderCache(order: Order): void {
+ public updateUserSuppliedOrderCache(order: PortalOrder): void {
this._dispatch({
data: order,
type: ActionTypes.UpdateUserSuppliedOrderCache,
@@ -149,10 +149,10 @@ export class Dispatcher {
type: ActionTypes.ForceTokenStateRefetch,
});
}
- public updateECSignature(ecSignature: ECSignature): void {
+ public updateSignature(signature: string): void {
this._dispatch({
- data: ecSignature,
- type: ActionTypes.UpdateOrderECSignature,
+ data: signature,
+ type: ActionTypes.UpdateOrderSignature,
});
}
public updateUserWeiBalance(balance?: BigNumber): void {
diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts
index 1bc4611e0..99907e93e 100644
--- a/packages/website/ts/redux/reducer.ts
+++ b/packages/website/ts/redux/reducer.ts
@@ -7,7 +7,7 @@ import {
Action,
ActionTypes,
BlockchainErrs,
- Order,
+ PortalOrder,
ProviderType,
ScreenWidths,
Side,
@@ -31,7 +31,7 @@ export interface State {
orderExpiryTimestamp: BigNumber;
orderFillAmount: BigNumber;
orderTakerAddress: string;
- orderECSignature: ECSignature;
+ orderSignature: string;
orderSalt: BigNumber;
nodeVersion: string;
screenWidth: ScreenWidths;
@@ -45,7 +45,7 @@ export interface State {
isPortalOnboardingShowing: boolean;
hasPortalOnboardingBeenClosed: boolean;
// Note: cache of supplied orderJSON in fill order step. Do not use for anything else.
- userSuppliedOrderCache: Order;
+ userSuppliedOrderCache: PortalOrder;
// Docs
docsVersion: string;
@@ -65,11 +65,7 @@ export const INITIAL_STATE: State = {
networkId: undefined,
orderExpiryTimestamp: utils.initialOrderExpiryUnixTimestampSec(),
orderFillAmount: undefined,
- orderECSignature: {
- r: '',
- s: '',
- v: 27,
- },
+ orderSignature: '',
orderTakerAddress: constants.NULL_ADDRESS,
orderSalt: generatePseudoRandomSalt(),
nodeVersion: undefined,
@@ -90,7 +86,6 @@ export const INITIAL_STATE: State = {
// Docs
docsVersion: DEFAULT_DOCS_VERSION,
availableDocVersions: [DEFAULT_DOCS_VERSION],
-
// Shared
flashMessage: undefined,
providerType: ProviderType.Injected,
@@ -207,10 +202,10 @@ export function reducer(state: State = INITIAL_STATE, action: Action): State {
lastForceTokenStateRefetch: moment().unix(),
};
- case ActionTypes.UpdateOrderECSignature: {
+ case ActionTypes.UpdateOrderSignature: {
return {
...state,
- orderECSignature: action.data,
+ orderSignature: action.data,
};
}