From 689dcaed96b31728fd783b1d162b0605f24cd302 Mon Sep 17 00:00:00 2001 From: Justin Tormey Date: Fri, 20 May 2016 09:11:06 -0400 Subject: [PATCH] feat(Send): show warning when payment object emits a message (#442) --- assets/js/controllers/send.controller.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/js/controllers/send.controller.js b/assets/js/controllers/send.controller.js index cd48039039..f03b1158a1 100644 --- a/assets/js/controllers/send.controller.js +++ b/assets/js/controllers/send.controller.js @@ -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('');