@ozdao/prometheus-framework 0.2.132 → 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/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +12 -13
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +14 -15
- 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.js +4 -4
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -0
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +15 -15
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +34 -34
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +27 -27
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.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 +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
- 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/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +1 -1
- 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 +137 -122
- 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
@@ -0,0 +1,105 @@
|
|
1
|
+
import { computed as r, onMounted as A, watch as N, openBlock as d, createElementBlock as p, Fragment as g, createElementVNode as t, toDisplayString as i, unref as n, createCommentVNode as h, pushScopeId as E, popScopeId as k } from "vue";
|
2
|
+
import "../../../../../../../node_modules/qrcode/lib/browser.js";
|
3
|
+
import { useI18n as R } from "vue-i18n";
|
4
|
+
import { BigNumber as m } from "../../../../../../node_modules/bignumber.js/bignumber.js";
|
5
|
+
import C from "../../localization/wallet.json.js";
|
6
|
+
import { timer as S, state as e, actions as u } from "../../store/wallet.store.js";
|
7
|
+
/* empty css */
|
8
|
+
import F from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
|
9
|
+
import { __exports as W } from "../../../../../../../_virtual/browser.js";
|
10
|
+
const a = (c) => (E("data-v-97ae0556"), c = c(), k(), c), U = { class: "mn-b-small t-center t-bold" }, $ = { class: "flex flex-justify-between" }, j = { class: "t-semi" }, B = { class: "flex flex-justify-between" }, D = { class: "t-semi t-truncate address" }, O = /* @__PURE__ */ a(() => /* @__PURE__ */ t("div", { class: "flex flex-justify-around radius-big br-solid br-2px br-black-transp-10" }, [
|
11
|
+
/* @__PURE__ */ t("canvas", { id: "qrcode_address_deposit" })
|
12
|
+
], -1)), M = { class: "flex flex-justify-between" }, X = /* @__PURE__ */ a(() => /* @__PURE__ */ t("h3", { class: "t-semi" }, "You will receive:", -1)), G = { class: "t-semi" }, P = {
|
13
|
+
key: 0,
|
14
|
+
class: "flex flex-justify-between"
|
15
|
+
}, q = /* @__PURE__ */ a(() => /* @__PURE__ */ t("h3", { class: "t-semi" }, "Times left:", -1)), L = { class: "t-semi" }, V = { class: "flex flex-justify-between" }, H = /* @__PURE__ */ a(() => /* @__PURE__ */ t("h3", { class: "t-semi" }, "Status:", -1)), K = { class: "t-semi" }, Y = {
|
16
|
+
__name: "CryptoDepositProcessing",
|
17
|
+
emits: ["back-selection", "switch-menu"],
|
18
|
+
setup(c, { emit: b }) {
|
19
|
+
m.config({
|
20
|
+
EXPONENTIAL_AT: [-1e3, 2e4]
|
21
|
+
});
|
22
|
+
const _ = b, { t: f } = R({
|
23
|
+
useScope: "global",
|
24
|
+
...C
|
25
|
+
}), v = r(() => {
|
26
|
+
const s = Math.floor(S.remaining / 60), o = Math.floor(S.remaining % 60);
|
27
|
+
return `${s}:${o < 10 ? `0${o}` : o}`;
|
28
|
+
}), l = r(
|
29
|
+
() => new m(e.depositInfo.amount).shiftedBy(-8).toString()
|
30
|
+
), w = r(
|
31
|
+
() => new m(l.value).dividedBy(process.env.TOKEN_EXCHANGE_RATE).toString()
|
32
|
+
), I = r(() => {
|
33
|
+
switch (e.depositInfo.status) {
|
34
|
+
case "TRANSFER_STATUS_WAITING_FOR_TX":
|
35
|
+
return "Waiting for payment";
|
36
|
+
case "TRANSFER_STATUS_SENT":
|
37
|
+
return `Confirming (${`${e.depositInfo.confirmations || 0} / ${e.config[e.chosenNetwork.value.network].confirmations}`})`;
|
38
|
+
default:
|
39
|
+
return "Superposition.";
|
40
|
+
}
|
41
|
+
});
|
42
|
+
function x() {
|
43
|
+
_("back-selection");
|
44
|
+
}
|
45
|
+
function y(s = 0) {
|
46
|
+
_("switch-menu", s);
|
47
|
+
}
|
48
|
+
function T(s) {
|
49
|
+
navigator.clipboard.writeText(s);
|
50
|
+
}
|
51
|
+
return A(() => {
|
52
|
+
W.toCanvas(
|
53
|
+
document.getElementById("qrcode_address_deposit"),
|
54
|
+
e.depositInfo.to,
|
55
|
+
{ width: 300 },
|
56
|
+
(s) => {
|
57
|
+
s && console.error(s);
|
58
|
+
}
|
59
|
+
);
|
60
|
+
}), N(
|
61
|
+
e,
|
62
|
+
async () => {
|
63
|
+
e.depositInfo.status === "TRANSFER_STATUS_SENT" && u.stopTimer(), e.depositInfo.status === "TRANSFER_STATUS_COMPLETED" && (u.disconnectWebSocket(), y(3));
|
64
|
+
},
|
65
|
+
{ deep: !0 }
|
66
|
+
), (s, o) => (d(), p(g, null, [
|
67
|
+
t("h2", U, i(n(f)("wallet.depositWithCrypto")), 1),
|
68
|
+
t("div", $, [
|
69
|
+
t("h3", j, "Amount: " + i(l.value) + " " + i(n(e).chosenNetwork.name.toUpperCase()), 1),
|
70
|
+
t("button", {
|
71
|
+
class: "uppercase t-main cursor-pointer",
|
72
|
+
onClick: o[0] || (o[0] = () => T(l.value))
|
73
|
+
}, " copy ")
|
74
|
+
]),
|
75
|
+
t("div", B, [
|
76
|
+
t("h3", D, "Wallet: " + i(n(e).depositInfo.to), 1),
|
77
|
+
t("button", {
|
78
|
+
class: "uppercase t-main cursor-pointer",
|
79
|
+
onClick: o[1] || (o[1] = () => T(n(e).depositInfo.to))
|
80
|
+
}, " copy ")
|
81
|
+
]),
|
82
|
+
O,
|
83
|
+
t("div", M, [
|
84
|
+
X,
|
85
|
+
t("h3", G, i(w.value) + " WDT", 1)
|
86
|
+
]),
|
87
|
+
n(e).depositInfo.status === "TRANSFER_STATUS_WAITING_FOR_TX" ? (d(), p("div", P, [
|
88
|
+
q,
|
89
|
+
t("h3", L, i(v.value), 1)
|
90
|
+
])) : h("", !0),
|
91
|
+
t("div", V, [
|
92
|
+
H,
|
93
|
+
t("h3", K, i(I.value), 1)
|
94
|
+
]),
|
95
|
+
n(e).depositInfo.status === "TRANSFER_STATUS_WAITING_FOR_TX" ? (d(), p("button", {
|
96
|
+
key: 1,
|
97
|
+
class: "uppercase w-100 bg-main t-black pd-thin radius-medium t-center br-solid br-2px br-black-transp-10 mn-t-small",
|
98
|
+
onClick: o[2] || (o[2] = (z) => n(u).cancelDeposit().then(() => x()))
|
99
|
+
}, i(n(f)("wallet.cancel")), 1)) : h("", !0)
|
100
|
+
], 64));
|
101
|
+
}
|
102
|
+
}, ct = /* @__PURE__ */ F(Y, [["__scopeId", "data-v-97ae0556"]]);
|
103
|
+
export {
|
104
|
+
ct as default
|
105
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("vue-i18n"),h=require("../../localization/wallet.json.cjs"),l=require("../../../../icons/navigation/IconAdd.vue.cjs"),w=e.createElementVNode("img",{src:"/icons/metamask.svg",class:"mn-r-small i-big"},null,-1),f={class:"h4 uppercase w-100"},k=e.createElementVNode("img",{src:"/icons/metamask.svg",class:"mn-r-small i-big"},null,-1),g={class:"h4 uppercase w-100"},v=e.createElementVNode("img",{src:"/icons/metamask.svg",class:"mn-r-small i-big"},null,-1),b={class:"h4 uppercase w-100"},_="0xE11702CF04621D395E75680C29d3dbF81484e875",y="WDT",E=8,x="https://weeder.delivery/logo-token.png",M={__name:"ConnectMetamask",setup(N){const a=e.ref(!1),o=e.ref(!1),r=e.ref(!1),c=e.ref(null),i=e.ref({}),u=async()=>{if(typeof window.ethereum<"u")try{await window.ethereum.request({method:"eth_requestAccounts"}),s()}catch(t){console.error("Ошибка при подключении MetaMask:",t)}else window.open("https://metamask.io/","_blank")},s=async()=>{if(typeof window.ethereum<"u"){a.value=!0;const t=await window.ethereum.request({method:"eth_chainId"});o.value=t==="0x89"||t==="0x13881"}else a.value=!1},d=async()=>{try{await window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x89"}]}),s()}catch(t){console.error("Ошибка при переключении на Polygon:",t)}},m=async()=>{i.value["pointer-events"]="none",c.value=null,r.value=!0;try{await ethereum.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:_,symbol:y,decimals:E,image:x}}}),i.value["background-color"]="#009911",r.value=!1}catch(t){c.value=t.toString()}},{t:n}=p.useI18n({useScope:"global",...h.default});return e.onMounted(()=>{s()}),(t,V)=>(e.openBlock(),e.createElementBlock("div",null,[a.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,onClick:d,class:"transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black t-white radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small"},[k,e.createElementVNode("span",g,e.toDisplayString(e.unref(n)("wallet.switchToPolygon")),1),e.createVNode(l.default,{class:"t-transp",fill:"rgb(var(--white))"})])),o.value?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:m,class:"transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white"},[v,e.createElementVNode("span",b,e.toDisplayString(e.unref(n)("wallet.addToken")),1),e.createVNode(l.default,{class:"hover-fill-black fill-white t-transp"})])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("button",{key:0,onClick:u,class:"transition-ease-in-out cursor-pointer bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white"},[w,e.createElementVNode("span",f,e.toDisplayString(e.unref(n)("wallet.connectMetaMask")),1),e.createVNode(l.default,{class:"t-transp",fill:"rgb(var(--white))"})]))]))}};exports.default=M;
|
@@ -0,0 +1,106 @@
|
|
1
|
+
import { ref as s, onMounted as v, openBlock as a, createElementBlock as o, createElementVNode as t, toDisplayString as i, unref as u, createVNode as m, Fragment as _, createCommentVNode as f } from "vue";
|
2
|
+
import { useI18n as y } from "vue-i18n";
|
3
|
+
import x from "../../localization/wallet.json.js";
|
4
|
+
import d from "../../../../icons/navigation/IconAdd.vue.js";
|
5
|
+
const M = /* @__PURE__ */ t("img", {
|
6
|
+
src: "/icons/metamask.svg",
|
7
|
+
class: "mn-r-small i-big"
|
8
|
+
}, null, -1), C = { class: "h4 uppercase w-100" }, E = /* @__PURE__ */ t("img", {
|
9
|
+
src: "/icons/metamask.svg",
|
10
|
+
class: "mn-r-small i-big"
|
11
|
+
}, null, -1), I = { class: "h4 uppercase w-100" }, q = /* @__PURE__ */ t("img", {
|
12
|
+
src: "/icons/metamask.svg",
|
13
|
+
class: "mn-r-small i-big"
|
14
|
+
}, null, -1), D = { class: "h4 uppercase w-100" }, S = "0xE11702CF04621D395E75680C29d3dbF81484e875", T = "WDT", P = 8, A = "https://weeder.delivery/logo-token.png", $ = {
|
15
|
+
__name: "ConnectMetamask",
|
16
|
+
setup(F) {
|
17
|
+
const n = s(!1), l = s(!1), h = s(!1), p = s(null), w = s({}), k = async () => {
|
18
|
+
if (typeof window.ethereum < "u")
|
19
|
+
try {
|
20
|
+
await window.ethereum.request({ method: "eth_requestAccounts" }), r();
|
21
|
+
} catch (e) {
|
22
|
+
console.error("Ошибка при подключении MetaMask:", e);
|
23
|
+
}
|
24
|
+
else
|
25
|
+
window.open("https://metamask.io/", "_blank");
|
26
|
+
}, r = async () => {
|
27
|
+
if (typeof window.ethereum < "u") {
|
28
|
+
n.value = !0;
|
29
|
+
const e = await window.ethereum.request({ method: "eth_chainId" });
|
30
|
+
l.value = e === "0x89" || e === "0x13881";
|
31
|
+
} else
|
32
|
+
n.value = !1;
|
33
|
+
}, g = async () => {
|
34
|
+
try {
|
35
|
+
await window.ethereum.request({
|
36
|
+
method: "wallet_switchEthereumChain",
|
37
|
+
params: [{ chainId: "0x89" }]
|
38
|
+
}), r();
|
39
|
+
} catch (e) {
|
40
|
+
console.error("Ошибка при переключении на Polygon:", e);
|
41
|
+
}
|
42
|
+
}, b = async () => {
|
43
|
+
w.value["pointer-events"] = "none", p.value = null, h.value = !0;
|
44
|
+
try {
|
45
|
+
await ethereum.request({
|
46
|
+
method: "wallet_watchAsset",
|
47
|
+
params: {
|
48
|
+
type: "ERC20",
|
49
|
+
options: {
|
50
|
+
address: S,
|
51
|
+
symbol: T,
|
52
|
+
decimals: P,
|
53
|
+
image: A
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}), w.value["background-color"] = "#009911", h.value = !1;
|
57
|
+
} catch (e) {
|
58
|
+
p.value = e.toString();
|
59
|
+
}
|
60
|
+
}, { t: c } = y({
|
61
|
+
useScope: "global",
|
62
|
+
...x
|
63
|
+
});
|
64
|
+
return v(() => {
|
65
|
+
r();
|
66
|
+
}), (e, N) => (a(), o("div", null, [
|
67
|
+
n.value ? (a(), o(_, { key: 1 }, [
|
68
|
+
l.value ? f("", !0) : (a(), o("button", {
|
69
|
+
key: 0,
|
70
|
+
onClick: g,
|
71
|
+
class: "transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black t-white radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small"
|
72
|
+
}, [
|
73
|
+
E,
|
74
|
+
t("span", I, i(u(c)("wallet.switchToPolygon")), 1),
|
75
|
+
m(d, {
|
76
|
+
class: "t-transp",
|
77
|
+
fill: "rgb(var(--white))"
|
78
|
+
})
|
79
|
+
])),
|
80
|
+
l.value ? (a(), o("button", {
|
81
|
+
key: 1,
|
82
|
+
onClick: b,
|
83
|
+
class: "transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white"
|
84
|
+
}, [
|
85
|
+
q,
|
86
|
+
t("span", D, i(u(c)("wallet.addToken")), 1),
|
87
|
+
m(d, { class: "hover-fill-black fill-white t-transp" })
|
88
|
+
])) : f("", !0)
|
89
|
+
], 64)) : (a(), o("button", {
|
90
|
+
key: 0,
|
91
|
+
onClick: k,
|
92
|
+
class: "transition-ease-in-out cursor-pointer bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white"
|
93
|
+
}, [
|
94
|
+
M,
|
95
|
+
t("span", C, i(u(c)("wallet.connectMetaMask")), 1),
|
96
|
+
m(d, {
|
97
|
+
class: "t-transp",
|
98
|
+
fill: "rgb(var(--white))"
|
99
|
+
})
|
100
|
+
]))
|
101
|
+
]));
|
102
|
+
}
|
103
|
+
};
|
104
|
+
export {
|
105
|
+
$ as default
|
106
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../store/wallet.store.cjs"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-i18n"),m=require("web3"),t=require("../../store/wallet.store.cjs"),p=require("../../localization/wallet.json.cjs"),b=require("../../../../../components/Popup/Popup.vue.cjs"),k=require("../../../../../components/Button/Button.vue.cjs");require("vue-router");;/* empty css */require("../../../../reports/store/reports.cjs");;/* empty css */;/* empty css */require("../../../../auth/store/auth.cjs");require("../../../../organizations/store/memberships.cjs");require("../../../../community/store/reactions.cjs");;/* empty css */const h=require("../elements/ConnectMetamask.vue.cjs"),f=require("../blocks/CashDeposit.vue.cjs"),_=require("../blocks/CardDeposit.vue.cjs"),g=require("../blocks/CryptoDeposit.vue.cjs"),w=require("../blocks/CardBalanceReplenished.vue.cjs"),N=require("../blocks/CryptoDepositProcessing.vue.cjs"),V={class:"pd-thin"},E={class:"bg-black t-white mn-b-thin radius-big pd-big"},B={class:"mn-b-medium"},v={class:"mn-b-semi t-transp p-big"},y={key:0,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"},C={class:"flex-v-center flex-nowrap flex mn-r-auto"},x={key:1,class:"w-100 mn-b-semi flex-column flex pd-big radius-big bg-main t-black"},S=e.createElementVNode("p",{class:"t-transp t-medium mn-b-thin"},"You own:",-1),q={class:"h1 mn-b-small"},D=e.createElementVNode("p",{class:"t-white p-big t-medium mn-b-semi"},"of all shares",-1),M={class:"flex-v-center mn-b-small flex-nowrap flex pd-small bg-black-transp-5 radius-extra"},W={key:0,class:"t-transp t-medium"},P=e.createElementVNode("span",{class:"uppercase p-small t-medium t-transp"},"Connected Metamask",-1),R=e.createElementVNode("br",null,null,-1),T={key:0,class:"mn-b-semi cols-2 gap-thin"},$=e.createElementVNode("div",{class:"w-100 pd-medium radius-medium t-center bg-light"},[e.createElementVNode("h3",{class:"mn-b-small"},"Make first order and start earning Weeder Token"),e.createElementVNode("button",{class:"mn-l-auto mn-r-auto bg-main button"},"Explore marketplace")],-1),G={class:"w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-light"},O={key:0,class:"mn-b-small"},A={key:1,class:"mn-b-small"},L={class:"cols-3 gap-thin"},F={class:"radius-medium bg-light"},I={class:"flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium"},Y={class:"t-semi mn-r-auto"},j={class:"pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small"},H={class:"pd-medium"},z={class:"t-regular mn-b-thin"},J={key:2,class:"mn-b-small"},K={class:"cols-3 gap-thin"},Q={class:"radius-medium bg-grey"},U={class:"flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium"},X={class:"t-semi mn-r-auto"},Z={class:"pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small"},ee={class:"pd-medium"},te={class:"t-regular mn-b-thin"},ne={key:0},oe=e.createElementVNode("h2",{class:"mn-b-small t-center t-bold"},"Choose the way of deposit",-1),se={__name:"Wallet",setup(le){const{t:r}=u.useI18n({useScope:"global",...p.default});window.ethereum.on("accountsChanged",a=>{a.length<1&&(t.state.account=null)}),t.state.web3=new m(window.ethereum||"http://localhost:8080"),e.onMounted(()=>{t.actions.listRewards(),t.actions.tryReconnectWallet()});const c=e.ref(!1),l=e.ref(0);function s(a){l.value=a}function d(){c.value=!0}function i(){c.value=!1,l.value=0,t.actions.stopTimer(),t.actions.disconnectWebSocket()}return(a,o)=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("section",E,[e.createElementVNode("h1",B,e.toDisplayString(e.unref(r)("wallet.title")),1),e.createElementVNode("p",v,e.toDisplayString(e.unref(r)("wallet.subtitle")),1),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",C,[e.createElementVNode("h2",null,e.toDisplayString(e.unref(t.state).tokenBalance)+" "+e.toDisplayString(e.unref(r)("wallet.token")),1)]),e.createElementVNode("button",{onClick:d,class:"t-nowrap w-max bg-main t-medium button"},"Get More"),e.createVNode(k.default,{submit:e.unref(t.actions).collectRewards,class:"w-max bg-white t-black t-medium button"},{default:e.withCtx(()=>[e.createTextVNode(" Withdraw ")]),_:1},8,["submit"])])):e.createCommentVNode("",!0),e.createVNode(h.default,{class:"mn-b-thin radius-extra br-solid br-white-transp-10 br-1px w-100"}),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("div",x,[S,e.createElementVNode("p",q,e.toDisplayString(e.unref(t.state).share)+"%",1),D,e.createElementVNode("div",M,[e.unref(t.state).account?(e.openBlock(),e.createElementBlock("p",W,[P,R,e.createElementVNode("span",null,e.toDisplayString(e.unref(t.state).account),1)])):e.createCommentVNode("",!0),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o[0]||(o[0]=(...n)=>e.unref(t.actions).disconnectWallet&&e.unref(t.actions).disconnectWallet(...n)),class:"mn-l-auto bg-red button"}," Disconnect Wallet ")):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",T,[$,e.createElementVNode("div",G,[e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h3",O," Connect Metamask to withdrawal your earnings. ")),e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o[1]||(o[1]=(...n)=>e.unref(t.actions).connectWallet&&e.unref(t.actions).connectWallet(...n)),class:"br-solid br-2px br-black-transp-10 t-black button"}," Connect Wallet "))])])),e.unref(t.state).rewards.length>0?(e.openBlock(),e.createElementBlock("h2",A,"Latest Rewards ")):e.createCommentVNode("",!0),e.createElementVNode("section",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.state).rewards,n=>(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("div",I,[e.createElementVNode("p",Y,e.toDisplayString(n.amount)+" WDT",1),e.createElementVNode("span",j,e.toDisplayString(n.type==="blogpost"?"Community Reward":n.type),1)]),e.createElementVNode("div",H,[e.createElementVNode("h4",z,e.toDisplayString(n.name),1)])]))),256))]),e.unref(t.state).rewards.length>0?(e.openBlock(),e.createElementBlock("h2",J,"Activity")):e.createCommentVNode("",!0),e.createElementVNode("section",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.state).rewards,n=>(e.openBlock(),e.createElementBlock("div",Q,[e.createElementVNode("div",U,[e.createElementVNode("p",X,e.toDisplayString(n.amount)+" WDT",1),e.createElementVNode("span",Z,e.toDisplayString(n.type==="blogpost"?"Community Reward":n.type),1)]),e.createElementVNode("div",ee,[e.createElementVNode("h4",te,e.toDisplayString(n.name),1)])]))),256))]),e.createVNode(b.default,{onClosePopup:i,isPopupOpen:c.value,class:"w-m-50r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[l.value===0?(e.openBlock(),e.createElementBlock("div",ne,[oe,e.createElementVNode("button",{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",onClick:o[2]||(o[2]=n=>s(1))}," CASH "),e.createElementVNode("button",{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",onClick:o[3]||(o[3]=n=>s(2))}," CARD "),e.createElementVNode("button",{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",onClick:o[4]||(o[4]=n=>s(4))}," CRYPTO ")])):e.createCommentVNode("",!0),l.value===1?(e.openBlock(),e.createBlock(f.default,{key:1,onBackSelection:o[5]||(o[5]=n=>s(0))})):e.createCommentVNode("",!0),l.value===2?(e.openBlock(),e.createBlock(_.default,{key:2,onBackSelection:o[6]||(o[6]=n=>s(0)),onSwitchMenu:s})):e.createCommentVNode("",!0),l.value===3?(e.openBlock(),e.createBlock(w.default,{key:3,onClose:i})):e.createCommentVNode("",!0),l.value===4?(e.openBlock(),e.createBlock(g.default,{key:4,onBackSelection:o[7]||(o[7]=n=>s(0)),onSwitchMenu:s})):e.createCommentVNode("",!0),l.value===5?(e.openBlock(),e.createBlock(N.default,{key:5,onBackSelection:o[8]||(o[8]=n=>s(0)),onSwitchMenu:s})):e.createCommentVNode("",!0)]),_:1},8,["isPopupOpen"])]))}};exports.default=se;
|
@@ -1,10 +1,11 @@
|
|
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
|
-
import C from "../../../../../components/Popup/Popup.vue.js";
|
6
|
-
/* empty css */
|
7
|
-
/* empty css */
|
8
9
|
/* empty css */
|
9
10
|
import "../../../../reports/store/reports.js";
|
10
11
|
/* empty css */
|
@@ -13,170 +14,184 @@ import "../../../../auth/store/auth.js";
|
|
13
14
|
import "../../../../organizations/store/memberships.js";
|
14
15
|
import "../../../../community/store/reactions.js";
|
15
16
|
/* empty css */
|
16
|
-
import
|
17
|
-
import
|
18
|
-
import
|
19
|
-
import
|
20
|
-
|
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
|
-
|
49
|
+
setup(wt) {
|
50
|
+
const { t: b } = M({
|
51
|
+
useScope: "global",
|
52
|
+
...$
|
53
|
+
});
|
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();
|
51
58
|
});
|
52
|
-
const
|
53
|
-
function c(
|
54
|
-
|
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;
|