@depay/widgets 4.4.0 → 4.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/dist/umd/index.js CHANGED
@@ -1659,7 +1659,7 @@
1659
1659
  });
1660
1660
 
1661
1661
  var DialogStyle = (function (style) {
1662
- return "\n\n .ReactDialogBackground {\n background: rgba(0,0,0,0.7);\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n }\n\n @media screen and (max-width: 450px) {\n \n .Dialog, .ReactDialogAnimation {\n width: 100%;\n }\n\n }\n\n @media (orientation: portrait) and (max-width: 900px) {\n\n .Dialog {\n align-content: stretch;\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n max-height: 40vh !important;\n }\n\n .FooterLink {\n bottom: 0;\n left: 0;\n position: absolute;\n padding-bottom: 1rem;\n right: 0;\n width: 100%;\n }\n\n .DialogFooter {\n padding-bottom: 50px;\n }\n\n .ReactDialogStackCell {\n vertical-align: bottom;\n }\n\n .ReactDialogAnimation {\n bottom: -100px !important;\n max-height: 66vh !important;\n top: inherit !important;\n transition: opacity 0.4s ease, bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.HeightAuto {\n height: auto;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n display: flex;\n flex-direction: row;\n position: relative;\n }\n\n .DialogHeaderTitle {\n flex-basis: auto;\n flex-grow: 1;\n }\n \n .DialogHeaderAction {\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n display: table;\n }\n\n ";
1662
+ return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n }\n\n @media screen and (max-width: 450px) {\n \n .Dialog, .ReactDialogAnimation {\n width: 100%;\n }\n\n }\n\n @media (orientation: portrait) and (max-width: 900px) {\n\n .Dialog {\n align-content: stretch;\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n max-height: 40vh !important;\n }\n\n .FooterLink {\n bottom: 0;\n left: 0;\n position: absolute;\n padding-bottom: 1rem;\n right: 0;\n width: 100%;\n }\n\n .DialogFooter {\n padding-bottom: 50px;\n }\n\n .ReactDialogStackCell {\n vertical-align: bottom;\n }\n\n .ReactDialogAnimation {\n bottom: -100px !important;\n max-height: 66vh !important;\n top: inherit !important;\n transition: opacity 0.4s ease, bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.HeightAuto {\n height: auto;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n display: flex;\n flex-direction: row;\n position: relative;\n }\n\n .DialogHeaderTitle {\n flex-basis: auto;\n flex-grow: 1;\n }\n \n .DialogHeaderAction {\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n display: table;\n }\n\n ";
1663
1663
  });
1664
1664
 
1665
1665
  var FontStyle = (function (style) {
@@ -2015,12 +2015,18 @@
2015
2015
  });
2016
2016
  })).then(function (amounts) {
2017
2017
  setAcceptWithAmount(props.accept.map(function (configuration, index) {
2018
+ if (amounts[index] == undefined) {
2019
+ return;
2020
+ }
2021
+
2018
2022
  return {
2019
2023
  blockchain: configuration.blockchain,
2020
- amount: round(amounts[index]) || 1,
2024
+ amount: round(amounts[index]),
2021
2025
  token: configuration.token,
2022
2026
  receiver: configuration.receiver || account
2023
2027
  };
2028
+ }).filter(function (configuration) {
2029
+ return !!configuration;
2024
2030
  }));
2025
2031
  })["catch"](setError);
2026
2032
  })["catch"](setError);
@@ -2869,11 +2875,7 @@
2869
2875
  className: "TokenAmountCell"
2870
2876
  }, format(payment.amount)))), /*#__PURE__*/React__default$1["default"].createElement("h3", {
2871
2877
  className: "CardText"
2872
- }, /*#__PURE__*/React__default$1["default"].createElement("small", null, format(round(parseFloat(payment.route.fromBalance.toString()) / Math.pow(10, payment.decimals), 'down')))))), /*#__PURE__*/React__default$1["default"].createElement("div", {
2873
- className: "CardInfo"
2874
- }, payment.route.approvalRequired && /*#__PURE__*/React__default$1["default"].createElement("span", {
2875
- className: "Label"
2876
- }, "Requires Approval")));
2878
+ }, /*#__PURE__*/React__default$1["default"].createElement("small", null, format(round(parseFloat(payment.route.fromBalance.toString()) / Math.pow(10, payment.decimals), 'down')))))));
2877
2879
  }));
2878
2880
  }, [allPaymentRoutesWithData]);
2879
2881
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depay/widgets",
3
3
  "moduleName": "DePayWidgets",
4
- "version": "4.4.0",
4
+ "version": "4.4.1",
5
5
  "description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.",
6
6
  "main": "./dist/cjs/index.js",
7
7
  "files": [
@@ -40,9 +40,9 @@
40
40
  "@depay/web3-assets": "^3.0.0",
41
41
  "@depay/web3-blockchains": "^3.0.0",
42
42
  "@depay/web3-client": "^7.1.0",
43
- "@depay/web3-constants": "^4.0.0",
44
- "@depay/web3-exchanges": "^7.1.0",
45
- "@depay/web3-payments": "^7.0.0",
43
+ "@depay/web3-constants": "^4.0.1",
44
+ "@depay/web3-exchanges": "^7.1.1",
45
+ "@depay/web3-payments": "^7.0.1",
46
46
  "@depay/web3-tokens": "^7.2.0",
47
47
  "@depay/web3-wallets": "^6.0.0",
48
48
  "decimal.js": "^10.3.1",