@rebilly/instruments 3.39.0 → 3.39.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebilly/instruments",
3
- "version": "3.39.0",
3
+ "version": "3.39.2",
4
4
  "author": "Rebilly",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -14,7 +14,7 @@
14
14
  "prefetch": "node --experimental-modules service/prefetch/prefetch.mjs"
15
15
  },
16
16
  "dependencies": {
17
- "@babel/cli": "^7.14.5",
17
+ "@babel/cli": "^7.21.5",
18
18
  "@babel/core": "^7.21.8",
19
19
  "@babel/preset-env": "^7.21.5",
20
20
  "@rebilly/risk-data-collector": "*",
@@ -75,7 +75,7 @@ export async function mount({
75
75
  state.i18n({state});
76
76
  state.hasMounted = true;
77
77
 
78
- if (!data.readyToPay.length) {
78
+ if (!data.readyToPay?.length) {
79
79
  state.loader.stopLoading({id: 'rebilly-instruments-form'});
80
80
  showError(state.translate.getTranslation('form.error.noPaymentMethods'))
81
81
  }
@@ -3,7 +3,7 @@ import merge from 'lodash.merge';
3
3
  export default class DepositRequestModel extends BaseModel {
4
4
  constructor(fields) {
5
5
  super(fields);
6
- this.amount = Array.isArray(fields.amount) ? fields.amount[0] : fields.amount;
6
+ this.amount = Array.isArray(fields.amounts) ? fields.amounts[0] : fields.amount;
7
7
  this.buttons = fields.buttons ?? [...fields.amounts];
8
8
  this.editable = typeof fields.editable === "boolean" ? fields.editable : Boolean(fields.customAmount);
9
9
  this.customAmount = merge({