zh-web-sdk 2.3.3 → 2.3.4
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/README.md +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +4 -4
- package/dist/redux/reducers/fiat-deposits.d.ts +13 -0
- package/dist/redux/reducers/index.d.ts +1 -1
- package/dist/redux/store/index.d.ts +1 -1
- package/dist/types.d.ts +9 -9
- package/package.json +1 -1
- package/src/iframe-container/AppContainer.tsx +2 -2
- package/src/index.tsx +10 -10
- package/src/redux/reducers/fiat-deposits.ts +64 -0
- package/src/redux/reducers/index.ts +3 -3
- package/src/types.ts +15 -15
- package/dist/redux/reducers/ach-deposits.d.ts +0 -13
- package/src/redux/reducers/ach-deposits.ts +0 -64
package/README.md
CHANGED
|
@@ -89,9 +89,9 @@ We forward events that come from the UI to the Native App using the `postMessage
|
|
|
89
89
|
- **Crypto Withdrawals:**
|
|
90
90
|
- `CRYPTO_WITHDRAWALS_APP_LOADED` Sent when the App is loaded in the first time
|
|
91
91
|
- `CRYPTO_WITHDRAWALS_CLOSE_BUTTON_CLICKED` Sent when the user clicks the Close button on the top-right corner
|
|
92
|
-
- **
|
|
93
|
-
- `
|
|
94
|
-
- `
|
|
92
|
+
- **Fiat Deposits:**
|
|
93
|
+
- `FIAT_DEPOSITS_APP_LOADED` Sent when the App is loaded in the first time
|
|
94
|
+
- `FIAT_DEPOSITS_CLOSE_BUTTON_CLICKED` Sent when the user clicks the Close button on the top-right corner
|
|
95
95
|
- **Fiat Withdrawals:**
|
|
96
96
|
- `FIAT_WITHDRAWALS_APP_LOADED` Sent when the App is loaded in the first time
|
|
97
97
|
- `FIAT_WITHDRAWALS_CLOSE_BUTTON_CLICKED` Sent when the user clicks the Close button on the top-right corner
|
|
@@ -110,9 +110,9 @@ To control the `WebView` you can also send messages *down*, using the `postMessa
|
|
|
110
110
|
- **Crypto Withdrawals**
|
|
111
111
|
- `{type: "OPEN_MODAL", payload:{jwt: "<JWT_HERE>", appIdentifier: "crypto-withdrawals"} }`: It will open the Crypto Withdrawals modal with the JWT provided
|
|
112
112
|
- `{type: "CLOSE_MODAL", payload:{appIdentifier: "crypto-withdrawals"}}`: It will close the Crypto Withdrawals modal
|
|
113
|
-
- **
|
|
114
|
-
- `{type: "OPEN_MODAL", payload:{jwt: "<JWT_HERE>", appIdentifier: "
|
|
115
|
-
- `{type: "CLOSE_MODAL", payload:{appIdentifier: "
|
|
113
|
+
- **Fiat Deposits**
|
|
114
|
+
- `{type: "OPEN_MODAL", payload:{jwt: "<JWT_HERE>", appIdentifier: "fiat-deposits"} }`: It will open the FIAT Deposits modal with the JWT provided
|
|
115
|
+
- `{type: "CLOSE_MODAL", payload:{appIdentifier: "fiat-deposits"}}`: It will close the Fiat Deposits modal
|
|
116
116
|
- **Fiat Withdrawals**
|
|
117
117
|
- `{type: "OPEN_MODAL", payload:{jwt: "<JWT_HERE>", appIdentifier: "fiat-withdrawals"} }`: It will open the Fiat withdrawals modal with the JWT provided
|
|
118
118
|
- `{type: "CLOSE_MODAL", payload:{appIdentifier: "fiat-withdrawals"}}`: It will close the Fiat withdrawals modal
|
|
@@ -140,7 +140,7 @@ const App = () => {
|
|
|
140
140
|
const mockJWT =
|
|
141
141
|
'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ6ZXJvaGFzaC5jb20iLCJzdWIiOiJ0ZXN0U3ViamVjdCIsImF1ZCI6WyJ6ZXJvaGFzaC5jb20iXSwiZXhwIjoxNjk1OTc2OTMzLCJpYXQiOjE2OTMzODQ5MzMsInBheWxvYWQiOnsiZW1haWwiOiJteS1lbWFpbEB0ZXN0LmNvbSIsInBhcnRpY2lwYW50X2NvZGUiOiJwYXJ0aWNpcGFudC1jb2RlIiwicGxhdGZvcm1fbmFtZSI6InBsYXRmb3JtLW5hbWUiLCJwbGF0Zm9ybV9jb2RlIjoicGxhdGZvcm0tY29kZSIsInBsYXRmb3JtX2FncmVlbWVudF9saW5rIjoicGxhdGZvcm0tYWdyZWVtZW50LWxpbmsifX0.r549t4J_iQ8wP5pnD2uTdRaRm4nHLO722lDmhbGoIc0E_cKVyVYnxZTO1DnXJ6NUJ6a3DvnkGv78iQHqvnFTmg'
|
|
142
142
|
const apps = {
|
|
143
|
-
|
|
143
|
+
fiatDeposits: { identifier: 'fiat-deposits', jwt: mockJWT },
|
|
144
144
|
cryptoBuy: { identifier: 'crypto-buy', jwt: mockJWT },
|
|
145
145
|
cryptoSell: { identifier: 'crypto-sell', jwt: mockJWT },
|
|
146
146
|
cryptoWithdrawals: { identifier: 'crypto-withdrawals', jwt: mockJWT },
|
|
@@ -151,7 +151,7 @@ const App = () => {
|
|
|
151
151
|
* Receive messages from sdk-mobile. Currently we expose the following event types:
|
|
152
152
|
* "ONBOARDING_APP_LOADED", "ONBOARDING_CLOSE_BUTTON_CLICKED",
|
|
153
153
|
* "CRYPTO_WITHDRAWALS_APP_LOADED", "CRYPTO_WITHDRAWALS_CLOSE_BUTTON_CLICKED",
|
|
154
|
-
* "
|
|
154
|
+
* "FIAT_DEPOSITS_APP_LOADED", "FIAT_DEPOSITS_CLOSE_BUTTON_CLICKED",
|
|
155
155
|
* "FIAT_WITHDRAWALS_APP_LOADED", "FIAT_WITHDRAWALS_CLOSE_BUTTON_CLICKED",
|
|
156
156
|
* "CRYPTO_BUY_APP_LOADED", "CRYPTO_BUY_CLOSE_BUTTON_CLICKED",
|
|
157
157
|
* "CRYPTO_SELL_APP_LOADED", "CRYPTO_SELL_CLOSE_BUTTON_CLICKED",
|
|
@@ -161,7 +161,7 @@ const App = () => {
|
|
|
161
161
|
const closeModalEvents = [
|
|
162
162
|
'ONBOARDING_CLOSE_BUTTON_CLICKED',
|
|
163
163
|
'CRYPTO_WITHDRAWALS_CLOSE_BUTTON_CLICKED',
|
|
164
|
-
'
|
|
164
|
+
'FIAT_DEPOSITS_CLOSE_BUTTON_CLICKED',
|
|
165
165
|
'FIAT_WITHDRAWALS_CLOSE_BUTTON_CLICKED',
|
|
166
166
|
'CRYPTO_BUY_CLOSE_BUTTON_CLICKED',
|
|
167
167
|
'CRYPTO_SELL_CLOSE_BUTTON_CLICKED',
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare class ZeroHashSDK implements IZeroHashSDK {
|
|
|
12
12
|
*
|
|
13
13
|
* For more information, see {@code IInitializeParameters}
|
|
14
14
|
*/
|
|
15
|
-
constructor({ zeroHashOnboardingURL, rootQuerySelector, userOnboardingJWT, cryptoWithdrawalsJWT,
|
|
15
|
+
constructor({ zeroHashOnboardingURL, rootQuerySelector, userOnboardingJWT, cryptoWithdrawalsJWT, fiatDepositsJWT, fiatWithdrawalsJWT, cryptoBuyJWT, cryptoSellJWT, zeroHashAppsURL, }: IInitializeParameters);
|
|
16
16
|
/**
|
|
17
17
|
* setJWT sets the JWT for the appIdentifier provided.
|
|
18
18
|
* The JWT should be the JWT provided by ZeroHash via the platform
|