diff --git a/src/app/app.js b/src/app/app.js index 1391a1b7..112f7053 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -110,7 +110,8 @@ const requires = [ 'app.signedMessageVerification', 'app.domainNameSystem', 'app.dnsSearch', - 'app.importWalletQrCode' + 'app.importWalletQrCode', + 'app.coinswitch' ]; window.$ = window.jQuery = $; diff --git a/src/app/modules/exchanges/coinswitch/coinswitch.config.js b/src/app/modules/exchanges/coinswitch/coinswitch.config.js new file mode 100644 index 00000000..070855d6 --- /dev/null +++ b/src/app/modules/exchanges/coinswitch/coinswitch.config.js @@ -0,0 +1,15 @@ +function CoinSwitchConfig($stateProvider) { + 'ngInject'; + + $stateProvider + .state('app.coinswitch', { + url: '/coinswitch-buy-xem', + controller: 'CoinSwitchCtrl', + controllerAs: '$ctrl', + templateUrl: 'modules/exchanges/coinswitch/coinswitch.html', + title: 'Convert to XEM' + }); + +}; + +export default CoinSwitchConfig; \ No newline at end of file diff --git a/src/app/modules/exchanges/coinswitch/coinswitch.controller.js b/src/app/modules/exchanges/coinswitch/coinswitch.controller.js new file mode 100644 index 00000000..d86e06bb --- /dev/null +++ b/src/app/modules/exchanges/coinswitch/coinswitch.controller.js @@ -0,0 +1,24 @@ +class CoinSwitchCtrl { + + /** + * Initialize dependencies and properties + * + * @params {services} - Angular services to inject + */ + constructor(Wallet) { + 'ngInject'; + + //// Module dependencies region //// + + this._Wallet = Wallet; + + //// End dependencies region //// + + // Open the ShapeShift widget in a new window + let child = window.open("https://coinswitch.co/widget?widget_id=313393f2&from=btc&to=xem&amount=0.1&block_extra_data=true&address=" + this._Wallet.currentAccount.address,'1418115287605','width=700,height=500,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=0,left=0,top=0,noopener=1'); + child.opener = null; + } + +} + +export default CoinSwitchCtrl; \ No newline at end of file diff --git a/src/app/modules/exchanges/coinswitch/coinswitch.html b/src/app/modules/exchanges/coinswitch/coinswitch.html new file mode 100644 index 00000000..86ec4801 --- /dev/null +++ b/src/app/modules/exchanges/coinswitch/coinswitch.html @@ -0,0 +1,11 @@ +
+
+
+
+
+

CoinSwitch should have opened in a new window. If it did not, disable your popup blocker and try again.

+
+
+
+
+
\ No newline at end of file diff --git a/src/app/modules/exchanges/index.js b/src/app/modules/exchanges/index.js index 15db2647..0645ae0e 100644 --- a/src/app/modules/exchanges/index.js +++ b/src/app/modules/exchanges/index.js @@ -22,4 +22,15 @@ ShapeshiftModule.config(ShapeshiftConfig); import ShapeshiftCtrl from './shapeshift/shapeshift.controller'; ShapeshiftModule.controller('ShapeshiftCtrl', ShapeshiftCtrl); +// Create the module where our functionality can attach to +let CoinSwitchModule = angular.module('app.coinswitch', []); + +// Include our UI-Router config settings +import CoinSwitchConfig from './coinswitch/coinswitch.config'; +CoinSwitchModule.config(CoinSwitchConfig); + +// Controllers +import CoinSwitchCtrl from './coinswitch/coinswitch.controller'; +CoinSwitchModule.controller('CoinSwitchCtrl', CoinSwitchCtrl); + export default ChangellyModule; \ No newline at end of file diff --git a/src/app/modules/languages/en.js b/src/app/modules/languages/en.js index b7748e01..9665a42e 100644 --- a/src/app/modules/languages/en.js +++ b/src/app/modules/languages/en.js @@ -382,7 +382,7 @@ function EnglishProvider($translateProvider) { PORTAL_HARVESTING_TITLE: 'Delegated Harvesting', PORTAL_HARVESTING_TEXT: 'Delegated harvesting is the feature that allows "mining" even while your account is closed.', PORTAL_EXCHANGE_TITLE: 'Instant Exchanges', - PORTAL_EXCHANGE_TEXT: 'Use Changelly and ShapeShift widgets to buy XEM at the best rates!', + PORTAL_EXCHANGE_TEXT: 'Use Changelly, ShapeShift and CoinSwitch widgets to buy XEM at the best rates!', PORTAL_EXCHANGE_BTN: 'Buy XEM', PORTAL_NS_TITLE: 'Namespaces & Subdomains', PORTAL_NS_TEXT: 'Namespaces are domain names. Each namespace is unique and authenticates mosaics (assets) issued on it or on its subdomains.', diff --git a/src/app/modules/languages/es.js b/src/app/modules/languages/es.js index e768ffcc..ead5285b 100644 --- a/src/app/modules/languages/es.js +++ b/src/app/modules/languages/es.js @@ -379,7 +379,7 @@ function SpanishProvider($translateProvider) { PORTAL_HARVESTING_TITLE: 'Cosecha delegada', PORTAL_HARVESTING_TEXT: 'La cosecha delegada es la característica que permite "minar" incluso cuando tu cuenta está cerrada.', PORTAL_EXCHANGE_TITLE: 'Casas de intercambios instantáneas', - PORTAL_EXCHANGE_TEXT: '¡Utiliza los widgets Changelly y ShapeShift para comprar XEM a los mejores precios!', + PORTAL_EXCHANGE_TEXT: '¡Utiliza los widgets Changelly ShapeShift y CoinSwitch para comprar XEM a los mejores precios!', PORTAL_EXCHANGE_BTN: 'Comprar XEM', PORTAL_NS_TITLE: 'Namespaces y subnamespaces', PORTAL_NS_TEXT: 'Los namespaces son nombres de dominio. Cada namespace es único y autentica los mosaicos (activos) emitidos en él o en sus subnamespaces.', diff --git a/src/app/modules/languages/it.js b/src/app/modules/languages/it.js index b904b953..c942fcd4 100644 --- a/src/app/modules/languages/it.js +++ b/src/app/modules/languages/it.js @@ -379,7 +379,7 @@ function ItalianProvider($translateProvider) { PORTAL_HARVESTING_TITLE: 'Delegato alla vendemmia', PORTAL_HARVESTING_TEXT: 'Delegate Harvesting è la funzione che consente di "estrarre" anche quando il tuo account non è aperto nel tuo browser.', PORTAL_EXCHANGE_TITLE: 'Intermediazione istantanea', - PORTAL_EXCHANGE_TEXT: 'Usa i widget di Changelly o ShapeShift per acquistare XEM ai migliori prezzi!', + PORTAL_EXCHANGE_TEXT: 'Usa i widget di Changelly ShapeShift o CoinSwitch per acquistare XEM ai migliori prezzi!', PORTAL_EXCHANGE_BTN: 'Acquista ora XEM', PORTAL_NS_TITLE: 'Nome Registrazione e sottodomini', PORTAL_NS_TEXT: 'I record di nomi sono nomi di dominio. Ogni record di nome è unico e autentica i mosaici (attivi) emessi in essi o nei relativi sottodomini.', diff --git a/src/app/modules/languages/ptbr.js b/src/app/modules/languages/ptbr.js index c2ba3b25..e05faadf 100644 --- a/src/app/modules/languages/ptbr.js +++ b/src/app/modules/languages/ptbr.js @@ -379,7 +379,7 @@ function PortugueseBRProvider($translateProvider) { PORTAL_HARVESTING_TITLE: 'Colheita Delegada', PORTAL_HARVESTING_TEXT: 'Colheita Delegada é a funcionalidade que permite "minerar" mesmo quando a sua conta não estiver aberta no seu navegador.', PORTAL_EXCHANGE_TITLE: 'Corretoras Instantâneas', - PORTAL_EXCHANGE_TEXT: 'Use os widgets da Changelly ou ShapeShift para comprar XEM nos melhores preços!', + PORTAL_EXCHANGE_TEXT: 'Use os widgets da Changelly ShapeShift ou CoinSwitch para comprar XEM nos melhores preços!', PORTAL_EXCHANGE_BTN: 'Comprar XEM', PORTAL_NS_TITLE: 'Registro de nomes & Subdomínios', PORTAL_NS_TEXT: 'Registros de nomes são nomes de domínios. Cada registro de nome é único e autentica mosaicos (ativos) emitidos neles ou em seus subdomínios.', diff --git a/src/app/modules/languages/uk.js b/src/app/modules/languages/uk.js index ab0d5604..eda3782f 100644 --- a/src/app/modules/languages/uk.js +++ b/src/app/modules/languages/uk.js @@ -382,7 +382,7 @@ function UkrainianProvider($translateProvider) { PORTAL_HARVESTING_TITLE: 'Делегований збір блоків', PORTAL_HARVESTING_TEXT: 'Делегований збір блоків є ознакою, що дозволяє "майнінг" навіть коли Ваш обліковий запис зачинено.', PORTAL_EXCHANGE_TITLE: 'Миттєвий обмін', - PORTAL_EXCHANGE_TEXT: 'Використовуйте віджети Changelly та ShapeShift для купівлі XEM за найкращим курсом!', + PORTAL_EXCHANGE_TEXT: 'Використовуйте віджети Changelly ShapeShift та CoinSwitch для купівлі XEM за найкращим курсом!', PORTAL_EXCHANGE_BTN: 'Купити XEM', PORTAL_NS_TITLE: 'Простори імен та Піддомени', PORTAL_NS_TEXT: 'Простори імен - це імена доменів. Кожен простір імен унікальний та є аутентифікатором мозаїк (активів), які випущені на ньому чи його піддоменах.', diff --git a/src/app/modules/portal/portal.html b/src/app/modules/portal/portal.html index ac3a2d88..50285056 100644 --- a/src/app/modules/portal/portal.html +++ b/src/app/modules/portal/portal.html @@ -130,6 +130,8 @@
{{ 'PORTAL_EXCHANGE_TITLE' | translate }}

+
+