{"version":3,"sources":["webpack:///./src/views/PaymentPage.vue","webpack:///src/views/PaymentPage.vue","webpack:///./src/views/PaymentPage.vue?c00a","webpack:///./src/views/PaymentPage.vue?d2f0","webpack:///./src/views/PaymentPage.vue?0d25"],"names":["render","_vm","this","_c","_self","staticClass","attrs","history_is_ready","_v","_s","$t","statuses","_e","staticStyle","transaction_history_not_empty","on","sortTransactions","_l","item","key","id","handleDeleteEmit","staticRenderFns","name","components","Button","ProgressSpinner","TableCell","PageFooter","TransactionCard","LocaleSwither","computed","mapGetters","getTransactionHistory","transaction_history","getWalletAddress","localStorage","getItem","getUserWalletAddress","getSentAmount","getAwaitingAmount","getCurrencyCode","calculatePKOINDealStatus","_this$status","_this$status2","_this$status3","_this$status4","_this$status5","_this$status6","_this$status7","_this$status8","status","getLabelColor","getHistoryStatuses","current_history_statuses","isMobileDevice","window","innerWidth","isTransactionHistoryEmpty","setItem","JSON","stringify","Object","keys","methods","mapActions","createUpdatedHistoryList","_this$getHistoryStatu","updated_statuses","purchase_history","forEach","wallet","address","minutesLeft","showClipboardNotification","$toast","add","severity","summary","detail","life","showDataUpdateMessage","updateAllTransactions","long_polling_timeout","setTimeout","longPolling","prepareRequestList","list","arr","values","actual_transactions","filter","map","Address","payment_address","Currency","Ñurrency","getTransactionsHistoryList","history","length","updateHistoryTransactionStatuses","awaiting_transactions","other_statuses","sort","a","b","date","mounted","beforeDestroy","clearTimeout","data","watch","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,mBAAmB,CAACF,EAAG,aAAa,CAACG,MAAM,CAAC,KAAO,SAAS,CAAEL,EAAIM,iBAAkBJ,EAAG,MAAM,CAACE,YAAY,mBAAmB,CAACF,EAAG,KAAK,CAACE,YAAY,uBAAuB,CAACJ,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIS,GAAG,sCAAwCT,EAAIU,SAAwKV,E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AAjC,EAAAiC,QAEA,OAAAuC,EAAAE,IAAA1E,IACA,CACA2E,QAAA3E,EAAA4E,gBACAC,SAAA7E,EAAA8E,aAKA3E,mBACA,KAAAP,+BAAA,GAGA,oCACA,KAAAmF,6BAEA,MAAAC,EAAA,KAAAZ,mBAAA,KAAArD,uBAEAiE,EAAAC,OAAA,SACA,KAAAC,iCAAAxC,KAAAC,UAAAqC,IAGAd,WAAA,KACA,KAAAzE,SAAAmD,OAAA2B,OAAA,KAAAvB,4BACA,KAAAlD,oBACA,MAKAA,mBACA,MAAAqF,EAAA,KAAA1F,SAAAgF,OAAAzE,GAAA,kBAAAA,EAAAiC,QACAmD,EAAA,KAAA3F,SAAAgF,OAAAzE,GAAA,kBAAAA,EAAAiC,QAEAkD,EAAAE,KAAA,CAAAC,EAAAC,MAAAC,KAAAF,EAAAE,MACAJ,EAAAC,KAAA,CAAAC,EAAAC,MAAAC,KAAAF,EAAAE,MAEA,KAAA/F,SAAA,IAAA0F,KAAAC,KAIA,sBACA,KAAApB,wBACA,KAAAG,cAEAD,WAAA,KACA,KAAA7E,kBAAA,GACA,MAGAoG,YAIAC,gBACAC,aAAA,KAAA1B,uBAGA2B,OACA,OACAnG,SAAA,KACAJ,kBAAA,EACAO,+BAAA,EACAqE,qBAAA,OAIA4B,MAAA,IC5OuX,I,wBCQnXC,EAAY,eACd,EACAhH,EACAsB,GACA,EACA,KACA,WACA,MAIa,aAAA0F,E,6CCnBf,W","file":"js/chunk-85523ed6.76c0d17f.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"paymant-wrapper\"},[_c('transition',{attrs:{\"name\":\"fade\"}},[(_vm.history_is_ready)?_c('div',{staticClass:\"content-wrapper\"},[_c('h1',{staticClass:\"transactions-header\"},[_vm._v(_vm._s(_vm.$t('interface.transactions_history')))]),(!_vm.statuses)?_c('div',{staticClass:\"loading\"},[_vm._v(\" Loading data... \"),_c('i',{staticClass:\"pi pi-spin pi-spinner\",staticStyle:{\"fontSize\":\"1rem\",\"color\":\"white\"}})]):_vm._e(),(_vm.statuses && _vm.transaction_history_not_empty)?_c('div',{staticClass:\"cards-wrapper\"},[(true)?_c('div',{staticClass:\"sort-btn\",on:{\"click\":_vm.sortTransactions}}):_vm._e(),_vm._l((_vm.statuses),function(item){return _c('TableCell',{key:item.id,attrs:{\"params\":item}})})],2):_vm._e()]):_vm._e()]),_c('PageFooter',{staticClass:\"footer\",attrs:{\"color\":\"white\"},on:{\"historyDelete\":_vm.handleDeleteEmit}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n<!-- Ðто Ñтраница иÑтории покупок /payment-->\n <div class=\"paymant-wrapper\">\n\n \n <transition name=\"fade\">\n <div v-if=\"history_is_ready\" class=\"content-wrapper\">\n\n <h1 class=\"transactions-header\">{{$t('interface.transactions_history')}}</h1>\n\n <div v-if=\"!statuses\" class=\"loading\">\n Loading data... <i class=\"pi pi-spin pi-spinner\" style=\"fontSize: 1rem; color: white\"></i>\n </div>\n\n <div v-if=\"statuses && transaction_history_not_empty\" class=\"cards-wrapper\">\n <div v-if=\"true\" @click=\"sortTransactions\" class=\"sort-btn\">\n <!-- <i class=\"pi pi-chevron-up sort\"></i> -->\n <!-- <span class=\"sort-label\">Show 'awaiting funds' first</span> -->\n </div>\n <TableCell\n v-for=\"item in statuses\"\n :key=\"item.id\"\n :params=\"item\" \n />\n </div>\n </div>\n </transition>\n <PageFooter @historyDelete=\"handleDeleteEmit\" class=\"footer\" color=\"white\" />\n </div>\n</template>\n\n<script>\nimport { mapGetters, mapActions } from 'vuex'\n\nimport Button from 'primevue/button'\nimport ProgressSpinner from 'primevue/progressspinner'\n\nimport TableCell from '@/components/UI/TableCell'\nimport TransactionCard from '@/components/UI/TransactionCard.vue'\nimport PageFooter from '@/components/PageFooter.vue'\nimport LocaleSwither from '@/components/LocaleSwither.vue'\n\nexport default {\n name: 'PaymentModal',\n components: {\n Button,\n ProgressSpinner,\n TableCell,\n PageFooter,\n TransactionCard,\n PageFooter,\n LocaleSwither\n },\n\n computed: {\n ...mapGetters([\n 'status',\n 'is_loading',\n 'transaction_history',\n 'current_history_statuses'\n ]),\n\n getTransactionHistory() {\n return this.transaction_history\n },\n\n getWalletAddress() {\n return localStorage.getItem('wallet_address')\n },\n\n getUserWalletAddress() {\n return localStorage.getItem('user_wallet_address')\n },\n\n getSentAmount() {\n return localStorage.getItem('paid_amount')\n },\n\n getAwaitingAmount() {\n return localStorage.getItem('await_pkoin_amount')\n },\n\n getCurrencyCode() {\n return localStorage.getItem('purchased_currency')\n },\n\n calculatePKOINDealStatus() {\n if(this.status?.status === 'AWAITINGFUNDS') return 'AWAITING FUNDS'\n if(this.status?.status === 'EXPIREDAWAITINGFUNDS') return 'EXPIRED'\n if(this.status?.status === 'POCSENT') return 'COMPLETED'\n if(this.status?.status === 'MANUAL') return 'PENDING'\n if(this.status?.status === 'CONFIRMATIONS0') return 'AWAITING CONFIRMATIONS'\n if(this.status?.status === 'CONFIRMATIONS1') return '1 CONFIRMATION'\n if(this.status?.status === 'CONFIRMATIONS2') return '2 CONFIRMATIONS'\n if(this.status?.status === 'CONFIRMATIONS3') return '3 CONFIRMATIONS'\n },\n\n getLabelColor() {\n if(this.calculatePKOINDealStatus === 'AWAITING FUNDS') return 'await'\n if(this.calculatePKOINDealStatus === 'EXPIRED') return 'expired'\n if(this.calculatePKOINDealStatus === 'COMPLETED') return 'completed'\n if(this.calculatePKOINDealStatus === 'PENDING') return 'pending'\n if(this.calculatePKOINDealStatus === 'CONFIRMATIONS0') return 'Ñonfirm'\n if(this.calculatePKOINDealStatus === 'CONFIRMATIONS1') return 'Ñonfirm'\n if(this.calculatePKOINDealStatus === 'CONFIRMATIONS2') return 'Ñonfirm'\n if(this.calculatePKOINDealStatus === 'CONFIRMATIONS3') return 'Ñonfirm'\n },\n\n getHistoryStatuses() {\n return this.current_history_statuses\n },\n\n isMobileDevice() {\n return window.innerWidth <= 768\n },\n\n isTransactionHistoryEmpty() {\n if(!this.transaction_history) {\n localStorage.setItem('transaction_history', JSON.stringify({}))\n }\n\n return !(!!Object.keys(this.transaction_history))\n }\n },\n\n methods: {\n ...mapActions([\n 'getPKOINDealStatus',\n 'getTransactionsHistoryList',\n 'updateHistoryTransactionStatuses'\n ]),\n\n createUpdatedHistoryList() {\n const updated_statuses = this.getHistoryStatuses ?? []\n const purchase_history = this.getTransactionHistory\n\n updated_statuses.forEach(item => {\n\n const wallet = item.address\n\n purchase_history[wallet].minutesLeft = item.minutesLeft\n purchase_history[wallet].status = item.status\n })\n\n return purchase_history\n },\n\n showClipboardNotification() {\n this.$toast.add({severity:'success', summary: '', detail:'Wallet address has successfully copied to clipboard', life: 3000})\n },\n\n showDataUpdateMessage() {\n this.$toast.add({severity:'success', summary: '', detail:'Transaction data has successfully updated', life: 3000})\n },\n\n //раз в минуту делает Ð·Ð°Ð¿Ñ€Ð¾Ñ Ð½Ð° обновление ÑтатуÑов Ñделок, еÑли они еÑÑ‚ÑŒ\n async longPolling() {\n if(!this.isTransactionHistoryEmpty) {\n this.updateAllTransactions()\n \n this.long_polling_timeout = setTimeout(() => {\n this.longPolling()\n }, 60000)\n }\n },\n\n prepareRequestList(list) {\n const arr = Object.values(list)\n const actual_transactions = arr.filter(item => item.status !== 'EXPIREDAWAITINGFUNDS' && item.status !== 'POCSENT')\n\n return actual_transactions.map(item => {\n return {\n Address: item.payment_address,\n Currency: item.Ñurrency\n }\n })\n },\n\n handleDeleteEmit() {\n this.transaction_history_not_empty = false\n },\n\n async updateAllTransactions() {\n await this.getTransactionsHistoryList()\n\n const history = this.prepareRequestList(this.getTransactionHistory)\n\n if(history.length > 0) {\n await this.updateHistoryTransactionStatuses(JSON.stringify(history))\n }\n \n setTimeout(() => {\n this.statuses = Object.values(this.createUpdatedHistoryList())\n this.sortTransactions()\n }, 1000)\n\n },\n\n //Сортирует карточки в иÑтории транзакций по времени (Ñвежие наверх), Ð¿Ð¾Ð¼ÐµÑ‰Ð°Ñ Ð½ÐµÐ·Ð°ÐºÑ€Ñ‹Ñ‚Ñ‹Ðµ Ñделки поверх вÑех оÑтальных\n sortTransactions() {\n const awaiting_transactions = this.statuses.filter(item => item.status === \"AWAITINGFUNDS\")\n const other_statuses = this.statuses.filter(item => item.status !== \"AWAITINGFUNDS\")\n\n awaiting_transactions.sort((a, b) => b.date - a.date)\n other_statuses.sort((a, b) => b.date - a.date)\n\n this.statuses = [...awaiting_transactions, ...other_statuses]\n }\n },\n\n async created() {\n await this.updateAllTransactions()\n this.longPolling()\n\n setTimeout(() => {\n this.history_is_ready = true\n }, 400)\n },\n\n mounted() {\n\n },\n\n beforeDestroy() {\n clearTimeout(this.long_polling_timeout)\n },\n\n data() {\n return {\n statuses: null,\n history_is_ready: false,\n transaction_history_not_empty: true,\n long_polling_timeout: null\n }\n },\n\n watch: {\n }\n\n}\n</script>\n\n<style lang=\"sass\" scoped>\n.content-wrapper\n width: 100%\n max-height: 60%\n display: flex\n flex-direction: column\n justify-content: center\n align-items: center\n overflow-y: auto\n\n.paymant-wrapper\n display: flex\n flex-direction: column\n justify-content: center\n align-items: center\n height: 100vh\n background: url('../assets/images/history-background.jpg')\n background-position: center\n background-repeat: no-repeat\n background-size: cover\n\n.transactions-header\n color: white\n\n.cards-wrapper\n width: 45%\n display: flex\n flex-direction: column\n overflow-y: auto\n scrollbar-width: thin\n\n.loading\n font-size: 1.4em\n color: white\n margin-bottom: 1em\n\n.sort-btn\n padding: .3em 0\n margin-bottom: .3em\n color: white\n cursor: pointer\n text-decoration: underline dotted\n\n.sort-label\n margin-left: .5em\n\n@media only screen and (max-width: 2240px)\n .cards-wrapper\n width: 50%\n\n@media only screen and (max-width: 2070px)\n .cards-wrapper\n width: 55%\n\n@media only screen and (max-width: 1732px)\n .cards-wrapper\n width: 60%\n\n@media only screen and (max-width: 1588px)\n .cards-wrapper\n width: 65%\n\n@media only screen and (max-width: 1465px)\n .cards-wrapper\n width: 75%\n\n@media only screen and (max-width: 1270px)\n .cards-wrapper\n width: 90%\n\n@media only screen and (max-width: 1080px)\n .cards-wrapper\n width: 95%\n\n@media only screen and (max-width: 768px)\n .content-wrapper\n max-height: 95%\n\n@media only screen and (max-width: 520px)\n .purchase_wallet\n padding: 5px 0\n</style>","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PaymentPage.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PaymentPage.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./PaymentPage.vue?vue&type=template&id=1a0f0bd9&scoped=true\"\nimport script from \"./PaymentPage.vue?vue&type=script&lang=js\"\nexport * from \"./PaymentPage.vue?vue&type=script&lang=js\"\nimport style0 from \"./PaymentPage.vue?vue&type=style&index=0&id=1a0f0bd9&prod&lang=sass&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1a0f0bd9\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--10-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PaymentPage.vue?vue&type=style&index=0&id=1a0f0bd9&prod&lang=sass&scoped=true\""],"sourceRoot":""}