aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-06-05 07:04:07 +0800
committerGitHub <noreply@github.com>2018-06-05 07:04:07 +0800
commitddce3d148ef9323c209a7f963057297c6181f779 (patch)
tree937246d88e3dac3598567a1ae6cba81600c5def9 /app/scripts/lib
parent5d58f0e9a02872cff298b8b9604c395688fd6c6c (diff)
parent41f292437dd6c7144e36efa8609a419c7dd88da7 (diff)
downloadtangerine-wallet-browser-ddce3d148ef9323c209a7f963057297c6181f779.tar.gz
tangerine-wallet-browser-ddce3d148ef9323c209a7f963057297c6181f779.tar.zst
tangerine-wallet-browser-ddce3d148ef9323c209a7f963057297c6181f779.zip
Merge pull request #4486 from MetaMask/i4475-ClearUnknownIdentities
Clear unknown identities
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/bug-notifier.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/scripts/lib/bug-notifier.js b/app/scripts/lib/bug-notifier.js
new file mode 100644
index 000000000..4d305b894
--- /dev/null
+++ b/app/scripts/lib/bug-notifier.js
@@ -0,0 +1,22 @@
+class BugNotifier {
+ notify (uri, message) {
+ return postData(uri, message)
+ }
+}
+
+function postData(uri, data) {
+ return fetch(uri, {
+ body: JSON.stringify(data), // must match 'Content-Type' header
+ credentials: 'same-origin', // include, same-origin, *omit
+ headers: {
+ 'content-type': 'application/json',
+ },
+ method: 'POST', // *GET, POST, PUT, DELETE, etc.
+ mode: 'cors', // no-cors, cors, *same-origin
+ })
+}
+
+const notifier = new BugNotifier()
+
+module.exports = notifier
+