Skip to content
This repository was archived by the owner on Apr 21, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ const requires = [
'app.signedMessageVerification',
'app.domainNameSystem',
'app.dnsSearch',
'app.importWalletQrCode'
'app.importWalletQrCode',
'app.coinswitch'
];

window.$ = window.jQuery = $;
Expand Down
15 changes: 15 additions & 0 deletions src/app/modules/exchanges/coinswitch/coinswitch.config.js
Original file line number Diff line number Diff line change
@@ -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;
24 changes: 24 additions & 0 deletions src/app/modules/exchanges/coinswitch/coinswitch.controller.js
Original file line number Diff line number Diff line change
@@ -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;
11 changes: 11 additions & 0 deletions src/app/modules/exchanges/coinswitch/coinswitch.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="coinswitch-page">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div id="switchwidget">
<h3>CoinSwitch should have opened in a new window. If it did not, disable your popup blocker and try again.</h3>
</div>
</div>
</div>
</div>
</div>
11 changes: 11 additions & 0 deletions src/app/modules/exchanges/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion src/app/modules/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/languages/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/languages/ptbr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/languages/uk.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: 'Простори імен - це імена доменів. Кожен простір імен унікальний та є аутентифікатором мозаїк (активів), які випущені на ньому чи його піддоменах.',
Expand Down
2 changes: 2 additions & 0 deletions src/app/modules/portal/portal.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ <h5> {{ 'PORTAL_EXCHANGE_TITLE' | translate }}</h5>
<button class="btn" ui-sref="app.changelly">{{ 'PORTAL_EXCHANGE_BTN' | translate }} on Changelly</button>
<br>
<button class="btn" ui-sref="app.shapeshift">{{ 'PORTAL_EXCHANGE_BTN' | translate }} on ShapeShift</button>
<br>
<button class="btn" ui-sref="app.coinswitch">{{ 'PORTAL_EXCHANGE_BTN' | translate }} on CoinSwitch</button>
</div>
</div>
</div>
Expand Down