@reevit/react 0.5.0 → 0.5.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/dist/index.mjs CHANGED
@@ -54,7 +54,7 @@ function validatePhone(phone, network) {
54
54
  const cleaned = phone.replace(/[\s-]/g, "");
55
55
  const patterns = {
56
56
  mtn: /^(0|233|\+233)?(24|54|55|59)\d{7}$/,
57
- vodafone: /^(0|233|\+233)?(20|50)\d{7}$/,
57
+ telecel: /^(0|233|\+233)?(20|50)\d{7}$/,
58
58
  airteltigo: /^(0|233|\+233)?(26|27|56|57)\d{7}$/
59
59
  };
60
60
  if (network && patterns[network]) {
@@ -76,7 +76,7 @@ function detectNetwork(phone) {
76
76
  const cleaned = phone.replace(/[\s-]/g, "");
77
77
  const prefixes = {
78
78
  mtn: ["024", "054", "055", "059", "23324", "23354", "23355", "23359"],
79
- vodafone: ["020", "050", "23320", "23350"],
79
+ telecel: ["020", "050", "23320", "23350"],
80
80
  airteltigo: ["026", "027", "056", "057", "23326", "23327", "23356", "23357"]
81
81
  };
82
82
  for (const [network, networkPrefixes] of Object.entries(prefixes)) {
@@ -700,7 +700,7 @@ var methodConfig = {
700
700
  mobile_money: {
701
701
  label: "Mobile Money",
702
702
  icon: "\u{1F4F1}",
703
- description: "MTN, Vodafone Cash, AirtelTigo Money"
703
+ description: "MTN, Telecel, AirtelTigo Money"
704
704
  },
705
705
  bank_transfer: {
706
706
  label: "Bank Transfer",
@@ -737,7 +737,7 @@ function PaymentMethodSelector({
737
737
  const c = (country).toUpperCase();
738
738
  if (method === "mobile_money") {
739
739
  const mobileMoneyDescriptions = {
740
- GH: "MTN, Vodafone Cash, AirtelTigo Money",
740
+ GH: "MTN, Telecel, AirtelTigo Money",
741
741
  KE: "M-Pesa, Airtel Money",
742
742
  NG: "MTN MoMo, Airtel Money",
743
743
  ZA: "Mobile Money"
@@ -813,7 +813,7 @@ function PaymentMethodSelector({
813
813
  }
814
814
  var networks = [
815
815
  { id: "mtn", name: "MTN", color: "#FFCC00" },
816
- { id: "vodafone", name: "Vodafone", color: "#E60000" },
816
+ { id: "telecel", name: "Telecel", color: "#E60000" },
817
817
  { id: "airteltigo", name: "AirtelTigo", color: "#E4002B" }
818
818
  ];
819
819
  function MobileMoneyForm({
@@ -1128,6 +1128,7 @@ function PaystackBridge({
1128
1128
  if (!window.PaystackPop) {
1129
1129
  throw new Error("Paystack script loaded but PaystackPop not available");
1130
1130
  }
1131
+ const safeMetadata = accessCode ? void 0 : metadata;
1131
1132
  const setupConfig = {
1132
1133
  key: publicKey,
1133
1134
  email,
@@ -1136,7 +1137,7 @@ function PaystackBridge({
1136
1137
  currency,
1137
1138
  ref: reference,
1138
1139
  access_code: accessCode,
1139
- metadata,
1140
+ metadata: safeMetadata,
1140
1141
  channels,
1141
1142
  callback: (response) => {
1142
1143
  console.log("[PaystackBridge] Callback received", response);