Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Commit

Permalink
feat(Send): show warning when payment object emits a message (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtormey authored and Sjors committed May 20, 2016
1 parent dbc16c4 commit 689dcae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/js/controllers/send.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ function SendCtrl ($scope, $log, Wallet, Alerts, currency, $uibModal, $uibModalI
}
});

$scope.payment.on('message', message => {
if (message && message.text) {
Alerts.displayWarning(message.text, true, $scope.alerts);
}
});

$scope.hasZeroBalance = (origin) => origin.balance === 0;
$scope.close = () => $uibModalInstance.dismiss('');

Expand Down

0 comments on commit 689dcae

Please sign in to comment.