homeflowjs 0.13.23 → 0.13.24

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": "homeflowjs",
3
- "version": "0.13.23",
3
+ "version": "0.13.24",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "user/default-profile/**/*",
@@ -18,7 +18,7 @@ const englishRates = (price, firstTimeBuyer, additionalProperty, ukResident) =>
18
18
  }
19
19
 
20
20
  // Additional property
21
- if (additionalProperty && price >=40000) {
21
+ if (additionalProperty && price >= 40000) {
22
22
  rate1 = calculateRange(price, 0, 250000, 0.03);
23
23
  rate2 = calculateRange(price, 250000, 925000, 0.08);
24
24
  rate3 = calculateRange(price, 925000, 1500000, 0.13);
@@ -86,7 +86,7 @@ const scottishRates = (price, firstTimeBuyer, additionalProperty, ukResident) =>
86
86
  effectiveRate *= 100;
87
87
 
88
88
  if (additionalProperty) {
89
- const ADS = price * 0.04;
89
+ const ADS = price * 0.06;
90
90
  totalRate += ADS;
91
91
  }
92
92
 
@@ -59,44 +59,35 @@ const welshRates = (price, additionalProperty, ukResident) => {
59
59
 
60
60
  if (!additionalProperty) {
61
61
  // Rate 2
62
- if (price - 180000 > 0) {
63
- if ((price - 180000) > (250000 - 180000)) {
64
- rate2 = (250000 - 180000) * 0.035;
62
+ if (price - 225000 > 0) {
63
+ if ((price - 225000) > (400000 - 225000)) {
64
+ rate2 = (400000 - 225000) * 0.06;
65
65
  } else {
66
- rate2 = (price - 180000) * 0.035;
66
+ rate2 = (price - 225000) * 0.06;
67
67
  }
68
68
  }
69
69
 
70
70
  // Rate 3
71
- if (price - 250000 > 0) {
72
- if ((price - 250000) > (400000 - 250000)) {
73
- rate3 = (400000 - 250000) * 0.05;
74
- } else {
75
- rate3 = (price - 250000) * 0.05;
76
- }
77
- }
78
-
79
- // Rate 4
80
71
  if (price - 400000 > 0) {
81
72
  if ((price - 400000) > (750000 - 400000)) {
82
- rate4 = (750000 - 400000) * 0.075;
73
+ rate3 = (750000 - 400000) * 0.075;
83
74
  } else {
84
- rate4 = (price - 400000) * 0.075;
75
+ rate3 = (price - 400000) * 0.075;
85
76
  }
86
77
  }
87
78
 
88
- // Rate 5
79
+ // Rate 4
89
80
  if (price - 750000 > 0) {
90
81
  if ((price - 750000) > (1500000 - 750000)) {
91
- rate5 = (1500000 - 750000) * 0.10;
82
+ rate4 = (1500000 - 750000) * 0.10;
92
83
  } else {
93
- rate5 = (price - 750000) * 0.10;
84
+ rate4 = (price - 750000) * 0.10;
94
85
  }
95
86
  }
96
87
 
97
- // Rate 6
88
+ // Rate 5
98
89
  if (price - 1500000 > 0) {
99
- rate6 = (price - 1500000) * 0.12;
90
+ rate5 = (price - 1500000) * 0.12;
100
91
  }
101
92
  }
102
93