aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/transactions/lib/transaction-notification-manager.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/controllers/transactions/lib/transaction-notification-manager.js')
-rw-r--r--app/scripts/controllers/transactions/lib/transaction-notification-manager.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/scripts/controllers/transactions/lib/transaction-notification-manager.js b/app/scripts/controllers/transactions/lib/transaction-notification-manager.js
new file mode 100644
index 000000000..6bdf40b62
--- /dev/null
+++ b/app/scripts/controllers/transactions/lib/transaction-notification-manager.js
@@ -0,0 +1,27 @@
+const extension = require('extensionizer')
+
+// Confirmed tx
+// Transaction ${tx.nonce} confirmed! View on Etherscan
+
+// Failed tx
+// Transaction ${tx.nonce} failed. (Maybe append tx.error.message)
+
+// Dropped tx
+// A Transaction ${tx.nonce} was dropped, because another transaction with that number was successfully processed.
+
+function showConfirmedNotification (txMeta) {
+ extension.notifications.create({
+ "type": "basic",
+ "title": "Confirmed transaction",
+ "iconUrl": extension.extension.getURL('../../../../images/icon-64.png'),
+ "message": JSON.stringify(txMeta)
+ });
+}
+
+
+/**
+@module
+*/
+module.exports = {
+ showConfirmedNotification
+} \ No newline at end of file