zh-web-sdk 2.4.0 → 2.4.1

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 CHANGED
@@ -86,21 +86,34 @@ We forward events that come from the UI to the Native App using the `postMessage
86
86
  - **Onboarding:**
87
87
  - `ONBOARDING_APP_LOADED` Sent when the App is loaded in the first time
88
88
  - `ONBOARDING_CLOSE_BUTTON_CLICKED` Sent when the user clicks the Close button on the top-right corner
89
+ - `ONBOARDING_PENDING_APPROVAL` Sent when flow is on pending approval state (e.g. document validation)
90
+ - `ONBOARDING_COMPLETED` Sent when user finished flow successfully with participant approved and webview can be closed
91
+ - `ONBOARDING_FAILED` Send when something went wrong in the flow (errored state)
89
92
  - **Crypto Withdrawals:**
90
93
  - `CRYPTO_WITHDRAWALS_APP_LOADED` Sent when the App is loaded in the first time
91
94
  - `CRYPTO_WITHDRAWALS_CLOSE_BUTTON_CLICKED` Sent when the user clicks the Close button on the top-right corner
95
+ - `CRYPTO_WITHDRAWALS_COMPLETED` Sent when user finished flow successfully
96
+ - `CRYPTO_WITHDRAWALS_FAILED` Send when something went wrong in the flow (errored state)
92
97
  - **Fiat Deposits:**
93
98
  - `FIAT_DEPOSITS_APP_LOADED` Sent when the App is loaded in the first time
94
99
  - `FIAT_DEPOSITS_CLOSE_BUTTON_CLICKED` Sent when the user clicks the Close button on the top-right corner
100
+ - `FIAT_DEPOSITS_COMPLETED` Sent when user finished flow successfully
101
+ - `FIAT_DEPOSITS_FAILED` Send when something went wrong in the flow (errored state)
95
102
  - **Fiat Withdrawals:**
96
103
  - `FIAT_WITHDRAWALS_APP_LOADED` Sent when the App is loaded in the first time
97
104
  - `FIAT_WITHDRAWALS_CLOSE_BUTTON_CLICKED` Sent when the user clicks the Close button on the top-right corner
105
+ - `FIAT_WITHDRAWALS_COMPLETED` Sent when user finished flow successfully
106
+ - `FIAT_WITHDRAWALS_FAILED` Send when something went wrong in the flow (errored state)
98
107
  - **Crypto Buy:**
99
108
  - `CRYPTO_BUY_APP_LOADED` Sent when the App is loaded in the first time
100
109
  - `CRYPTO_BUY_CLOSE_BUTTON_CLICKED` Sent when the user clicks the Close button on the top-right corner
110
+ - `CRYPTO_BUY_COMPLETED` Sent when user finished flow successfully
111
+ - `CRYPTO_BUY_FAILED` Send when something went wrong in the flow (errored state)
101
112
  - **Crypto Sell:**
102
113
  - `CRYPTO_SELL_APP_LOADED` Sent when the App is loaded in the first time
103
114
  - `CRYPTO_SELL_CLOSE_BUTTON_CLICKED` Sent when the user clicks the Close button on the top-right corner
115
+ - `CRYPTO_SELL_COMPLETED` Sent when user finished flow successfully
116
+ - `CRYPTO_SELL_FAILED` Send when something went wrong in the flow (errored state)
104
117
 
105
118
  #### Messages
106
119
  To control the `WebView` you can also send messages *down*, using the `postMessage` API. Currently the accepted messages are for the respective Apps are:
@@ -111,7 +124,7 @@ To control the `WebView` you can also send messages *down*, using the `postMessa
111
124
  - `{type: "OPEN_MODAL", payload:{jwt: "<JWT_HERE>", appIdentifier: "crypto-withdrawals"} }`: It will open the Crypto Withdrawals modal with the JWT provided
112
125
  - `{type: "CLOSE_MODAL", payload:{appIdentifier: "crypto-withdrawals"}}`: It will close the Crypto Withdrawals modal
113
126
  - **Fiat Deposits**
114
- - `{type: "OPEN_MODAL", payload:{jwt: "<JWT_HERE>", appIdentifier: "fiat-deposits"} }`: It will open the FIAT Deposits modal with the JWT provided
127
+ - `{type: "OPEN_MODAL", payload:{jwt: "<JWT_HERE>", appIdentifier: "fiat-deposits"} }`: It will open the Fiat Deposits modal with the JWT provided
115
128
  - `{type: "CLOSE_MODAL", payload:{appIdentifier: "fiat-deposits"}}`: It will close the Fiat Deposits modal
116
129
  - **Fiat Withdrawals**
117
130
  - `{type: "OPEN_MODAL", payload:{jwt: "<JWT_HERE>", appIdentifier: "fiat-withdrawals"} }`: It will open the Fiat withdrawals modal with the JWT provided