diff --git a/.gitignore b/.gitignore index 5f6ea53..b812c8b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ node_modules/ .vscode/settings.json web/exmr/gnupg/random_seed web/exmr/celerybeat.pid -web/exmr/celerybeat-schedule \ No newline at end of file +web/exmr/celerybeat-schedule diff --git a/Android App/app/app.iml b/Android App/app/app.iml index c6a81f6..6e948a7 100644 --- a/Android App/app/app.iml +++ b/Android App/app/app.iml @@ -1,9 +1,9 @@ - - + + - diff --git a/Android App/app/app/app.iml b/Android App/app/app/app.iml index 7f469d5..fce24e8 100644 --- a/Android App/app/app/app.iml +++ b/Android App/app/app/app.iml @@ -138,4 +138,4 @@ - \ No newline at end of file + diff --git a/README.md b/README.md index 8e9009a..9d79e11 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,96 @@ -![Logo](https://github.com/eXMRcoin/e-XMR/blob/master/eXMR-master/eXMR_200X200.png?raw=true) -# EXMR MONERO -# Project-GetCryptoPayments.net® -➥A project based on Merchants tools: payment gateway, multi-coins wallet and point of sales, will make EXMR increase its value.
-➥A large number of stores and online businesses, will be able to receive payments in our EXMR and other cryptocurrencies.
-➥GetCryptoPayments.net® by EXMR MONERO ℠ Will support more than 130 Cryptocurrencies on your platform and will be added by our voting system.
-➥Offering plugins for all the popular webcarts used today: Prestashop; Oscommerce; Magento; woocommerce; WHMCS - -# ANDROID & iOS APP
-➥Here you can send and receive your virtual coins.
-➥You can receive instant payments in any Cryptocurrency you choose, using your wallet or a qr code.
-➥Synchronization of your account to see the payments or deposits received.
- -# Developer Team
+![Logo](https://github.com/eXMRcoin/EXMR-INFO/blob/master/eXMR-master/backclear.png?raw=true) +# EXMR FDN. (EXMR FOUNDATION) +# Smart contract details
+NAME: EXMR FND.
+SYMBOL: EXMR
+DECIMALS: 18
+CONTRACT ADDRESS: 0x331fA6C97c64e47475164b9fC8143b533c5eF529
+Explorer: EXMR FND. code: https://etherscan.io/address/0x331fa6c97c64e47475164b9fc8143b533c5ef529#code +
+ + Show ABI here: + +

+ [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"frozen","type":"bool"}],"name":"FrozenFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address payable","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address payable","name":"newOwner","type":"address"}],"name":"OwnershipTransferredEv","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"releaseMyExmrEv","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"earning","type":"uint256"}],"name":"tokenBalanceFreezeEv","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"earning","type":"uint256"}],"name":"tokenBalanceMeltEv","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"tokenDepositEv","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"tokenWithdrawEv","type":"event"},{"constant":false,"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"tokenAmount","type":"uint256[]"}],"name":"Bounty","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burnFrom","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"burningRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"changeWhitelistingStatus","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"changesafeGuardStatus","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"freeze","type":"bool"}],"name":"freezeAccount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"freezingOnOffForTokenType","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"frozenAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"manualWithdrawEther","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"manualWithdrawToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maximumSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"meltHoldSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"mintedAmount","type":"uint256"}],"name":"mintToken","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"bytes23","name":"","type":"bytes23"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"newOwner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bytes23","name":"_tokenName","type":"bytes23"},{"internalType":"bytes8","name":"_tokenSymbol","type":"bytes8"},{"internalType":"uint256","name":"_decimalCount","type":"uint256"},{"internalType":"uint256","name":"_minFreezingValue","type":"uint256"},{"internalType":"uint256","name":"_rateFactor","type":"uint256"},{"internalType":"uint256","name":"_perDayFreezeRate","type":"uint256"}],"name":"newTokenTypeData","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"releaseMyExmr","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"safeGuard","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_burningRate","type":"uint256"}],"name":"setBurningRate","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"_minFreezingValue","type":"uint256"}],"name":"setMinFreezingValue","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"_perDayFreezeRate","type":"uint256"}],"name":"setPerDayFreezeRate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"_rateFactor","type":"uint256"}],"name":"setRateFactor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"valueInSeconds","type":"uint256"}],"name":"setWithdrawWaitingPeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"bytes8","name":"","type":"bytes8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"tokenBalanceFreeze","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"tokenBalanceMelt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"tokenDeposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenTypeDatas","outputs":[{"internalType":"bytes23","name":"tokenName","type":"bytes23"},{"internalType":"bytes8","name":"tokenSymbol","type":"bytes8"},{"internalType":"uint256","name":"decimalCount","type":"uint256"},{"internalType":"uint256","name":"minFreezingValue","type":"uint256"},{"internalType":"uint256","name":"rateFactor","type":"uint256"},{"internalType":"uint256","name":"perDayFreezeRate","type":"uint256"},{"internalType":"bool","name":"freezingAllowed","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"tokenWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"tokens","outputs":[{"internalType":"uint256","name":"totalValue","type":"uint256"},{"internalType":"uint256","name":"freezeValue","type":"uint256"},{"internalType":"uint256","name":"freezeDate","type":"uint256"},{"internalType":"uint256","name":"meltValue","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalMintAfterInitial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"viewMyReward","outputs":[{"internalType":"uint256","name":"freezedValue","type":"uint256"},{"internalType":"uint256","name":"rewardValue","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"whitelistUser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"whitelistingStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"}] + +

