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
1 change: 1 addition & 0 deletions src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const requires = [
'chart.js',
'pascalprecht.translate',
'app.lang',
'app.alfacashier',
'app.changelly',
'app.addressBook',
'app.importanceTransfer',
Expand Down
15 changes: 15 additions & 0 deletions src/app/modules/exchanges/alfacashier/alfacashier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
function AlfacashierConfig($stateProvider) {
'ngInject';

$stateProvider
.state('app.alfacashier', {
url: '/alfacashier-buy-xem',
controller: 'AlfacashierCtrl',
controllerAs: '$ctrl',
templateUrl: 'modules/exchanges/alfacashier/alfacashier.html',
title: 'Buy XEM on ALFAcashier'
});

};

export default AlfacashierConfig;
24 changes: 24 additions & 0 deletions src/app/modules/exchanges/alfacashier/alfacashier.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
class AlfacashierCtrl {

/**
* Initialize dependencies and properties
*
* @params {services} - Angular services to inject
*/
constructor(Wallet) {
'ngInject';

//// Module dependencies region ////

this._Wallet = Wallet;

//// End dependencies region ////

// Open the ALFAcashier widget in a new window
let child = window.open("https://widget.alfacashier.io/?from_currency=bitcoin&to_currency=nem&source_amount=0.1&address="+ this._Wallet.currentAccount.address +"&no_payment_id&rid=2f7a9357",'1418115287605','width=700,height=630,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=0,left=0,top=0,noopener=1');
child.opener = null;
}

}

export default AlfacashierCtrl;
11 changes: 11 additions & 0 deletions src/app/modules/exchanges/alfacashier/alfacashier.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="alfacashier-page">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div id="alfacashierwidget">
<h3>ALFAcashier should have opened in a new window. If it did not, disable your popup blocker and try again.</h3>
</div>
</div>
</div>
</div>
</div>
14 changes: 13 additions & 1 deletion src/app/modules/exchanges/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import angular from 'angular';

// Create the module where our functionality can attach to
let AlfacashierModule = angular.module('app.alfacashier', []);

// Include our UI-Router config settings
import AlfacashierConfig from './alfacashier/alfacashier.config';
AlfacashierModule.config(AlfacashierConfig);

// Controllers
import AlfacashierCtrl from './alfacashier/alfacashier.controller';
AlfacashierModule.controller('AlfacashierCtrl', AlfacashierCtrl);

// Create the module where our functionality can attach to
let ChangellyModule = angular.module('app.changelly', []);

Expand All @@ -22,4 +33,5 @@ ShapeshiftModule.config(ShapeshiftConfig);
import ShapeshiftCtrl from './shapeshift/shapeshift.controller';
ShapeshiftModule.controller('ShapeshiftCtrl', ShapeshiftCtrl);

export default ChangellyModule;
export { AlfacashierModule as default, ChangellyModule };

4 changes: 2 additions & 2 deletions 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 widget to buy XEM at the best rates!',
PORTAL_EXCHANGE_TEXT: 'Use ALFAcashier widget or Changelly widget 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 Expand Up @@ -865,4 +865,4 @@ function EnglishProvider($translateProvider) {
});
}

export default EnglishProvider;
export default EnglishProvider;
4 changes: 3 additions & 1 deletion src/app/modules/portal/portal.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ <h5> {{ 'PORTAL_EXCHANGE_TITLE' | translate }}</h5>
<p>{{ 'PORTAL_EXCHANGE_TEXT' | translate }}</p>
</div>
<div class="panelFooter">
<button class="btn" ui-sref="app.alfacashier">{{ 'PORTAL_EXCHANGE_BTN' | translate }} on ALFAcashier</button>
<br>
<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>-->
Expand Down Expand Up @@ -259,4 +261,4 @@ <h5>NEMonster</h5>

</div>
</div>
</div>
</div>
18 changes: 18 additions & 0 deletions src/sass/_new.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,24 @@ textarea {
}
}

/*** ALFACASHIER WIDGET ***/
#alfacashierwidget {
margin-top: $pad * 3;
}
.explorer-home-page, .explorer-apostilles, .explorer-namespaces-mosaics-page, .explorer-accounts, explorer-transactions {
overflow: hidden;
li {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.explorerNav {
li {
overflow: visible;
}
}

/*** CHANGELLY WIDGET ***/
#changwidget {
margin-top: $pad * 3;
Expand Down