zh-web-sdk 2.4.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -5
- package/dist/index.js.map +2 -2
- package/dist/redux/reducers/index.d.ts +2 -0
- package/dist/redux/store/index.d.ts +2 -0
- package/dist/types.d.ts +3 -1
- package/package.json +1 -1
- package/src/iframe-container/AppContainer.tsx +13 -1
- package/src/redux/reducers/index.ts +2 -0
- package/src/types.ts +6 -2
|
@@ -6,5 +6,7 @@ declare const rootReducer: import("redux").Reducer<import("redux").CombinedState
|
|
|
6
6
|
"crypto-buy": import("./crypto-buy").ICryptoBuyState;
|
|
7
7
|
"crypto-sell": import("./crypto-sell").ICryptoSellState;
|
|
8
8
|
"csp-crypto-withdrawals": import("./crypto-withdrawals").ICryptoWithdrawalsState;
|
|
9
|
+
"csp-fiat-withdrawals": import("./fiat-withdrawals").IFiatWithdrawalsState;
|
|
10
|
+
"csp-crypto-sell": import("./crypto-sell").ICryptoSellState;
|
|
9
11
|
}>, import("./crypto-withdrawals").ICryptoWithdrawalsAction>;
|
|
10
12
|
export default rootReducer;
|
|
@@ -6,5 +6,7 @@ declare const store: import("redux").Store<import("redux").EmptyObject & {
|
|
|
6
6
|
"crypto-buy": import("../reducers/crypto-buy").ICryptoBuyState;
|
|
7
7
|
"crypto-sell": import("../reducers/crypto-sell").ICryptoSellState;
|
|
8
8
|
"csp-crypto-withdrawals": import("../reducers/crypto-withdrawals").ICryptoWithdrawalsState;
|
|
9
|
+
"csp-fiat-withdrawals": import("../reducers/fiat-withdrawals").IFiatWithdrawalsState;
|
|
10
|
+
"csp-crypto-sell": import("../reducers/crypto-sell").ICryptoSellState;
|
|
9
11
|
}, import("../reducers/crypto-withdrawals").ICryptoWithdrawalsAction>;
|
|
10
12
|
export default store;
|
package/dist/types.d.ts
CHANGED
|
@@ -262,7 +262,9 @@ export declare enum AppIdentifier {
|
|
|
262
262
|
FIAT_WITHDRAWALS = "fiat-withdrawals",
|
|
263
263
|
CRYPTO_BUY = "crypto-buy",
|
|
264
264
|
CRYPTO_SELL = "crypto-sell",
|
|
265
|
-
CSP_CRYPTO_WITHDRAWALS = "csp-crypto-withdrawals"
|
|
265
|
+
CSP_CRYPTO_WITHDRAWALS = "csp-crypto-withdrawals",
|
|
266
|
+
CSP_FIAT_WITHDRAWALS = "csp-fiat-withdrawals",
|
|
267
|
+
CSP_CRYPTO_SELL = "csp-crypto-sell"
|
|
266
268
|
}
|
|
267
269
|
/**
|
|
268
270
|
* Map that maps the app AppIdentifier to the redux action prefix
|
package/package.json
CHANGED
|
@@ -59,6 +59,16 @@ interface AppContainerMappedProps {
|
|
|
59
59
|
isAppLoaded: boolean;
|
|
60
60
|
jwt: string;
|
|
61
61
|
};
|
|
62
|
+
[AppIdentifier.CSP_FIAT_WITHDRAWALS]: {
|
|
63
|
+
isAppActive: boolean;
|
|
64
|
+
isAppLoaded: boolean;
|
|
65
|
+
jwt: string;
|
|
66
|
+
};
|
|
67
|
+
[AppIdentifier.CSP_CRYPTO_SELL]: {
|
|
68
|
+
isAppActive: boolean;
|
|
69
|
+
isAppLoaded: boolean;
|
|
70
|
+
jwt: string;
|
|
71
|
+
};
|
|
62
72
|
}
|
|
63
73
|
|
|
64
74
|
const appLoadTime = Date.now();
|
|
@@ -70,7 +80,9 @@ const mapAppToTitle = {
|
|
|
70
80
|
[AppIdentifier.FIAT_WITHDRAWALS]: "Fiat Withdrawals",
|
|
71
81
|
[AppIdentifier.CRYPTO_BUY]: "Crypto Buy",
|
|
72
82
|
[AppIdentifier.CRYPTO_SELL]: "Crypto Sell",
|
|
73
|
-
[AppIdentifier.CSP_CRYPTO_WITHDRAWALS]: "CBP Crypto Withdrawals"
|
|
83
|
+
[AppIdentifier.CSP_CRYPTO_WITHDRAWALS]: "CBP Crypto Withdrawals",
|
|
84
|
+
[AppIdentifier.CSP_FIAT_WITHDRAWALS]: "CBP Fiat Withdrawals",
|
|
85
|
+
[AppIdentifier.CSP_CRYPTO_SELL]: "Crypto Sell"
|
|
74
86
|
};
|
|
75
87
|
|
|
76
88
|
const AppContainer = ({
|
|
@@ -14,6 +14,8 @@ const rootReducer = combineReducers({
|
|
|
14
14
|
["crypto-buy"]: cryptoBuyReducer,
|
|
15
15
|
["crypto-sell"]: cryptoSellReducer,
|
|
16
16
|
["csp-crypto-withdrawals"]: cryptoWithdrawalsReducer,
|
|
17
|
+
["csp-fiat-withdrawals"]: fiatWithdrawalsReducer,
|
|
18
|
+
["csp-crypto-sell"]: cryptoSellReducer,
|
|
17
19
|
});
|
|
18
20
|
|
|
19
21
|
export default rootReducer;
|
package/src/types.ts
CHANGED
|
@@ -162,7 +162,7 @@ export enum IncomingMessageType {
|
|
|
162
162
|
/**
|
|
163
163
|
* FiatDepositsCompleted is received when the Fiat
|
|
164
164
|
* deposits flow has completed successfully.
|
|
165
|
-
*/
|
|
165
|
+
*/
|
|
166
166
|
FiatDepositsCompleted = "FIAT_DEPOSITS_COMPLETED",
|
|
167
167
|
/**
|
|
168
168
|
* FiatDepositsFailed is received when the Fiat
|
|
@@ -272,6 +272,8 @@ export enum AppIdentifier {
|
|
|
272
272
|
CRYPTO_BUY = "crypto-buy",
|
|
273
273
|
CRYPTO_SELL = "crypto-sell",
|
|
274
274
|
CSP_CRYPTO_WITHDRAWALS = "csp-crypto-withdrawals",
|
|
275
|
+
CSP_FIAT_WITHDRAWALS = "csp-fiat-withdrawals",
|
|
276
|
+
CSP_CRYPTO_SELL = "csp-crypto-sell"
|
|
275
277
|
}
|
|
276
278
|
|
|
277
279
|
/**
|
|
@@ -285,7 +287,9 @@ export const appIdentifierToActionPrefixMap = new Map(
|
|
|
285
287
|
[AppIdentifier.FIAT_WITHDRAWALS, "FIAT_WITHDRAWALS_"],
|
|
286
288
|
[AppIdentifier.CRYPTO_BUY, "CRYPTO_BUY_"],
|
|
287
289
|
[AppIdentifier.CRYPTO_SELL, "CRYPTO_SELL_"],
|
|
288
|
-
[AppIdentifier.CSP_CRYPTO_WITHDRAWALS, "CRYPTO_WITHDRAWALS_"] // CSP apps uses the same events as "regular" flow
|
|
290
|
+
[AppIdentifier.CSP_CRYPTO_WITHDRAWALS, "CRYPTO_WITHDRAWALS_"], // CSP apps uses the same events as "regular" flow
|
|
291
|
+
[AppIdentifier.CSP_FIAT_WITHDRAWALS, "FIAT_WITHDRAWALS_"], // CSP apps uses the same events as "regular" flow
|
|
292
|
+
[AppIdentifier.CSP_CRYPTO_SELL, "CRYPTO_SELL_"],
|
|
289
293
|
])
|
|
290
294
|
|
|
291
295
|
export interface ISetJWTParameters {
|