+
+ +
+ + Staking System + +

+ We will be to holders who can add their own tokens inside in our Freeze to staking (extend IERC20.sol) +

+
+
+ + Burn % Voting System + +

+ Now our community can vote to increase the percentage to burn our token for each transfer (into our EXMR_FDN.sol) +

+
+
+ + Bounty System + +

+ Now the developer community can earn EXMR FDN. by our Bounty program (into our EXMR_FDN.sol) +

+

+ +# About us:
+We are motivating blockchain developers to integrate their Dapp's with EXMR FDN, and thus receive Bounty rewards, additionally you can start a custom Dapp's for EXMR FDN. and submit it to this repository of EXMR FOUNDATION, so that all developers can integrate into the work and thus all win rewards.
+ +# People can now start staking their EXMR FDN.
+here: https://dapp.exmr.io
+New exchanges and Dapp's coming this 2020!!
+ +# About our current project
+We have the repository in private for security.
+You can visit here https://GetCryptoPayments.com®
+ +# About getcryptopayments.com +➥A project based on Merchants tools: payment gateway, multi-coins wallet and point of sales, will make EXMR FDN increase its value.
+➥A large number of stores and online businesses, will be able to receive payments in our EXMR FDN and other cryptocurrencies.
+➥GetCryptoPayments.com® by EXMR FDN. Will support more than 130 to 2000 Cryptocurrencies on your platform and will be added by our voting system or payment fee.
+➥Offering integration plugins for all the popular webcarts used today: Prestashop; Oscommerce; Magento; woocommerce; WHMCS. etc + +# Developer Team for this project
➥pnija
-➥MarcosFermin
➥albertnanita
-➥JulianIsrael
+➥Krishna
+➥Vipin Mohan
+ +# Milestones
+⌘ Alpha Version May 2019
+ 🍀 Services:
+✦ Fiat and coin services.
+✦ Vault Wallet.
+✦ Voting system to add coins per reach 70,000 points.
+✦ From 1 to 100 token wallets services in operation.
+⌘ New UI-UX August 2019
+⌘ Beta Version this November 2019 "Ongoing"
+✦ The function of add store profiles.
+✦ Merchant tools From 1 to 10 coins to receive online payments.
+✦ Swap between those 10-15 coins & more.
+⌘ Exchange + API and IEO and Staking services for all coins developers + +🍀 Features:
+✦ Swap between coins or tokens
+✦ Store profiles
+✦ Voting system
+✦ Fiat Services
+✦ Merchant Tools
+✦ Pay by Name
+✦ Multi Wallet
+✦ Payment Gateway
+✦ Vault Wallet
+✦ Voting system
+✦ Point of Sales (POS)
+✦ Airdrop Sevices
+✦ ICO Sevices
+✦ Exchange Api
+& More.. diff --git a/css/style.css b/css/style.css index 50dfc8b..ff7832b 100644 --- a/css/style.css +++ b/css/style.css @@ -1003,34 +1003,6 @@ section { padding: 0 15px; } font-size: 12px; display: none; } -<<<<<<< HEAD -.success { - color: green; - font-size: 18px; - margin-bottom: 15px; - display: none; -} -.capticha-enter1{ - height: 41px; - width: 38% !important ; -} -.entr-box{ - padding: 0; - margin-top: -15px; -} -.sign-button{ - margin-bottom: 20px; -} -.forgot-pw{ - margin-bottom: 15px; -} -.time-cone{ - font-size: 18px; - color: #e75d14; - font-weight: 600; -} -======= /* Phones/ */ /*========== Mobile First Method ==========*/ ->>>>>>> c52ef3a20406857197ee02786b48d1c940044ff4 diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 0000000..3687d6f Binary files /dev/null and b/dump.rdb differ diff --git a/fonts/Poppins/OFL.txt b/fonts/Poppins/OFL.txt index 450ee68..1377a0a 100644 --- a/fonts/Poppins/OFL.txt +++ b/fonts/Poppins/OFL.txt @@ -1,4 +1,4 @@ -Copyright 2014-2017 Indian Type Foundry (info@indiantypefoundry.com) +Copyright 2014-2017 UNITED STATES Type Foundry (info@usatypefoundry.com) This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: diff --git a/iOS APP/CryptoPayment.xcodeproj/project.pbxproj b/iOS APP/CryptoPayment.xcodeproj/project.pbxproj index c0db509..c47ad13 100644 --- a/iOS APP/CryptoPayment.xcodeproj/project.pbxproj +++ b/iOS APP/CryptoPayment.xcodeproj/project.pbxproj @@ -6,7 +6,7 @@ objectVersion = 46; objects = { -/* Begin PBXBuildFile section */ +/* Begin PBXBuildFile section */ 4B12BD7D6B4A20796500D422 /* Pods_CryptoPaymentUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 99B175E3A4A78A82940A95E2 /* Pods_CryptoPaymentUITests.framework */; }; 5D994F21E70A7333AC6A424E /* Pods_CryptoPaymentTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A473337F50F1C64FF9D705C /* Pods_CryptoPaymentTests.framework */; }; A24536F4203C40BA00CDA2D4 /* Alert.swift in Sources */ = {isa = PBXBuildFile; fileRef = A24536F3203C40BA00CDA2D4 /* Alert.swift */; }; diff --git a/iOS APP/Podfile b/iOS APP/Podfile index 526b435..6d6fabd 100644 --- a/iOS APP/Podfile +++ b/iOS APP/Podfile @@ -1,7 +1,7 @@ -# Uncomment the next line to define a global platform for your project +# Uncomment the next line to define a global platform for your project. # platform :ios, '9.0' -target 'CryptoPayment' do +target 'GetCryptoPayments' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! @@ -9,12 +9,12 @@ target 'CryptoPayment' do pod 'IQKeyboardManagerSwift' - target 'CryptoPaymentTests' do + target 'GetCryptoPaymentsTests' do inherit! :search_paths # Pods for testing end - target 'CryptoPaymentUITests' do + target 'GetCryptoPaymentsUITests' do inherit! :search_paths # Pods for testing end diff --git "a/img/C:\\Users\\PARANGAT_PT_W2\\AppData\\Local\\Packages\\Microsoft.SkypeApp_kzf8qxf38zg5c\\LocalState\\04a20f5c-ba19-4292-9e64-d5044a41fc99.jpg" "b/img/C:\\Users\\PARANGAT_PT_W2\\AppData\\Local\\Packages\\Microsoft.SkypeApp_kzf8qxf38zg5c\\LocalState\\04a20f5c-ba19-4292-9e64-d5044a41fc99.jpg" deleted file mode 100644 index 3b61e31..0000000 Binary files "a/img/C:\\Users\\PARANGAT_PT_W2\\AppData\\Local\\Packages\\Microsoft.SkypeApp_kzf8qxf38zg5c\\LocalState\\04a20f5c-ba19-4292-9e64-d5044a41fc99.jpg" and /dev/null differ diff --git a/img/about.png b/img/about.png deleted file mode 100644 index ac64f1d..0000000 Binary files a/img/about.png and /dev/null differ diff --git a/img/about_icon.png b/img/about_icon.png deleted file mode 100644 index f037335..0000000 Binary files a/img/about_icon.png and /dev/null differ diff --git a/img/b_icon.png b/img/b_icon.png deleted file mode 100644 index 64dccdd..0000000 Binary files a/img/b_icon.png and /dev/null differ diff --git a/img/gcp-brand.png b/img/gcp-brand.png new file mode 100644 index 0000000..ad2f2d7 Binary files /dev/null and b/img/gcp-brand.png differ diff --git a/img/home _new.jpg b/img/home _new.jpg deleted file mode 100644 index 842ce24..0000000 Binary files a/img/home _new.jpg and /dev/null differ diff --git a/img/home_bgslider.png b/img/home_bgslider.png deleted file mode 100644 index bddc6fa..0000000 Binary files a/img/home_bgslider.png and /dev/null differ diff --git a/img/logo.png b/img/logo.png deleted file mode 100644 index 67995c7..0000000 Binary files a/img/logo.png and /dev/null differ diff --git a/img/product_icon.png b/img/product_icon.png deleted file mode 100644 index 6431e34..0000000 Binary files a/img/product_icon.png and /dev/null differ diff --git a/img/user.png b/img/user.png deleted file mode 100644 index efcd48e..0000000 Binary files a/img/user.png and /dev/null differ diff --git a/js/bootstrap.js b/js/bootstrap.js index 8a2e99a..5eaed46 100644 --- a/js/bootstrap.js +++ b/js/bootstrap.js @@ -1,5 +1,5 @@ /*! - * Bootstrap v3.3.7 (http://getbootstrap.com) + * Bootstrap v3.3.7 ( http://getbootstrap.com ) * Copyright 2011-2016 Twitter, Inc. * Licensed under the MIT license */ @@ -752,7 +752,7 @@ if (typeof jQuery === 'undefined') { * Bootstrap: dropdown.js v3.3.7 * http://getbootstrap.com/javascript/#dropdowns * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. + * Copyright 2011-2016 Twitter , Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ diff --git a/js/npm.js b/js/npm.js index bf6aa80..8d4e1ac 100644 --- a/js/npm.js +++ b/js/npm.js @@ -1,4 +1,4 @@ -// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. +// This file is autogenerated via the `commonjs` Grunt task. You can require( ) this file in a CommonJS environment. require('../../js/transition.js') require('../../js/alert.js') require('../../js/button.js') @@ -10,4 +10,4 @@ require('../../js/tooltip.js') require('../../js/popover.js') require('../../js/scrollspy.js') require('../../js/tab.js') -require('../../js/affix.js') \ No newline at end of file +require('../../js/affix.js') diff --git a/logoC.png b/logoC.png new file mode 100644 index 0000000..da5dcc8 Binary files /dev/null and b/logoC.png differ diff --git a/web/exmr/apps/accounts/models.py b/web/exmr/apps/accounts/models.py index 1dec43c..9c472dd 100755 --- a/web/exmr/apps/accounts/models.py +++ b/web/exmr/apps/accounts/models.py @@ -1,6 +1,6 @@ from ckeditor.fields import RichTextField from django.conf import settings -from apps.common.utils import send_mail,send_email +# from apps.common.utils import send_mail,send_email, gpg from django.db import models from django.contrib.auth.models import User from django.db.models import Avg @@ -13,7 +13,6 @@ from timezone_field import TimeZoneField from django_countries.fields import CountryField -from apps.common.utils import send_mail, gpg MALE = 0 @@ -118,12 +117,12 @@ def total_reviews(self): def neutral(self): return self.user.get_all_feedback.filter(rating=2.5).count() - def save(self, *args, **kwargs): - try: - gpg.import_keys(self.pgp_gpg_public_key) - except: - self.pgp_gpg_public_key = None - return super().save(*args, **kwargs) + # def save(self, *args, **kwargs): + # try: + # gpg.import_keys(self.pgp_gpg_public_key) + # except: + # self.pgp_gpg_public_key = None + # return super().save(*args, **kwargs) @@ -164,8 +163,8 @@ def send_activation_email(self, site, request=None): 'site': site, } - send_email(activation_email_subject, ctx_dict, self.user.email, email_template_txt=activation_email_body, - email_template_html=activation_email_html) + # send_email(activation_email_subject, ctx_dict, self.user.email, email_template_txt=activation_email_body, + # email_template_html=activation_email_html) # Temporary code to send email without template @@ -281,13 +280,13 @@ class KYC(models.Model): def __str__(self): return self.user.username - def save(self): - if self.approved == True: - send_mail(self.user,"KYC Approval",\ - "Your Kyc request has been successfully approved",\ - settings.DEFAULT_FROM_EMAIL, - [self.user.email]) - return super().save() + # def save(self): + # if self.approved == True: + # send_mail(self.user,"KYC Approval",\ + # "Your Kyc request has been successfully approved",\ + # settings.DEFAULT_FROM_EMAIL, + # [self.user.email]) + # return super().save() class KYCTerms(models.Model): """ diff --git a/web/exmr/apps/apiapp/coincap.py b/web/exmr/apps/apiapp/coincap.py index f5f8dfa..38d19bd 100755 --- a/web/exmr/apps/apiapp/coincap.py +++ b/web/exmr/apps/apiapp/coincap.py @@ -3,6 +3,9 @@ from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry +from requests import Request, Session +from requests.exceptions import ConnectionError, Timeout, TooManyRedirects + __API_URL_BASE = 'https://api.coincap.io/v2/' class CoincapAPI: @@ -66,13 +69,34 @@ def get_coins_list(self): def get_coins_markets(self, vs_currency, **kwargs): """List all supported coins price, market cap, volume, and market related data (no pagination required)""" - # kwargs['vs_currency'] = vs_currency - kwargs['limit'] = 2000 + # # kwargs['vs_currency'] = vs_currency + # kwargs['limit'] = 2000 - api_url = '{0}assets'.format(self.api_base_url) - api_url = self.__api_url_params(api_url, kwargs) - # import pdb; pdb.set_trace() - return self.__request(api_url) + # api_url = '{0}assets'.format(self.api_base_url) + # api_url = self.__api_url_params(api_url, kwargs) + # # import pdb; pdb.set_trace() + # return self.__request(api_url) + + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = { + 'start':'1', + 'limit':'5000', + 'convert':'USD' + } + headers = { + 'Accepts': 'application/json', + 'X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044', + } + + session = Session() + session.headers.update(headers) + + try: + response = session.get(url, params=parameters) + data = json.loads(response.text) + return data + except (ConnectionError, Timeout, TooManyRedirects) as e: + print(e) def get_coin_by_id(self, id, **kwargs): diff --git a/web/exmr/apps/coins/utils.py b/web/exmr/apps/coins/utils.py index 57b9f5a..e89ff99 100755 --- a/web/exmr/apps/coins/utils.py +++ b/web/exmr/apps/coins/utils.py @@ -34,7 +34,7 @@ from apps.merchant_tools.models import MerchantPaymentWallet -w3 = Web3(HTTPProvider('http://35.185.10.253:8545')) +w3 = Web3(HTTPProvider('http://52.14.59.225:3334')) timestamp_dif = 3000 #in seconds @@ -107,7 +107,7 @@ def create_BTC_connection(): create connetion to bitcoin fullnode """ access = AuthServiceProxy( - "http://exmr:MKDNdksjfDNsjkN@35.185.10.253:8332") + "http://bitcoinexmr:test1111@3.128.85.207:8332") return access @@ -115,7 +115,7 @@ def create_LTC_connection(): """ create connetion to litecoin fullnode """ - access = AuthServiceProxy("http://litecoinrpc:12345678@47.88.59.35:2300") + access = AuthServiceProxy("http://litecoinrpc:12345678@3.23.224.20:9432") return access @@ -341,7 +341,7 @@ def get_results(self, method, params): serialized_data = json.dumps(message) headers = {'Content-type': 'application/json'} response = requests.post( - "http://35.185.10.253:8545", headers=headers, data=serialized_data) + "http://52.14.59.225:3334", headers=headers, data=serialized_data) return response.json() def generate(self, unique_id, random=None): @@ -500,7 +500,7 @@ def get_results(self, method, params): serialized_data = json.dumps(message) headers = {'Content-type': 'application/json'} response = requests.post( - "http://35.185.10.253:8545", headers=headers, data=serialized_data) + "http://52.14.59.225:3334", headers=headers, data=serialized_data) return response.json() diff --git a/web/exmr/apps/coins/views.py b/web/exmr/apps/coins/views.py index 4ef9976..d9974f5 100755 --- a/web/exmr/apps/coins/views.py +++ b/web/exmr/apps/coins/views.py @@ -45,6 +45,8 @@ PayByNamePurchase from apps.merchant_tools.models import MultiPayment +from requests import Request, Session + paypalrestsdk.configure({ "mode": settings.PAYPAL_MODE, # sandbox or live "client_id": settings.PAYPAL_CLIENT_ID, @@ -81,10 +83,22 @@ def get_context_data(self, *args, **kwargs): # create_wallet(self.request.user, currency) try: rates = cache.get('rates') + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} # rates = ast.literal_eval(rates) except: - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + except Exception as e: + raise e self.request.session["rates"] = rates context["wallets"] = Coin.objects.all() context["erc_wallet"] = EthereumToken.objects.all() @@ -422,13 +436,16 @@ def get_context_data(self, *args, **kwargs): context['coins'] = NewCoin.objects.filter( approved=True).order_by('-vote_count') phase = Phases.objects.last() - time_start = str(phase.time_start.day) + " " + \ - phase.time_start.strftime("%B") - time_stop = str(phase.time_start.day) + " " + \ - phase.time_stop.strftime("%B") - if phase.extra_message: - context['extra_message'] = phase.extra_message - context["time_period"] = time_start + " - " + time_stop + if phase: + time_start = str(phase.time_start.day) + " " + \ + phase.time_start.strftime("%B") + time_stop = str(phase.time_start.day) + " " + \ + phase.time_stop.strftime("%B") + if phase.extra_message: + context['extra_message'] = phase.extra_message + context["time_period"] = time_start + " - " + time_stop + else: + context["time_period"] = "01 January - 31 December" return context def post(self, request, *args, **kwargs): @@ -454,8 +471,25 @@ def get_context_data(self, *args, **kwargs): # coin = Coin.objects.get(code=currency) # if not Wallet.objects.filter(user=self.request.user, name=coin): # create_wallet(self.request.user, currency) - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} + try: + rates = cache.get('rates') + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} + except: + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + except Exception as e: + raise e + # data = json.loads(requests.get("http://coincap.io/front").text) + # rates = {rate['short']: rate['price'] for rate in data} self.request.session["rates"] = rates context["wallets"] = Coin.objects.all() context["erc_wallet"] = EthereumToken.objects.all() @@ -532,8 +566,23 @@ def get_context_data(self, *args, **kwargs): # coin = Coin.objects.get(code=currency) # if not Wallet.objects.filter(user=self.request.user, name=coin): # create_wallet(self.request.user, currency) - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} + try: + rates = cache.get('rates') + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} + except: + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + except Exception as e: + raise e self.request.session["rates"] = rates context["ripple"] = Coin.objects.get(code='XRPTest') context["erc_wallet"] = EthereumToken.objects.all() @@ -779,10 +828,24 @@ def get(self, request, *args, **kwargs): user = User.objects.get(id=self.request.GET.get("user_id")) else: user = request.user - if not cache.get("rates"): - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} - self.request.session["rates"] = rates + try: + rates = cache.get('rates') + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} + except: + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + except Exception as e: + raise e + self.request.session["rates"] = rates if 'Test' in currency_code: new_currency_code = currency_code.strip("Test") else: @@ -807,12 +870,24 @@ class AdminBalanceView(View): def get(self, request, *args, **kwargs): currency_code = self.request.GET.get('code') value = None - if not cache.get('rates'): - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} - self.request.session["rates"] = rates - else: + try: rates = cache.get('rates') + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} + except: + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + except Exception as e: + raise e + self.request.session["rates"] = rates if 'Test' in currency_code: new_currency_code = currency_code.strip("Test") @@ -1203,12 +1278,22 @@ def post(self, request, *args, **kwargs): return HttpResponseForbidden(render(request, '403.html')) try: rates = cache.get('rates') - if rates is None: - raise Exception + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} except: - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} - rates = json.dumps(rates) + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + rates = json.dumps(rates) + except Exception as e: + raise e rate_of_coin = rates[selected_coin] selected_coin_amount = float(package_price)/float(rate_of_coin) @@ -1375,9 +1460,21 @@ class GetCurrentRate(View): def get(self, request, *args, **kwargs): try: rates = cache.get('rates') + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} except: - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + except Exception as e: + raise e data = json.dumps(rates) print(data) diff --git a/web/exmr/apps/common/utils.py b/web/exmr/apps/common/utils.py index a792508..0376781 100755 --- a/web/exmr/apps/common/utils.py +++ b/web/exmr/apps/common/utils.py @@ -9,6 +9,7 @@ from django.template import TemplateDoesNotExist from django.template.loader import render_to_string from django.http import JsonResponse +from apps.accounts.models import Profile gpg = gnupg.GPG(gnupghome="gnupg") @@ -34,12 +35,12 @@ def send_mail(user, subject, message, from_email, recipient_list, fail_silently= """ Send an email utility """ - message = smart_text(gpg.sign(message)) - try: - Profile.objects.get(user= user).pgp_gpg_public_key - message = smart_text(gpg.encrypt(message)) - except: - pass + # message = smart_text(gpg.sign(message)) + # try: + # Profile.objects.get(user= user).pgp_gpg_public_key + # message = smart_text(gpg.encrypt(message)) + # except: + # pass send_email_django(subject, message, from_email, recipient_list, fail_silently,\ auth_user, auth_password, connection, html_message) return True diff --git a/web/exmr/apps/merchant_tools/tasks.py b/web/exmr/apps/merchant_tools/tasks.py index ec70cf4..a94e8e2 100755 --- a/web/exmr/apps/merchant_tools/tasks.py +++ b/web/exmr/apps/merchant_tools/tasks.py @@ -35,7 +35,8 @@ def check_market_rate(): # cache.set('rates', rates, timeout=7200) cache.set('last_check', datetime.now(), timeout=7200) coin_rate_list = coincap.get_coins_markets('usd') - rates = {(rate['symbol']).upper():rate['priceUsd'] for rate in coin_rate_list['data']} + # rates = {(rate['symbol']).upper():rate['priceUsd'] for rate in coin_rate_list['data']} + rates = {(rate['symbol']).upper():rate['quote']['USD']['price'] for rate in coin_rate_list['data']} cache.set('rates', rates, timeout=7200) diff --git a/web/exmr/apps/merchant_tools/views.py b/web/exmr/apps/merchant_tools/views.py index 861e400..14c944b 100644 --- a/web/exmr/apps/merchant_tools/views.py +++ b/web/exmr/apps/merchant_tools/views.py @@ -35,6 +35,7 @@ from django.views.decorators.csrf import csrf_exempt from django.utils.crypto import get_random_string from django.utils import timezone +from requests import Request, Session from apps.apiapp.coingecko import CoinGeckoAPI @@ -587,11 +588,25 @@ class POSCalcView(TemplateView): def get_context_data(self, **kwargs): context = super().get_context_data() try: - context['rates'] = cache.get('rates') + rates = cache.get('rates') + context['rates'] = rates + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} + context['rates'] = json.dumps(rates) except: - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} - context['rates'] = json.dumps(rates) + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + context['rates'] = json.dumps(rates) + except Exception as e: + raise e return context class POSCalcCoinSelect( TemplateView): @@ -601,12 +616,25 @@ def post(self, request, *args, **kwargs): input_currency = request.POST.get('select_currency') context = super().get_context_data(**kwargs) try: - cur_rate = cache.get('rates') - context['rates'] = cur_rate + rates = cache.get('rates') + context['rates'] = rates + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} + context['rates'] = json.dumps(rates) except: - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} - context['rates'] = json.dumps(rates) + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + context['rates'] = json.dumps(rates) + except Exception as e: + raise e if not input_currency == "USD": usd_equivalent = round((float(cur_rate[input_currency]) * float(input_amount)), 8) else: @@ -644,10 +672,24 @@ def post(self, request, *args, **kwargs): selected_coin = request.POST.get('selected_coin') try: rates = cache.get('rates') + context['rates'] = rates + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} + context['rates'] = json.dumps(rates) except: - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} - rates = json.dumps(rates) + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + context['rates'] = json.dumps(rates) + except Exception as e: + raise e if input_coin == "USD": selected_coin_amount = float(input_amount)/float(rates[selected_coin]) @@ -1356,9 +1398,22 @@ def get_context_data(self, *args, **kwargs): try: rates = cache.get('rates') rates = ast.literal_eval(rates) + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} except: - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + except Exception as e: + raise e + context['rates'] = json.dumps(rates) if self.invoice_url: temp_obj = SimpleButtonInvoice.objects.get( @@ -1509,11 +1564,24 @@ def post(self, request, *args, **kwargs): context['attempted'] = attempted # attempt payment try: - rates = redis_object.hgetall('rates') + rates = cache.get('rates') rates = ast.literal_eval(rates) + if not rates: + url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + parameters = {'start':'1','limit':'5000','convert':'USD'} + headers = {'Accepts': 'application/json','X-CMC_PRO_API_KEY': 'ca192ce1-68fa-4a18-8eaa-5f34ffaef044',} + session = Session() + session.headers.update(headers) + response = session.get(url, params=parameters) + data = json.loads(response.text)['data'] + rates = {rate['symbol']: rate['quote']['USD']['price'] for rate in data} except: - data = json.loads(requests.get("http://coincap.io/front").text) - rates = {rate['short']: rate['price'] for rate in data} + try: + data = json.loads(requests.get("http://coincap.io/front").text) + rates = {rate['short']: rate['price'] for rate in data} + except Exception as e: + raise e + context['rates'] = json.dumps(rates) context['url'] = temp_obj.URL_link diff --git a/web/exmr/exmr/settings/base.py b/web/exmr/exmr/settings/base.py index 0f3d807..4c2eac0 100644 --- a/web/exmr/exmr/settings/base.py +++ b/web/exmr/exmr/settings/base.py @@ -137,6 +137,8 @@ USE_GNUPG = True EMAIL_BACKEND = 'secure_mail.backends.EncryptingSmtpEmailBackend' +# EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend' +EMAIL_FILE_PATH = 'media/emails' DATABASES = { 'default': { @@ -298,8 +300,8 @@ pass ADMINS = ( - ('ME', 'mail2vipinmohan@gmail.com'), - ('ADMIN', 'vipin.mohan@techversantinc.com'), +# ('ME', 'mail2vipinmohan@gmail.com'), + ('ADMIN', 'anshid@techversantinfo.com'), ) LOGGING = { 'version': 1, diff --git a/web/exmr/exmr/settings/local.py b/web/exmr/exmr/settings/local.py index 7413173..23ffbd4 100755 --- a/web/exmr/exmr/settings/local.py +++ b/web/exmr/exmr/settings/local.py @@ -22,11 +22,12 @@ SESSION_EXPIRE_SECONDS = 6000 EMAIL_HOST = 'smtp.gmail.com' -EMAIL_HOST_USER = 'noreply@getcryptopayments.com' -EMAIL_HOST_PASSWORD = 'Exmr@2019~!' +EMAIL_HOST_USER = 'exmr.test@gmail.com' +EMAIL_HOST_PASSWORD = 'Adminqwerty123' EMAIL_PORT = 587 EMAIL_USE_TLS = True DEBUG = True +DEFAULT_FROM_EMAIL = EMAIL_HOST_USER PAYPAL_MODE = "sandbox" PAYPAL_CLIENT_ID = "AblPqPuQrjYiRqrrwfrokV0qBZf2rxt7S76SzcIY3qAHkRga8Jo_yPebqg50y7MUu8NdEMpJGa-LesfL" diff --git a/web/exmr/exmr/settings/production.py b/web/exmr/exmr/settings/production.py index 9715e0f..0645023 100755 --- a/web/exmr/exmr/settings/production.py +++ b/web/exmr/exmr/settings/production.py @@ -39,7 +39,7 @@ DEFAULT_FROM_EMAIL = EMAIL_HOST_USER ADMINS = ( - ('ME', 'mail2vipinmohan@gmail.com'), - ('ADMIN', 'vipin.mohan@techversantinc.com'), +# ('ME', 'mail2vipinmohan@gmail.com'), + ('ADMIN', 'anshid@techversantinfo.com'), ) MANAGERS = ADMINS