@jetthai/cuora 1.0.172 → 1.0.174

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.174](https://github.com/jetthai/cuora-module/compare/v1.0.173...v1.0.174) (2022-09-22)
6
+
7
+ ### [1.0.173](https://github.com/jetthai/cuora-module/compare/v1.0.172...v1.0.173) (2022-09-22)
8
+
5
9
  ### [1.0.172](https://github.com/jetthai/cuora-module/compare/v1.0.171...v1.0.172) (2022-09-22)
6
10
 
7
11
  ### [1.0.171](https://github.com/jetthai/cuora-module/compare/v1.0.170...v1.0.171) (2022-09-21)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.172",
3
+ "version": "1.0.174",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -118,6 +118,7 @@ export default function (request) {
118
118
  },
119
119
  SUBMIT: {
120
120
  target: 'submitting',
121
+ cond: 'isSubmittable'
121
122
  },
122
123
  CLEAR_CALCULATION: {
123
124
  target: 'debouncing',
@@ -194,8 +195,8 @@ export default function (request) {
194
195
  selectedChannel: event.data,
195
196
  selectedCrypto: selectedCrypto,
196
197
  selectedNetwork: networks[0],
197
- // selectedAmount: null,
198
- // calculation: null,
198
+ selectedAmount: null,
199
+ calculation: null,
199
200
  options
200
201
  }
201
202
  }),
@@ -218,8 +219,8 @@ export default function (request) {
218
219
 
219
220
  if (!networks.includes(selectedNetwork)) {
220
221
  properties.selectedNetwork = null
221
- // properties.selectedAmount = null
222
- // properties.calculation = null
222
+ properties.selectedAmount = null
223
+ properties.calculation = null
223
224
  }
224
225
 
225
226
  return properties
@@ -233,6 +234,11 @@ export default function (request) {
233
234
  setAmount: assign((context, event) => {
234
235
  return { selectedAmount: event.data }
235
236
  }),
237
+ setAddress: assign((context, event) => {
238
+ return {
239
+ sourceAddress: event.data,
240
+ }
241
+ }),
236
242
  setCalculation: assign((context, event) => {
237
243
  return {
238
244
  calculation: event.data,
@@ -136,9 +136,9 @@ export default function (request) {
136
136
  const { cryptos, currentNetwork } = context
137
137
  const method = cryptos.find((crypto) => crypto.method === event.data.value)
138
138
  const networks =
139
- method?.optional.map((value, i) => {
139
+ method?.networkName.map((value, i) => {
140
140
  return {
141
- label: method?.originalItem?.[i],
141
+ label: method?.networkOptional?.[i],
142
142
  value,
143
143
  icon: value,
144
144
  }
@@ -178,9 +178,9 @@ export default function (request) {
178
178
  paymentDetail: event.data.paymentDetail,
179
179
  crypto: method,
180
180
  networks:
181
- method?.optional?.map?.((value, i) => {
181
+ method?.networkName?.map?.((value, i) => {
182
182
  return {
183
- label: method?.originalItem?.[i],
183
+ label: method?.networkOptional?.[i],
184
184
  value,
185
185
  icon: value,
186
186
  }
@@ -140,9 +140,9 @@ export default function (request) {
140
140
  return {
141
141
  crypto: method,
142
142
  networks:
143
- method?.optional?.map?.((value, i) => {
143
+ method?.networkName?.map?.((value, i) => {
144
144
  return {
145
- label: method?.originalItem?.[i],
145
+ label: method?.networkOptional?.[i],
146
146
  value,
147
147
  icon: value,
148
148
  }