@ozdao/prometheus-framework 0.2.133 → 0.2.134
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_virtual/alignment-pattern.cjs +1 -0
- package/dist/_virtual/alignment-pattern.js +4 -0
- package/dist/_virtual/browser.cjs +1 -0
- package/dist/_virtual/browser.js +4 -0
- package/dist/_virtual/canvas.cjs +1 -0
- package/dist/_virtual/canvas.js +4 -0
- package/dist/_virtual/dijkstra.cjs +1 -0
- package/dist/_virtual/dijkstra.js +4 -0
- package/dist/_virtual/error-correction-code.cjs +1 -0
- package/dist/_virtual/error-correction-code.js +4 -0
- package/dist/_virtual/error-correction-level.cjs +1 -0
- package/dist/_virtual/error-correction-level.js +4 -0
- package/dist/_virtual/finder-pattern.cjs +1 -0
- package/dist/_virtual/finder-pattern.js +4 -0
- package/dist/_virtual/format-info.cjs +1 -0
- package/dist/_virtual/format-info.js +4 -0
- package/dist/_virtual/galois-field.cjs +1 -0
- package/dist/_virtual/galois-field.js +4 -0
- package/dist/_virtual/mask-pattern.cjs +1 -0
- package/dist/_virtual/mask-pattern.js +4 -0
- package/dist/_virtual/mode.cjs +1 -0
- package/dist/_virtual/mode.js +4 -0
- package/dist/_virtual/polynomial.cjs +1 -0
- package/dist/_virtual/polynomial.js +4 -0
- package/dist/_virtual/qrcode.cjs +1 -0
- package/dist/_virtual/qrcode.js +4 -0
- package/dist/_virtual/regex.cjs +1 -0
- package/dist/_virtual/regex.js +4 -0
- package/dist/_virtual/segments.cjs +1 -0
- package/dist/_virtual/segments.js +4 -0
- package/dist/_virtual/svg-tag.cjs +1 -0
- package/dist/_virtual/svg-tag.js +4 -0
- package/dist/_virtual/utils.cjs +1 -0
- package/dist/_virtual/utils.js +4 -0
- package/dist/_virtual/utils2.cjs +1 -0
- package/dist/_virtual/utils2.js +4 -0
- package/dist/_virtual/version-check.cjs +1 -0
- package/dist/_virtual/version-check.js +4 -0
- package/dist/_virtual/version.cjs +1 -0
- package/dist/_virtual/version.js +4 -0
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/index-C-8xOJnM.mjs +244 -0
- package/dist/index-CDbtWkBj.js +243 -0
- package/dist/main-5IrI2IOV.js +92 -0
- package/dist/main-BY2OvGB9.mjs +14509 -0
- package/dist/main.css +1 -1
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/node_modules/dijkstrajs/dijkstra.cjs +1 -0
- package/dist/node_modules/dijkstrajs/dijkstra.js +70 -0
- package/dist/node_modules/encode-utf8/index.cjs +1 -0
- package/dist/node_modules/encode-utf8/index.js +30 -0
- package/dist/node_modules/qrcode/lib/browser.cjs +1 -0
- package/dist/node_modules/qrcode/lib/browser.js +45 -0
- package/dist/node_modules/qrcode/lib/can-promise.cjs +1 -0
- package/dist/node_modules/qrcode/lib/can-promise.js +6 -0
- package/dist/node_modules/qrcode/lib/core/alignment-pattern.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/alignment-pattern.js +21 -0
- package/dist/node_modules/qrcode/lib/core/alphanumeric-data.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/alphanumeric-data.js +73 -0
- package/dist/node_modules/qrcode/lib/core/bit-buffer.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/bit-buffer.js +24 -0
- package/dist/node_modules/qrcode/lib/core/bit-matrix.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/bit-matrix.js +22 -0
- package/dist/node_modules/qrcode/lib/core/byte-data.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/byte-data.js +24 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-code.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-code.js +359 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-level.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-level.js +35 -0
- package/dist/node_modules/qrcode/lib/core/finder-pattern.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/finder-pattern.js +18 -0
- package/dist/node_modules/qrcode/lib/core/format-info.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/format-info.js +14 -0
- package/dist/node_modules/qrcode/lib/core/galois-field.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/galois-field.js +22 -0
- package/dist/node_modules/qrcode/lib/core/kanji-data.cjs +2 -0
- package/dist/node_modules/qrcode/lib/core/kanji-data.js +37 -0
- package/dist/node_modules/qrcode/lib/core/mask-pattern.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/mask-pattern.js +96 -0
- package/dist/node_modules/qrcode/lib/core/mode.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/mode.js +64 -0
- package/dist/node_modules/qrcode/lib/core/numeric-data.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/numeric-data.js +26 -0
- package/dist/node_modules/qrcode/lib/core/polynomial.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/polynomial.js +29 -0
- package/dist/node_modules/qrcode/lib/core/qrcode.cjs +4 -0
- package/dist/node_modules/qrcode/lib/core/qrcode.js +159 -0
- package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.js +25 -0
- package/dist/node_modules/qrcode/lib/core/regex.cjs +2 -0
- package/dist/node_modules/qrcode/lib/core/regex.js +24 -0
- package/dist/node_modules/qrcode/lib/core/segments.cjs +2 -0
- package/dist/node_modules/qrcode/lib/core/segments.js +143 -0
- package/dist/node_modules/qrcode/lib/core/utils.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/utils.js +74 -0
- package/dist/node_modules/qrcode/lib/core/version-check.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/version-check.js +7 -0
- package/dist/node_modules/qrcode/lib/core/version.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/version.js +74 -0
- package/dist/node_modules/qrcode/lib/renderer/canvas.cjs +1 -0
- package/dist/node_modules/qrcode/lib/renderer/canvas.js +27 -0
- package/dist/node_modules/qrcode/lib/renderer/svg-tag.cjs +2 -0
- package/dist/node_modules/qrcode/lib/renderer/svg-tag.js +28 -0
- package/dist/node_modules/qrcode/lib/renderer/utils.cjs +1 -0
- package/dist/node_modules/qrcode/lib/renderer/utils.js +52 -0
- package/dist/orders.server.js +1 -1
- package/dist/orders.server.mjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +19 -20
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +36 -36
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +29 -29
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +23 -23
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +21 -21
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +8 -8
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +18 -18
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +32 -32
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +34 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +42 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +26 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +76 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +105 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +106 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +140 -125
- package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.js +41 -0
- package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.js +98 -22
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +103 -13
- package/dist/wallet.server.mjs +103 -13
- package/dist/web-5eyiz9L7.mjs +54 -0
- package/dist/web-C04IcLk4.js +1 -0
- package/package.json +1 -1
- package/src/components/Field/Field.vue +1 -1
- package/src/modules/community/components/pages/Blog.vue +1 -1
- package/src/modules/globals/components/partials/Header.vue +2 -2
- package/src/modules/globals/localization/vue-i18n.js +5 -5
- package/src/modules/landing/components/sections/HowToBuyWDR.vue +2 -3
- package/src/modules/landing/components/sections/SectionEarn.vue +1 -6
- package/src/modules/middlewares/server/authSecret.js +22 -0
- package/src/modules/middlewares/server/index.js +7 -5
- package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -2
- package/src/modules/wallet/controllers/routes/rewards.routes.js +27 -3
- package/src/modules/wallet/models/wallet.model.js +5 -5
- package/src/modules/wallet/{components → views/components}/blocks/CardBalanceReplenished.vue +17 -7
- package/src/modules/wallet/{components/blocks/CardDeposite.vue → views/components/blocks/CardDeposit.vue} +4 -4
- package/src/modules/wallet/views/components/blocks/CryptoDeposit.vue +98 -0
- package/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue +144 -0
- package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +131 -0
- package/src/modules/wallet/views/components/pages/Wallet.vue +95 -68
- package/src/modules/wallet/views/localization/wallet.json +37 -0
- package/src/modules/wallet/views/store/wallet.store.js +145 -28
- package/src/modules/wallet/wallet.server.js +2 -2
- package/src/modules/wallet/components/blocks/CryptoDeposite.vue +0 -55
- package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +0 -181
- package/src/modules/wallet/controllers/factories/rewards.factory.population.js +0 -213
- package/src/modules/wallet/localization/Wallet.json +0 -22
- /package/src/modules/wallet/{components/blocks/CashDeposite.vue → views/components/blocks/CashDeposit.vue} +0 -0
@@ -1,182 +1,197 @@
|
|
1
|
-
import { onMounted as
|
2
|
-
import {
|
3
|
-
import
|
1
|
+
import { onMounted as y, ref as w, openBlock as n, createElementBlock as i, createElementVNode as t, toDisplayString as r, unref as e, createVNode as _, withCtx as k, createTextVNode as C, createCommentVNode as a, Fragment as g, renderList as x, createBlock as u } from "vue";
|
2
|
+
import { useI18n as M } from "vue-i18n";
|
3
|
+
import W from "web3";
|
4
|
+
import { state as l, actions as m } from "../../store/wallet.store.js";
|
5
|
+
import $ from "../../localization/wallet.json.js";
|
6
|
+
import S from "../../../../../components/Popup/Popup.vue.js";
|
7
|
+
import P from "../../../../../components/Button/Button.vue.js";
|
4
8
|
import "vue-router";
|
5
|
-
|
6
|
-
/* empty css */
|
7
|
-
/* empty css */
|
8
|
-
/* empty css */
|
9
|
+
/* empty css */
|
9
10
|
import "../../../../reports/store/reports.js";
|
10
11
|
/* empty css */
|
11
|
-
/* empty css
|
12
|
+
/* empty css */
|
12
13
|
import "../../../../auth/store/auth.js";
|
13
14
|
import "../../../../organizations/store/memberships.js";
|
14
15
|
import "../../../../community/store/reactions.js";
|
15
|
-
/* empty css
|
16
|
-
import
|
17
|
-
import
|
18
|
-
import
|
19
|
-
import
|
20
|
-
|
16
|
+
/* empty css */
|
17
|
+
import B from "../elements/ConnectMetamask.vue.js";
|
18
|
+
import R from "../blocks/CashDeposit.vue.js";
|
19
|
+
import D from "../blocks/CardDeposit.vue.js";
|
20
|
+
import T from "../blocks/CryptoDeposit.vue.js";
|
21
|
+
import G from "../blocks/CardBalanceReplenished.vue.js";
|
22
|
+
import N from "../blocks/CryptoDepositProcessing.vue.js";
|
23
|
+
const V = { class: "pd-thin" }, A = { class: "bg-black t-white mn-b-thin radius-big pd-big" }, E = { class: "mn-b-medium" }, O = { class: "mn-b-semi t-transp p-big" }, L = {
|
21
24
|
key: 0,
|
22
25
|
class: "gap-thin mn-b-thin flex-nowrap bg-black radius-extra t-white br-solid br-white-transp-10 br-1px flex-v-center flex pd-medium"
|
23
|
-
},
|
26
|
+
}, Y = { class: "flex-v-center flex-nowrap flex mn-r-auto" }, F = {
|
24
27
|
key: 1,
|
25
28
|
class: "w-100 mn-b-semi flex-column flex pd-big radius-big bg-main t-black"
|
26
|
-
},
|
29
|
+
}, H = /* @__PURE__ */ t("p", { class: "t-transp t-medium mn-b-thin" }, "You own:", -1), I = { class: "h1 mn-b-small" }, j = /* @__PURE__ */ t("p", { class: "t-white p-big t-medium mn-b-semi" }, "of all shares", -1), q = { class: "flex-v-center mn-b-small flex-nowrap flex pd-small bg-black-transp-5 radius-extra" }, z = {
|
27
30
|
key: 0,
|
28
31
|
class: "t-transp t-medium"
|
29
|
-
},
|
32
|
+
}, J = /* @__PURE__ */ t("span", { class: "uppercase p-small t-medium t-transp" }, "Connected Metamask", -1), K = /* @__PURE__ */ t("br", null, null, -1), Q = {
|
30
33
|
key: 0,
|
31
34
|
class: "mn-b-semi cols-2 gap-thin"
|
32
|
-
},
|
35
|
+
}, U = /* @__PURE__ */ t("div", { class: "w-100 pd-medium radius-medium t-center bg-light" }, [
|
33
36
|
/* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Make first order and start earning Weeder Token"),
|
34
37
|
/* @__PURE__ */ t("button", { class: "mn-l-auto mn-r-auto bg-main button" }, "Explore marketplace")
|
35
|
-
], -1),
|
38
|
+
], -1), X = { class: "w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-light" }, Z = {
|
36
39
|
key: 0,
|
37
40
|
class: "mn-b-small"
|
38
|
-
},
|
41
|
+
}, tt = {
|
39
42
|
key: 1,
|
40
43
|
class: "mn-b-small"
|
41
|
-
},
|
44
|
+
}, et = { class: "cols-3 gap-thin" }, st = { class: "radius-medium bg-light" }, nt = { class: "flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium" }, ot = { class: "t-semi mn-r-auto" }, lt = { class: "pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small" }, it = { class: "pd-medium" }, at = { class: "t-regular mn-b-thin" }, rt = {
|
42
45
|
key: 2,
|
43
46
|
class: "mn-b-small"
|
44
|
-
},
|
47
|
+
}, ct = { class: "cols-3 gap-thin" }, mt = { class: "radius-medium bg-grey" }, dt = { class: "flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium" }, ut = { class: "t-semi mn-r-auto" }, pt = { class: "pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small" }, bt = { class: "pd-medium" }, ht = { class: "t-regular mn-b-thin" }, _t = { key: 0 }, ft = /* @__PURE__ */ t("h2", { class: "mn-b-small t-center t-bold" }, "Choose the way of deposit", -1), Yt = {
|
45
48
|
__name: "Wallet",
|
46
|
-
setup(
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
d.listRewards(), d.tryReconnectWallet();
|
49
|
+
setup(wt) {
|
50
|
+
const { t: b } = M({
|
51
|
+
useScope: "global",
|
52
|
+
...$
|
51
53
|
});
|
52
|
-
|
53
|
-
|
54
|
-
|
54
|
+
window.ethereum.on("accountsChanged", (p) => {
|
55
|
+
p.length < 1 && (l.account = null);
|
56
|
+
}), l.web3 = new W(window.ethereum || "http://localhost:8080"), y(() => {
|
57
|
+
m.listRewards(), m.tryReconnectWallet();
|
58
|
+
});
|
59
|
+
const h = w(!1), d = w(0);
|
60
|
+
function c(p) {
|
61
|
+
d.value = p;
|
55
62
|
}
|
56
|
-
function
|
57
|
-
|
63
|
+
function v() {
|
64
|
+
h.value = !0;
|
58
65
|
}
|
59
|
-
function
|
60
|
-
|
66
|
+
function f() {
|
67
|
+
h.value = !1, d.value = 0, m.stopTimer(), m.disconnectWebSocket();
|
61
68
|
}
|
62
|
-
return (
|
63
|
-
t("section",
|
64
|
-
t("
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
t("
|
69
|
-
|
69
|
+
return (p, o) => (n(), i("div", V, [
|
70
|
+
t("section", A, [
|
71
|
+
t("h1", E, r(e(b)("wallet.title")), 1),
|
72
|
+
t("p", O, r(e(b)("wallet.subtitle")), 1),
|
73
|
+
e(l).account ? (n(), i("div", L, [
|
74
|
+
t("div", Y, [
|
75
|
+
t("h2", null, r(e(l).tokenBalance) + " " + r(e(b)("wallet.token")), 1)
|
76
|
+
]),
|
77
|
+
t("button", {
|
78
|
+
onClick: v,
|
79
|
+
class: "t-nowrap w-max bg-main t-medium button"
|
80
|
+
}, "Get More"),
|
81
|
+
_(P, {
|
82
|
+
submit: e(m).collectRewards,
|
83
|
+
class: "w-max bg-white t-black t-medium button"
|
84
|
+
}, {
|
85
|
+
default: k(() => [
|
86
|
+
C(" Withdraw ")
|
70
87
|
]),
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
}, "Withdraw")
|
79
|
-
])) : i("", !0),
|
80
|
-
s(l).account ? (n(), a("div", E, [
|
81
|
-
A,
|
82
|
-
t("p", N, r(s(l).share) + "%", 1),
|
83
|
-
O,
|
84
|
-
t("div", V, [
|
85
|
-
s(l).account ? (n(), a("p", Y, [
|
86
|
-
L,
|
87
|
-
F,
|
88
|
-
t("span", null, r(s(l).account), 1)
|
89
|
-
])) : i("", !0),
|
90
|
-
s(l).account ? (n(), a("button", {
|
91
|
-
key: 1,
|
92
|
-
onClick: o[1] || (o[1] = (...e) => s(d).disconnectWallet && s(d).disconnectWallet(...e)),
|
93
|
-
class: "mn-l-auto bg-red button"
|
94
|
-
}, " Disconnect Wallet ")) : i("", !0)
|
95
|
-
])
|
96
|
-
])) : i("", !0)
|
97
|
-
]),
|
98
|
-
s(l).account ? i("", !0) : (n(), a("div", H, [
|
88
|
+
_: 1
|
89
|
+
}, 8, ["submit"])
|
90
|
+
])) : a("", !0),
|
91
|
+
_(B, { class: "mn-b-thin radius-extra br-solid br-white-transp-10 br-1px w-100" }),
|
92
|
+
e(l).account ? (n(), i("div", F, [
|
93
|
+
H,
|
94
|
+
t("p", I, r(e(l).share) + "%", 1),
|
99
95
|
j,
|
100
96
|
t("div", q, [
|
101
|
-
|
102
|
-
|
97
|
+
e(l).account ? (n(), i("p", z, [
|
98
|
+
J,
|
99
|
+
K,
|
100
|
+
t("span", null, r(e(l).account), 1)
|
101
|
+
])) : a("", !0),
|
102
|
+
e(l).account ? (n(), i("button", {
|
103
103
|
key: 1,
|
104
|
-
onClick: o[
|
105
|
-
class: "
|
106
|
-
}, "
|
104
|
+
onClick: o[0] || (o[0] = (...s) => e(m).disconnectWallet && e(m).disconnectWallet(...s)),
|
105
|
+
class: "mn-l-auto bg-red button"
|
106
|
+
}, " Disconnect Wallet ")) : a("", !0)
|
107
107
|
])
|
108
|
-
])),
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
]))), 256))
|
120
|
-
]),
|
121
|
-
s(l).rewards.length > 0 ? (n(), a("h2", et, "Activity")) : i("", !0),
|
122
|
-
t("section", st, [
|
123
|
-
(n(!0), a(h, null, k(s(l).rewards, (e) => (n(), a("div", nt, [
|
124
|
-
t("div", ot, [
|
125
|
-
t("p", lt, r(e.amount) + " WDT", 1),
|
126
|
-
t("span", at, r(e.type === "blogpost" ? "Community Reward" : e.type), 1)
|
127
|
-
]),
|
128
|
-
t("div", it, [
|
129
|
-
t("h4", rt, r(e.name), 1)
|
130
|
-
])
|
131
|
-
]))), 256))
|
108
|
+
])) : a("", !0)
|
109
|
+
]),
|
110
|
+
e(l).account ? a("", !0) : (n(), i("div", Q, [
|
111
|
+
U,
|
112
|
+
t("div", X, [
|
113
|
+
e(l).account ? a("", !0) : (n(), i("h3", Z, " Connect Metamask to withdrawal your earnings. ")),
|
114
|
+
e(l).account ? a("", !0) : (n(), i("button", {
|
115
|
+
key: 1,
|
116
|
+
onClick: o[1] || (o[1] = (...s) => e(m).connectWallet && e(m).connectWallet(...s)),
|
117
|
+
class: "br-solid br-2px br-black-transp-10 t-black button"
|
118
|
+
}, " Connect Wallet "))
|
132
119
|
])
|
120
|
+
])),
|
121
|
+
e(l).rewards.length > 0 ? (n(), i("h2", tt, "Latest Rewards ")) : a("", !0),
|
122
|
+
t("section", et, [
|
123
|
+
(n(!0), i(g, null, x(e(l).rewards, (s) => (n(), i("div", st, [
|
124
|
+
t("div", nt, [
|
125
|
+
t("p", ot, r(s.amount) + " WDT", 1),
|
126
|
+
t("span", lt, r(s.type === "blogpost" ? "Community Reward" : s.type), 1)
|
127
|
+
]),
|
128
|
+
t("div", it, [
|
129
|
+
t("h4", at, r(s.name), 1)
|
130
|
+
])
|
131
|
+
]))), 256))
|
133
132
|
]),
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
133
|
+
e(l).rewards.length > 0 ? (n(), i("h2", rt, "Activity")) : a("", !0),
|
134
|
+
t("section", ct, [
|
135
|
+
(n(!0), i(g, null, x(e(l).rewards, (s) => (n(), i("div", mt, [
|
136
|
+
t("div", dt, [
|
137
|
+
t("p", ut, r(s.amount) + " WDT", 1),
|
138
|
+
t("span", pt, r(s.type === "blogpost" ? "Community Reward" : s.type), 1)
|
139
|
+
]),
|
140
|
+
t("div", bt, [
|
141
|
+
t("h4", ht, r(s.name), 1)
|
142
|
+
])
|
143
|
+
]))), 256))
|
144
|
+
]),
|
145
|
+
_(S, {
|
146
|
+
onClosePopup: f,
|
147
|
+
isPopupOpen: h.value,
|
148
|
+
class: "w-m-50r t-left pd-big bg-white radius-big"
|
139
149
|
}, {
|
140
|
-
default:
|
141
|
-
|
142
|
-
|
150
|
+
default: k(() => [
|
151
|
+
d.value === 0 ? (n(), i("div", _t, [
|
152
|
+
ft,
|
143
153
|
t("button", {
|
144
154
|
class: "w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",
|
145
|
-
onClick: o[
|
155
|
+
onClick: o[2] || (o[2] = (s) => c(1))
|
146
156
|
}, " CASH "),
|
147
157
|
t("button", {
|
148
158
|
class: "w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",
|
149
|
-
onClick: o[
|
159
|
+
onClick: o[3] || (o[3] = (s) => c(2))
|
150
160
|
}, " CARD "),
|
151
161
|
t("button", {
|
152
162
|
class: "w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",
|
153
|
-
onClick: o[
|
163
|
+
onClick: o[4] || (o[4] = (s) => c(4))
|
154
164
|
}, " CRYPTO ")
|
155
|
-
])) :
|
156
|
-
|
165
|
+
])) : a("", !0),
|
166
|
+
d.value === 1 ? (n(), u(R, {
|
157
167
|
key: 1,
|
158
|
-
onBackSelection: o[
|
159
|
-
})) :
|
160
|
-
|
168
|
+
onBackSelection: o[5] || (o[5] = (s) => c(0))
|
169
|
+
})) : a("", !0),
|
170
|
+
d.value === 2 ? (n(), u(D, {
|
161
171
|
key: 2,
|
162
|
-
onBackSelection: o[
|
172
|
+
onBackSelection: o[6] || (o[6] = (s) => c(0)),
|
163
173
|
onSwitchMenu: c
|
164
|
-
})) :
|
165
|
-
|
174
|
+
})) : a("", !0),
|
175
|
+
d.value === 3 ? (n(), u(G, {
|
166
176
|
key: 3,
|
167
|
-
onClose:
|
168
|
-
})) :
|
169
|
-
|
177
|
+
onClose: f
|
178
|
+
})) : a("", !0),
|
179
|
+
d.value === 4 ? (n(), u(T, {
|
170
180
|
key: 4,
|
171
|
-
onBackSelection: o[
|
181
|
+
onBackSelection: o[7] || (o[7] = (s) => c(0)),
|
182
|
+
onSwitchMenu: c
|
183
|
+
})) : a("", !0),
|
184
|
+
d.value === 5 ? (n(), u(N, {
|
185
|
+
key: 5,
|
186
|
+
onBackSelection: o[8] || (o[8] = (s) => c(0)),
|
172
187
|
onSwitchMenu: c
|
173
|
-
})) :
|
188
|
+
})) : a("", !0)
|
174
189
|
]),
|
175
190
|
_: 1
|
176
191
|
}, 8, ["isPopupOpen"])
|
177
|
-
]
|
192
|
+
]));
|
178
193
|
}
|
179
194
|
};
|
180
195
|
export {
|
181
|
-
|
196
|
+
Yt as default
|
182
197
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"en-default":{wallet:{title:"Your Wallet",subtitle:"Earn WDT by purchasing our weed or contributing to the community.",token:"WDT",connectMetaMask:"Connect MetaMask",switchToPolygon:"Switch to Polygon",addToken:"Add WDT to MetaMask",pay:"pay",youReceived:"you received",enterAmount:"enter amount to top up",backToWallet:"back to wallet",backToSelection:"back to selection",balanceReplenished:"balance replenished",depositWithCrypto:"deposit with crypto"}},"ru-default":{wallet:{title:"Ваш Кошелек",subtitle:"Зарабатывайте WDT, покупая товары или внося вклад в сообщество.",connectMetaMask:"Подключить MetaMask",switchToPolygon:"Переподключиться на Polygon",addToken:"Добавить WDT в Metamask",pay:"купить",youReceived:"вы пополнили на сумму",enterAmount:"введите сумму для пополнения",backToWallet:"назад к кошельку",backToSelection:"назад к списку",balanceReplenished:"баланс пополнен",depositWithCrypto:"пополнение криптовалютой"}}},t={messages:e};exports.default=t;exports.messages=e;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
const e = {
|
2
|
+
"en-default": {
|
3
|
+
wallet: {
|
4
|
+
title: "Your Wallet",
|
5
|
+
subtitle: "Earn WDT by purchasing our weed or contributing to the community.",
|
6
|
+
token: "WDT",
|
7
|
+
connectMetaMask: "Connect MetaMask",
|
8
|
+
switchToPolygon: "Switch to Polygon",
|
9
|
+
addToken: "Add WDT to MetaMask",
|
10
|
+
pay: "pay",
|
11
|
+
youReceived: "you received",
|
12
|
+
enterAmount: "enter amount to top up",
|
13
|
+
backToWallet: "back to wallet",
|
14
|
+
backToSelection: "back to selection",
|
15
|
+
balanceReplenished: "balance replenished",
|
16
|
+
depositWithCrypto: "deposit with crypto"
|
17
|
+
}
|
18
|
+
},
|
19
|
+
"ru-default": {
|
20
|
+
wallet: {
|
21
|
+
title: "Ваш Кошелек",
|
22
|
+
subtitle: "Зарабатывайте WDT, покупая товары или внося вклад в сообщество.",
|
23
|
+
connectMetaMask: "Подключить MetaMask",
|
24
|
+
switchToPolygon: "Переподключиться на Polygon",
|
25
|
+
addToken: "Добавить WDT в Metamask",
|
26
|
+
pay: "купить",
|
27
|
+
youReceived: "вы пополнили на сумму",
|
28
|
+
enterAmount: "введите сумму для пополнения",
|
29
|
+
backToWallet: "назад к кошельку",
|
30
|
+
backToSelection: "назад к списку",
|
31
|
+
balanceReplenished: "баланс пополнен",
|
32
|
+
depositWithCrypto: "пополнение криптовалютой"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}, t = {
|
36
|
+
messages: e
|
37
|
+
};
|
38
|
+
export {
|
39
|
+
t as default,
|
40
|
+
e as messages
|
41
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("axios"),l=require("vue"),i=require("../../../../../node_modules/bignumber.js/bignumber.cjs");require("../../../globals/store/globals.cjs");const a="/api/crypto",w=2e7,s=u.create({baseURL:process.env.API_URL,withCredentials:!0}),e=l.reactive({rewards:[],tokenBalance:"0",share:"0",account:null,web3:null,depositInfo:null,depositRequestIsActive:!1,websocket:null,config:null,chosenNetwork:null}),n=l.reactive({remaining:0,interval:null}),c={loadConfig:async()=>{await s.get(`${a}/deposit/config`).then(t=>{e.config=t.data,e.chosenNetwork={name:"polygon-WDT",value:{token:e.config.polygon.tokens.WDT,network:"polygon"}}}).catch(t=>console.error(t))},connectWebSocket:()=>{e.websocket=new WebSocket(process.env.WSS_URL),e.websocket.onmessage=t=>{const o=JSON.parse(t.data);if(o.id===e.depositInfo.id){const r=e.depositInfo.confirmations;e.depositInfo=o,e.depositInfo.confirmations=r}o.hash===e.depositInfo.tx.hash&&(e.depositInfo.confirmations=o.confirmations)},e.websocket.onerror=t=>console.error(t)},disconnectWebSocket:()=>{e.websocket&&(e.websocket.close(),e.websocket=null)},listRewards:async()=>{try{const t=await s.get(`${a}/rewards`);e.rewards=t.data,e.tokenBalance=t.data.reduce((o,r)=>o.plus(r.amount),new i.BigNumber("0")).toString(),e.share=new i.BigNumber(e.tokenBalance).div(w).multipliedBy(100).toFormat(6)}catch(t){console.error(t)}},collectRewards:async()=>{try{await s.post(`${a}/collect`,{recipient:e.account}),await c.listRewards()}catch(t){console.error(t)}},disconnectWallet:async()=>{try{await window.ethereum.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),e.account=null}catch(t){console.error(t)}},connectWallet:async()=>{try{const t=await e.web3.eth.requestAccounts();e.account=t[0]}catch(t){console.error(t)}},tryReconnectWallet:async()=>{try{(await e.web3.eth.getAccounts()).length>0&&await c.connectWallet()}catch(t){console.error(t)}},requestCryptoDeposit:async t=>{e.depositRequestIsActive=!0,await s.post(`${a}/deposit`,{network:e.chosenNetwork.value.network,amount:new i.BigNumber(t).shiftedBy(8).toString(),token:e.chosenNetwork.value.token}).then(o=>{e.depositInfo=o.data;const d=new Date(o.data.createdAt).getTime()+e.config[e.chosenNetwork.value.network].waitingTime;n.remaining=Math.floor((d-Date.now())/1e3),n.interval=setInterval(()=>{n.remaining-=1,n.remaining===0&&clearInterval(n.interval)},1e3)}).catch(o=>console.error(o)),e.depositRequestIsActive=!1,c.connectWebSocket()},stopTimer:()=>{clearInterval(n.interval)},cancelDeposit:async()=>{await s.post(`${a}/deposit/cancel`,{id:e.depositInfo.id}).then(()=>c.stopTimer()).then(()=>c.disconnectWebSocket()).catch(t=>console.error(t))}};exports.actions=c;exports.state=e;exports.timer=n;
|
@@ -1,29 +1,105 @@
|
|
1
|
-
import
|
2
|
-
import { reactive as
|
3
|
-
import { BigNumber as
|
4
|
-
|
1
|
+
import d from "axios";
|
2
|
+
import { reactive as l } from "vue";
|
3
|
+
import { BigNumber as i } from "../../../../../node_modules/bignumber.js/bignumber.js";
|
4
|
+
import "../../../globals/store/globals.js";
|
5
|
+
const c = "/api/crypto", p = 2e7, a = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = l({
|
5
6
|
rewards: [],
|
6
7
|
tokenBalance: "0",
|
7
8
|
share: "0",
|
8
9
|
account: null,
|
9
|
-
web3: null
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
10
|
+
web3: null,
|
11
|
+
depositInfo: null,
|
12
|
+
depositRequestIsActive: !1,
|
13
|
+
websocket: null,
|
14
|
+
config: null,
|
15
|
+
chosenNetwork: null
|
16
|
+
}), n = l({ remaining: 0, interval: null }), s = {
|
17
|
+
loadConfig: async () => {
|
18
|
+
await a.get(`${c}/deposit/config`).then((t) => {
|
19
|
+
e.config = t.data, e.chosenNetwork = {
|
20
|
+
name: "polygon-WDT",
|
21
|
+
value: {
|
22
|
+
token: e.config.polygon.tokens.WDT,
|
23
|
+
network: "polygon"
|
24
|
+
}
|
25
|
+
};
|
26
|
+
}).catch((t) => console.error(t));
|
27
|
+
},
|
28
|
+
connectWebSocket: () => {
|
29
|
+
e.websocket = new WebSocket(process.env.WSS_URL), e.websocket.onmessage = (t) => {
|
30
|
+
const o = JSON.parse(t.data);
|
31
|
+
if (o.id === e.depositInfo.id) {
|
32
|
+
const r = e.depositInfo.confirmations;
|
33
|
+
e.depositInfo = o, e.depositInfo.confirmations = r;
|
34
|
+
}
|
35
|
+
o.hash === e.depositInfo.tx.hash && (e.depositInfo.confirmations = o.confirmations);
|
36
|
+
}, e.websocket.onerror = (t) => console.error(t);
|
37
|
+
},
|
38
|
+
disconnectWebSocket: () => {
|
39
|
+
e.websocket && (e.websocket.close(), e.websocket = null);
|
40
|
+
},
|
41
|
+
listRewards: async () => {
|
42
|
+
try {
|
43
|
+
const t = await a.get(`${c}/rewards`);
|
44
|
+
e.rewards = t.data, e.tokenBalance = t.data.reduce((o, r) => o.plus(r.amount), new i("0")).toString(), e.share = new i(e.tokenBalance).div(p).multipliedBy(100).toFormat(6);
|
45
|
+
} catch (t) {
|
46
|
+
console.error(t);
|
47
|
+
}
|
48
|
+
},
|
49
|
+
collectRewards: async () => {
|
50
|
+
try {
|
51
|
+
await a.post(`${c}/collect`, { recipient: e.account }), await s.listRewards();
|
52
|
+
} catch (t) {
|
53
|
+
console.error(t);
|
54
|
+
}
|
55
|
+
},
|
56
|
+
disconnectWallet: async () => {
|
57
|
+
try {
|
58
|
+
await window.ethereum.request({ method: "wallet_revokePermissions", params: [{ eth_accounts: {} }] }), e.account = null;
|
59
|
+
} catch (t) {
|
60
|
+
console.error(t);
|
61
|
+
}
|
62
|
+
},
|
63
|
+
connectWallet: async () => {
|
64
|
+
try {
|
65
|
+
const t = await e.web3.eth.requestAccounts();
|
66
|
+
e.account = t[0];
|
67
|
+
} catch (t) {
|
68
|
+
console.error(t);
|
69
|
+
}
|
70
|
+
},
|
71
|
+
tryReconnectWallet: async () => {
|
72
|
+
try {
|
73
|
+
(await e.web3.eth.getAccounts()).length > 0 && await s.connectWallet();
|
74
|
+
} catch (t) {
|
75
|
+
console.error(t);
|
76
|
+
}
|
77
|
+
},
|
78
|
+
requestCryptoDeposit: async (t) => {
|
79
|
+
e.depositRequestIsActive = !0, await a.post(`${c}/deposit`, {
|
80
|
+
network: e.chosenNetwork.value.network,
|
81
|
+
amount: new i(t).shiftedBy(8).toString(),
|
82
|
+
token: e.chosenNetwork.value.token
|
83
|
+
}).then((o) => {
|
84
|
+
e.depositInfo = o.data;
|
85
|
+
const w = new Date(o.data.createdAt).getTime() + e.config[e.chosenNetwork.value.network].waitingTime;
|
86
|
+
n.remaining = Math.floor((w - Date.now()) / 1e3), n.interval = setInterval(
|
87
|
+
() => {
|
88
|
+
n.remaining -= 1, n.remaining === 0 && clearInterval(n.interval);
|
89
|
+
},
|
90
|
+
1e3
|
91
|
+
);
|
92
|
+
}).catch((o) => console.error(o)), e.depositRequestIsActive = !1, s.connectWebSocket();
|
93
|
+
},
|
94
|
+
stopTimer: () => {
|
95
|
+
clearInterval(n.interval);
|
96
|
+
},
|
97
|
+
cancelDeposit: async () => {
|
98
|
+
await a.post(`${c}/deposit/cancel`, { id: e.depositInfo.id }).then(() => s.stopTimer()).then(() => s.disconnectWebSocket()).catch((t) => console.error(t));
|
99
|
+
}
|
25
100
|
};
|
26
101
|
export {
|
27
|
-
|
28
|
-
|
102
|
+
s as actions,
|
103
|
+
e as state,
|
104
|
+
n as timer
|
29
105
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=require("./main-5IrI2IOV.js");exports.Address=_._sfc_main;exports.Breadcrumbs=_._sfc_main$16;exports.Button=_._sfc_main$1;exports.Checkbox=_._sfc_main$2;exports.Chips=_._sfc_main$17;exports.Countdown=_._sfc_main$18;exports.DatePicker=_._sfc_main$19;exports.Dropdown=_._sfc_main$3;exports.EmptyState=_._sfc_main$20;exports.Error=_._sfc_main$4;exports.Feed=_._sfc_main$21;exports.Field=_._sfc_main$5;exports.FieldBig=_._sfc_main$22;exports.FieldPhone=_._sfc_main$6;exports.FieldTags=_.FieldTags;exports.Loader=_.Loader;exports.LocationMarker=_._sfc_main$7;exports.Map=_.Map;exports.Marquee=_._sfc_main$27;exports.Popup=_._sfc_main$8;exports.Radio=_._sfc_main$9;exports.Select=_.Select;exports.SelectMulti=_.SelectMulti;exports.Shader=_._sfc_main$23;exports.Sidebar=_._sfc_main$24;exports.Slider=_._sfc_main$25;exports.Spoiler=_._sfc_main$10;exports.Status=_._sfc_main$26;exports.Tab=_._sfc_main$11;exports.Text=_._sfc_main$13;exports.Tooltip=_._sfc_main$12;exports.Upload=_.Upload;exports.UploadImage=_._sfc_main$14;exports.UploadImageMultiple=_._sfc_main$15;exports.default=_.main;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as e,
|
1
|
+
import { _ as e, r as o, a as d, b as r, s as t, t as l, u as i, c as p, v as u, d as S, w as c, e as n, x as m, f as F, F as M, L as b, g, M as h, C as k, h as x, i as B, S as C, j as T, y as U, z as f, A as w, k as L, B as P, l as q, o as y, n as A, U as D, p as E, q as I, m as j } from "./main-BY2OvGB9.mjs";
|
2
2
|
export {
|
3
3
|
e as Address,
|
4
4
|
o as Breadcrumbs,
|
package/dist/reports.server.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
|
3
|
-
const index = require("./index-
|
3
|
+
const index = require("./index-CDbtWkBj.js");
|
4
4
|
const controllerFactory$1 = (db) => {
|
5
5
|
const Report = db.report;
|
6
6
|
const read = async (req, res) => {
|
package/dist/reports.server.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
|
2
|
-
import { s as server } from "./index-
|
2
|
+
import { s as server } from "./index-C-8xOJnM.mjs";
|
3
3
|
const controllerFactory$1 = (db) => {
|
4
4
|
const Report = db.report;
|
5
5
|
const read = async (req, res) => {
|